php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
ZendAccelerator.h File Reference
#include "zend_config.h"
#include <sys/time.h>
#include <sys/resource.h>
#include "zend_extensions.h"
#include "zend_compile.h"
#include "zend_API.h"
#include "Optimizer/zend_optimizer.h"
#include "zend_accelerator_hash.h"
#include "zend_accelerator_debug.h"
#include <sys/param.h>

Go to the source code of this file.

Data Structures

struct  _zend_early_binding
 
struct  _zend_persistent_script
 
struct  _zend_persistent_script::zend_persistent_script_dynamic_members
 
struct  _zend_accel_directives
 
struct  _zend_accel_globals
 
struct  _zend_string_table
 
struct  _zend_accel_shared_globals
 

Macros

#define ACCELERATOR_PRODUCT_NAME   "Zend OPcache"
 
#define ACCELERATOR_API_NO   8
 
#define PHPAPI
 
#define ZEND_EXT_API
 
#define MAXPATHLEN   4096
 
#define ENABLE_FILE_CACHE_FALLBACK   0
 
#define ZEND_STRING_TABLE_POS_MAX   UINT32_MAX
 
#define ZEND_STRING_TABLE_POS_ALIGNMENT   8
 
#define ZCSG(element)
 
#define ZCG(v)
 
#define IS_ACCEL_INTERNED(str)
 
#define SHM_PROTECT()
 
#define SHM_UNPROTECT()
 

Typedefs

typedef time_t accel_time_t
 
typedef enum _zend_accel_restart_reason zend_accel_restart_reason
 
typedef struct _zend_early_binding zend_early_binding
 
typedef struct _zend_persistent_script zend_persistent_script
 
typedef struct _zend_accel_directives zend_accel_directives
 
typedef struct _zend_accel_globals zend_accel_globals
 
typedef struct _zend_string_table zend_string_table
 
typedef uint32_t zend_string_table_pos_t
 
typedef struct _zend_accel_shared_globals zend_accel_shared_globals
 

Enumerations

enum  _zend_accel_restart_reason { ACCEL_RESTART_OOM , ACCEL_RESTART_HASH , ACCEL_RESTART_USER }
 

Functions

void accel_shutdown (void)
 
 ZEND_RINIT_FUNCTION (zend_accelerator)
 
zend_result accel_post_deactivate (void)
 
void zend_accel_schedule_restart (zend_accel_restart_reason reason)
 
void zend_accel_schedule_restart_if_necessary (zend_accel_restart_reason reason)
 
accel_time_t zend_get_file_handle_timestamp (zend_file_handle *file_handle, size_t *size)
 
zend_result validate_timestamp_and_record (zend_persistent_script *persistent_script, zend_file_handle *file_handle)
 
zend_result validate_timestamp_and_record_ex (zend_persistent_script *persistent_script, zend_file_handle *file_handle)
 
zend_result zend_accel_invalidate (zend_string *filename, bool force)
 
zend_result accelerator_shm_read_lock (void)
 
void accelerator_shm_read_unlock (void)
 
zend_stringaccel_make_persistent_key (zend_string *path)
 
zend_op_arraypersistent_compile_file (zend_file_handle *file_handle, int type)
 
zend_string *ZEND_FASTCALL accel_new_interned_string (zend_string *str)
 
uint32_t zend_accel_get_class_name_map_ptr (zend_string *type_name)
 

Variables

int lock_file
 
bool accel_startup_ok
 
bool file_cache_only
 
zend_accel_shared_globalsaccel_shared_globals
 
zend_accel_globals accel_globals
 
const char * zps_api_failure_reason
 

Macro Definition Documentation

◆ ACCELERATOR_API_NO

#define ACCELERATOR_API_NO   8

Definition at line 37 of file ZendAccelerator.h.

◆ ACCELERATOR_PRODUCT_NAME

#define ACCELERATOR_PRODUCT_NAME   "Zend OPcache"

Definition at line 29 of file ZendAccelerator.h.

◆ ENABLE_FILE_CACHE_FALLBACK

#define ENABLE_FILE_CACHE_FALLBACK   0

Definition at line 98 of file ZendAccelerator.h.

◆ IS_ACCEL_INTERNED

#define IS_ACCEL_INTERNED ( str)
Value:
((char*)(str) >= (char*)ZCSG(interned_strings).start && (char*)(str) < (char*)ZCSG(interned_strings).top)
#define ZCSG(element)
buf start
Definition ffi.c:4687
original_stack top

Definition at line 331 of file ZendAccelerator.h.

◆ MAXPATHLEN

#define MAXPATHLEN   4096

Definition at line 85 of file ZendAccelerator.h.

◆ PHPAPI

#define PHPAPI

Definition at line 63 of file ZendAccelerator.h.

◆ SHM_PROTECT

#define SHM_PROTECT ( )
Value:
do { \
if (ZCG(accel_directives).protect_memory) { \
zend_accel_shared_protect(true); \
} \
} while (0)
#define ZCG(v)

Definition at line 341 of file ZendAccelerator.h.

◆ SHM_UNPROTECT

#define SHM_UNPROTECT ( )
Value:
do { \
if (ZCG(accel_directives).protect_memory) { \
zend_accel_shared_protect(false); \
} \
} while (0)

Definition at line 348 of file ZendAccelerator.h.

◆ ZCG

#define ZCG ( v)
Value:
zend_accel_globals accel_globals

Definition at line 308 of file ZendAccelerator.h.

◆ ZCSG

#define ZCSG ( element)
Value:
zend_accel_shared_globals * accel_shared_globals

Definition at line 299 of file ZendAccelerator.h.

◆ ZEND_EXT_API

#define ZEND_EXT_API

Definition at line 73 of file ZendAccelerator.h.

◆ ZEND_STRING_TABLE_POS_ALIGNMENT

#define ZEND_STRING_TABLE_POS_ALIGNMENT   8

Definition at line 244 of file ZendAccelerator.h.

◆ ZEND_STRING_TABLE_POS_MAX

#define ZEND_STRING_TABLE_POS_MAX   UINT32_MAX

Definition at line 243 of file ZendAccelerator.h.

Typedef Documentation

◆ accel_time_t

typedef time_t accel_time_t

Definition at line 104 of file ZendAccelerator.h.

◆ zend_accel_directives

◆ zend_accel_globals

◆ zend_accel_restart_reason

◆ zend_accel_shared_globals

◆ zend_early_binding

◆ zend_persistent_script

◆ zend_string_table

◆ zend_string_table_pos_t

typedef uint32_t zend_string_table_pos_t

Definition at line 241 of file ZendAccelerator.h.

Enumeration Type Documentation

◆ _zend_accel_restart_reason

Enumerator
ACCEL_RESTART_OOM 
ACCEL_RESTART_HASH 
ACCEL_RESTART_USER 

Definition at line 107 of file ZendAccelerator.h.

Function Documentation

◆ accel_make_persistent_key()

zend_string * accel_make_persistent_key ( zend_string * path)

Definition at line 1192 of file ZendAccelerator.c.

◆ accel_new_interned_string()

zend_string *ZEND_FASTCALL accel_new_interned_string ( zend_string * str)

Definition at line 506 of file ZendAccelerator.c.

◆ accel_post_deactivate()

zend_result accel_post_deactivate ( void )

Definition at line 2779 of file ZendAccelerator.c.

◆ accel_shutdown()

void accel_shutdown ( void )

Definition at line 3398 of file ZendAccelerator.c.

◆ accelerator_shm_read_lock()

zend_result accelerator_shm_read_lock ( void )

Definition at line 3497 of file ZendAccelerator.c.

◆ accelerator_shm_read_unlock()

void accelerator_shm_read_unlock ( void )

Definition at line 3520 of file ZendAccelerator.c.

◆ persistent_compile_file()

zend_op_array * persistent_compile_file ( zend_file_handle * file_handle,
int type )

Definition at line 1992 of file ZendAccelerator.c.

◆ validate_timestamp_and_record()

zend_result validate_timestamp_and_record ( zend_persistent_script * persistent_script,
zend_file_handle * file_handle )

Definition at line 1165 of file ZendAccelerator.c.

◆ validate_timestamp_and_record_ex()

zend_result validate_timestamp_and_record_ex ( zend_persistent_script * persistent_script,
zend_file_handle * file_handle )

Definition at line 1180 of file ZendAccelerator.c.

◆ zend_accel_get_class_name_map_ptr()

uint32_t zend_accel_get_class_name_map_ptr ( zend_string * type_name)

Definition at line 317 of file zend_persist.c.

◆ zend_accel_invalidate()

zend_result zend_accel_invalidate ( zend_string * filename,
bool force )

Definition at line 1400 of file ZendAccelerator.c.

◆ zend_accel_schedule_restart()

void zend_accel_schedule_restart ( zend_accel_restart_reason reason)

Definition at line 3447 of file ZendAccelerator.c.

◆ zend_accel_schedule_restart_if_necessary()

void zend_accel_schedule_restart_if_necessary ( zend_accel_restart_reason reason)

Definition at line 243 of file ZendAccelerator.c.

◆ zend_get_file_handle_timestamp()

accel_time_t zend_get_file_handle_timestamp ( zend_file_handle * file_handle,
size_t * size )

Definition at line 1016 of file ZendAccelerator.c.

◆ ZEND_RINIT_FUNCTION()

ZEND_RINIT_FUNCTION ( zend_accelerator )

Definition at line 2633 of file ZendAccelerator.c.

Variable Documentation

◆ accel_globals

zend_accel_globals accel_globals
extern

Definition at line 103 of file ZendAccelerator.c.

◆ accel_shared_globals

zend_accel_shared_globals* accel_shared_globals
extern

Definition at line 112 of file ZendAccelerator.c.

◆ accel_startup_ok

bool accel_startup_ok
extern

Definition at line 118 of file ZendAccelerator.c.

◆ file_cache_only

bool file_cache_only
extern

Definition at line 121 of file ZendAccelerator.c.

◆ lock_file

int lock_file
extern

Definition at line 62 of file zend_shared_alloc.c.

◆ zps_api_failure_reason

const char* zps_api_failure_reason
extern

Definition at line 120 of file ZendAccelerator.c.