php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_jit.h File Reference

Go to the source code of this file.

Data Structures

struct  _zend_jit_globals
 

Macros

#define ZEND_JIT_LEVEL_NONE   0 /* no JIT */
 
#define ZEND_JIT_LEVEL_MINIMAL   1 /* minimal JIT (subroutine threading) */
 
#define ZEND_JIT_LEVEL_INLINE   2 /* selective inline threading */
 
#define ZEND_JIT_LEVEL_OPT_FUNC   3 /* optimized JIT based on Type-Inference */
 
#define ZEND_JIT_LEVEL_OPT_FUNCS   4 /* optimized JIT based on Type-Inference and call-tree */
 
#define ZEND_JIT_LEVEL_OPT_SCRIPT   5 /* optimized JIT based on Type-Inference and inner-procedure analysis */
 
#define ZEND_JIT_ON_SCRIPT_LOAD   0
 
#define ZEND_JIT_ON_FIRST_EXEC   1
 
#define ZEND_JIT_ON_PROF_REQUEST   2 /* compile the most frequently caled on first request functions */
 
#define ZEND_JIT_ON_HOT_COUNTERS   3 /* compile functions after N calls or loop iterations */
 
#define ZEND_JIT_ON_DOC_COMMENT   4 /* compile functions with "@jit" tag in doc-comments */
 
#define ZEND_JIT_ON_HOT_TRACE   5 /* trace functions after N calls or loop iterations */
 
#define ZEND_JIT_REG_ALLOC_LOCAL   (1<<0) /* local linear scan register allocation */
 
#define ZEND_JIT_REG_ALLOC_GLOBAL   (1<<1) /* global linear scan register allocation */
 
#define ZEND_JIT_CPU_AVX   (1<<2) /* use AVX instructions, if available */
 
#define ZEND_JIT_DEFAULT_BUFFER_SIZE   "64M"
 
#define ZEND_JIT_COUNTER_INIT   32531
 
#define ZEND_JIT_DEBUG_ASM   (1<<0)
 
#define ZEND_JIT_DEBUG_SSA   (1<<1)
 
#define ZEND_JIT_DEBUG_REG_ALLOC   (1<<2)
 
#define ZEND_JIT_DEBUG_ASM_STUBS   (1<<3)
 
#define ZEND_JIT_DEBUG_PERF   (1<<4)
 
#define ZEND_JIT_DEBUG_PERF_DUMP   (1<<5)
 
#define ZEND_JIT_DEBUG_VTUNE   (1<<7)
 
#define ZEND_JIT_DEBUG_GDB   (1<<8)
 
#define ZEND_JIT_DEBUG_SIZE   (1<<9)
 
#define ZEND_JIT_DEBUG_ASM_ADDR   (1<<10)
 
#define ZEND_JIT_DEBUG_TRACE_START   (1<<12)
 
#define ZEND_JIT_DEBUG_TRACE_STOP   (1<<13)
 
#define ZEND_JIT_DEBUG_TRACE_COMPILED   (1<<14)
 
#define ZEND_JIT_DEBUG_TRACE_EXIT   (1<<15)
 
#define ZEND_JIT_DEBUG_TRACE_ABORT   (1<<16)
 
#define ZEND_JIT_DEBUG_TRACE_BLACKLIST   (1<<17)
 
#define ZEND_JIT_DEBUG_TRACE_BYTECODE   (1<<18)
 
#define ZEND_JIT_DEBUG_TRACE_TSSA   (1<<19)
 
#define ZEND_JIT_DEBUG_TRACE_EXIT_INFO   (1<<20)
 
#define ZEND_JIT_DEBUG_IR_SRC   (1<<24)
 
#define ZEND_JIT_DEBUG_IR_FINAL   (1<<25)
 
#define ZEND_JIT_DEBUG_IR_AFTER_SCCP   (1<<26)
 
#define ZEND_JIT_DEBUG_IR_AFTER_CFG   (1<<27)
 
#define ZEND_JIT_DEBUG_IR_AFTER_GCM   (1<<28)
 
#define ZEND_JIT_DEBUG_IR_AFTER_SCHEDULE   (1<<29)
 
#define ZEND_JIT_DEBUG_IR_AFTER_REGS   (1<<30)
 
#define ZEND_JIT_DEBUG_IR_CODEGEN   (1U<<31)
 
#define ZEND_JIT_DEBUG_PERSISTENT   0x1f0 /* profile and debugger flags can't be changed at run-time */
 
#define ZEND_JIT_TRACE_MAX_LENGTH   1024 /* max length of single trace */
 
#define ZEND_JIT_TRACE_MAX_EXITS   512 /* max number of side exits per trace */
 
#define ZEND_JIT_TRACE_MAX_FUNCS   30 /* max number of different functions in a single trace */
 
#define ZEND_JIT_TRACE_MAX_CALL_DEPTH   10 /* max depth of inlined calls */
 
#define ZEND_JIT_TRACE_MAX_RET_DEPTH   4 /* max depth of inlined returns */
 
#define ZEND_JIT_TRACE_MAX_LOOPS_UNROLL   10 /* max number of unrolled loops */
 
#define ZEND_JIT_TRACE_BAD_ROOT_SLOTS   64 /* number of slots in bad root trace cache */
 
#define JIT_G(v)
 
#define ZREG_LOAD   (1<<0)
 
#define ZREG_STORE   (1<<1)
 
#define ZREG_LAST_USE   (1<<2)
 
#define ZREG_PI   (1<<3)
 
#define ZREG_PHI   (1<<4)
 
#define ZREG_FORWARD   (1<<5)
 
#define ZREG_SPILL_SLOT   (1<<3)
 
#define ZREG_CONST   (1<<4)
 
#define ZREG_ZVAL_COPY   (2<<4)
 
#define ZREG_TYPE_ONLY   (3<<4)
 
#define ZREG_ZVAL_ADDREF   (4<<4)
 
#define ZREG_THIS   (5<<4)
 
#define ZREG_NONE   -1
 

Typedefs

typedef struct _zend_jit_trace_rec zend_jit_trace_rec
 
typedef struct _zend_jit_trace_stack_frame zend_jit_trace_stack_frame
 
typedef struct _sym_node zend_sym_node
 
typedef struct _zend_jit_globals zend_jit_globals
 

Functions

int zend_jit_op_array (zend_op_array *op_array, zend_script *script)
 
int zend_jit_script (zend_script *script)
 
void zend_jit_unprotect (void)
 
void zend_jit_protect (void)
 
void zend_jit_init (void)
 
int zend_jit_config (zend_string *jit_options, int stage)
 
int zend_jit_debug_config (zend_long old_val, zend_long new_val, int stage)
 
int zend_jit_check_support (void)
 
void zend_jit_startup (void *jit_buffer, size_t size, bool reattached)
 
void zend_jit_shutdown (void)
 
void zend_jit_activate (void)
 
void zend_jit_deactivate (void)
 
ZEND_EXT_API void zend_jit_status (zval *ret)
 
ZEND_EXT_API void zend_jit_blacklist_function (zend_op_array *op_array)
 
void zend_jit_restart (void)
 

Variables

bool zend_jit_startup_ok
 
zend_jit_globals jit_globals
 

Macro Definition Documentation

◆ JIT_G

#define JIT_G ( v)
Value:
zend_jit_globals jit_globals

Definition at line 151 of file zend_jit.h.

◆ ZEND_JIT_COUNTER_INIT

#define ZEND_JIT_COUNTER_INIT   32531

Definition at line 52 of file zend_jit.h.

◆ ZEND_JIT_CPU_AVX

#define ZEND_JIT_CPU_AVX   (1<<2) /* use AVX instructions, if available */

Definition at line 48 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_ASM

#define ZEND_JIT_DEBUG_ASM   (1<<0)

Definition at line 54 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_ASM_ADDR

#define ZEND_JIT_DEBUG_ASM_ADDR   (1<<10)

Definition at line 65 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_ASM_STUBS

#define ZEND_JIT_DEBUG_ASM_STUBS   (1<<3)

Definition at line 57 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_GDB

#define ZEND_JIT_DEBUG_GDB   (1<<8)

Definition at line 63 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_AFTER_CFG

#define ZEND_JIT_DEBUG_IR_AFTER_CFG   (1<<27)

Definition at line 80 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_AFTER_GCM

#define ZEND_JIT_DEBUG_IR_AFTER_GCM   (1<<28)

Definition at line 82 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_AFTER_REGS

#define ZEND_JIT_DEBUG_IR_AFTER_REGS   (1<<30)

Definition at line 84 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_AFTER_SCCP

#define ZEND_JIT_DEBUG_IR_AFTER_SCCP   (1<<26)

Definition at line 79 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_AFTER_SCHEDULE

#define ZEND_JIT_DEBUG_IR_AFTER_SCHEDULE   (1<<29)

Definition at line 83 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_CODEGEN

#define ZEND_JIT_DEBUG_IR_CODEGEN   (1U<<31)

Definition at line 85 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_FINAL

#define ZEND_JIT_DEBUG_IR_FINAL   (1<<25)

Definition at line 78 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_IR_SRC

#define ZEND_JIT_DEBUG_IR_SRC   (1<<24)

Definition at line 77 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_PERF

#define ZEND_JIT_DEBUG_PERF   (1<<4)

Definition at line 59 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_PERF_DUMP

#define ZEND_JIT_DEBUG_PERF_DUMP   (1<<5)

Definition at line 60 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_PERSISTENT

#define ZEND_JIT_DEBUG_PERSISTENT   0x1f0 /* profile and debugger flags can't be changed at run-time */

Definition at line 87 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_REG_ALLOC

#define ZEND_JIT_DEBUG_REG_ALLOC   (1<<2)

Definition at line 56 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_SIZE

#define ZEND_JIT_DEBUG_SIZE   (1<<9)

Definition at line 64 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_SSA

#define ZEND_JIT_DEBUG_SSA   (1<<1)

Definition at line 55 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_ABORT

#define ZEND_JIT_DEBUG_TRACE_ABORT   (1<<16)

Definition at line 71 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_BLACKLIST

#define ZEND_JIT_DEBUG_TRACE_BLACKLIST   (1<<17)

Definition at line 72 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_BYTECODE

#define ZEND_JIT_DEBUG_TRACE_BYTECODE   (1<<18)

Definition at line 73 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_COMPILED

#define ZEND_JIT_DEBUG_TRACE_COMPILED   (1<<14)

Definition at line 69 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_EXIT

#define ZEND_JIT_DEBUG_TRACE_EXIT   (1<<15)

Definition at line 70 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_EXIT_INFO

#define ZEND_JIT_DEBUG_TRACE_EXIT_INFO   (1<<20)

Definition at line 75 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_START

#define ZEND_JIT_DEBUG_TRACE_START   (1<<12)

Definition at line 67 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_STOP

#define ZEND_JIT_DEBUG_TRACE_STOP   (1<<13)

Definition at line 68 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_TRACE_TSSA

#define ZEND_JIT_DEBUG_TRACE_TSSA   (1<<19)

Definition at line 74 of file zend_jit.h.

◆ ZEND_JIT_DEBUG_VTUNE

#define ZEND_JIT_DEBUG_VTUNE   (1<<7)

Definition at line 61 of file zend_jit.h.

◆ ZEND_JIT_DEFAULT_BUFFER_SIZE

#define ZEND_JIT_DEFAULT_BUFFER_SIZE   "64M"

Definition at line 50 of file zend_jit.h.

◆ ZEND_JIT_LEVEL_INLINE

#define ZEND_JIT_LEVEL_INLINE   2 /* selective inline threading */

Definition at line 34 of file zend_jit.h.

◆ ZEND_JIT_LEVEL_MINIMAL

#define ZEND_JIT_LEVEL_MINIMAL   1 /* minimal JIT (subroutine threading) */

Definition at line 33 of file zend_jit.h.

◆ ZEND_JIT_LEVEL_NONE

#define ZEND_JIT_LEVEL_NONE   0 /* no JIT */

Definition at line 32 of file zend_jit.h.

◆ ZEND_JIT_LEVEL_OPT_FUNC

#define ZEND_JIT_LEVEL_OPT_FUNC   3 /* optimized JIT based on Type-Inference */

Definition at line 35 of file zend_jit.h.

◆ ZEND_JIT_LEVEL_OPT_FUNCS

#define ZEND_JIT_LEVEL_OPT_FUNCS   4 /* optimized JIT based on Type-Inference and call-tree */

Definition at line 36 of file zend_jit.h.

◆ ZEND_JIT_LEVEL_OPT_SCRIPT

#define ZEND_JIT_LEVEL_OPT_SCRIPT   5 /* optimized JIT based on Type-Inference and inner-procedure analysis */

Definition at line 37 of file zend_jit.h.

◆ ZEND_JIT_ON_DOC_COMMENT

#define ZEND_JIT_ON_DOC_COMMENT   4 /* compile functions with "@jit" tag in doc-comments */

Definition at line 43 of file zend_jit.h.

◆ ZEND_JIT_ON_FIRST_EXEC

#define ZEND_JIT_ON_FIRST_EXEC   1

Definition at line 40 of file zend_jit.h.

◆ ZEND_JIT_ON_HOT_COUNTERS

#define ZEND_JIT_ON_HOT_COUNTERS   3 /* compile functions after N calls or loop iterations */

Definition at line 42 of file zend_jit.h.

◆ ZEND_JIT_ON_HOT_TRACE

#define ZEND_JIT_ON_HOT_TRACE   5 /* trace functions after N calls or loop iterations */

Definition at line 44 of file zend_jit.h.

◆ ZEND_JIT_ON_PROF_REQUEST

#define ZEND_JIT_ON_PROF_REQUEST   2 /* compile the most frequently caled on first request functions */

Definition at line 41 of file zend_jit.h.

◆ ZEND_JIT_ON_SCRIPT_LOAD

#define ZEND_JIT_ON_SCRIPT_LOAD   0

Definition at line 39 of file zend_jit.h.

◆ ZEND_JIT_REG_ALLOC_GLOBAL

#define ZEND_JIT_REG_ALLOC_GLOBAL   (1<<1) /* global linear scan register allocation */

Definition at line 47 of file zend_jit.h.

◆ ZEND_JIT_REG_ALLOC_LOCAL

#define ZEND_JIT_REG_ALLOC_LOCAL   (1<<0) /* local linear scan register allocation */

Definition at line 46 of file zend_jit.h.

◆ ZEND_JIT_TRACE_BAD_ROOT_SLOTS

#define ZEND_JIT_TRACE_BAD_ROOT_SLOTS   64 /* number of slots in bad root trace cache */

Definition at line 97 of file zend_jit.h.

◆ ZEND_JIT_TRACE_MAX_CALL_DEPTH

#define ZEND_JIT_TRACE_MAX_CALL_DEPTH   10 /* max depth of inlined calls */

Definition at line 93 of file zend_jit.h.

◆ ZEND_JIT_TRACE_MAX_EXITS

#define ZEND_JIT_TRACE_MAX_EXITS   512 /* max number of side exits per trace */

Definition at line 90 of file zend_jit.h.

◆ ZEND_JIT_TRACE_MAX_FUNCS

#define ZEND_JIT_TRACE_MAX_FUNCS   30 /* max number of different functions in a single trace */

Definition at line 92 of file zend_jit.h.

◆ ZEND_JIT_TRACE_MAX_LENGTH

#define ZEND_JIT_TRACE_MAX_LENGTH   1024 /* max length of single trace */

Definition at line 89 of file zend_jit.h.

◆ ZEND_JIT_TRACE_MAX_LOOPS_UNROLL

#define ZEND_JIT_TRACE_MAX_LOOPS_UNROLL   10 /* max number of unrolled loops */

Definition at line 95 of file zend_jit.h.

◆ ZEND_JIT_TRACE_MAX_RET_DEPTH

#define ZEND_JIT_TRACE_MAX_RET_DEPTH   4 /* max depth of inlined returns */

Definition at line 94 of file zend_jit.h.

◆ ZREG_CONST

#define ZREG_CONST   (1<<4)

Definition at line 181 of file zend_jit.h.

◆ ZREG_FORWARD

#define ZREG_FORWARD   (1<<5)

Definition at line 177 of file zend_jit.h.

◆ ZREG_LAST_USE

#define ZREG_LAST_USE   (1<<2)

Definition at line 173 of file zend_jit.h.

◆ ZREG_LOAD

#define ZREG_LOAD   (1<<0)

Definition at line 171 of file zend_jit.h.

◆ ZREG_NONE

#define ZREG_NONE   -1

Definition at line 187 of file zend_jit.h.

◆ ZREG_PHI

#define ZREG_PHI   (1<<4)

Definition at line 176 of file zend_jit.h.

◆ ZREG_PI

#define ZREG_PI   (1<<3)

Definition at line 175 of file zend_jit.h.

◆ ZREG_SPILL_SLOT

#define ZREG_SPILL_SLOT   (1<<3)

Definition at line 179 of file zend_jit.h.

◆ ZREG_STORE

#define ZREG_STORE   (1<<1)

Definition at line 172 of file zend_jit.h.

◆ ZREG_THIS

#define ZREG_THIS   (5<<4)

Definition at line 185 of file zend_jit.h.

◆ ZREG_TYPE_ONLY

#define ZREG_TYPE_ONLY   (3<<4)

Definition at line 183 of file zend_jit.h.

◆ ZREG_ZVAL_ADDREF

#define ZREG_ZVAL_ADDREF   (4<<4)

Definition at line 184 of file zend_jit.h.

◆ ZREG_ZVAL_COPY

#define ZREG_ZVAL_COPY   (2<<4)

Definition at line 182 of file zend_jit.h.

Typedef Documentation

◆ zend_jit_globals

◆ zend_jit_trace_rec

Definition at line 99 of file zend_jit.h.

◆ zend_jit_trace_stack_frame

Definition at line 100 of file zend_jit.h.

◆ zend_sym_node

typedef struct _sym_node zend_sym_node

Definition at line 101 of file zend_jit.h.

Function Documentation

◆ zend_jit_activate()

void zend_jit_activate ( void )

◆ zend_jit_blacklist_function()

ZEND_EXT_API void zend_jit_blacklist_function ( zend_op_array * op_array)

Definition at line 7649 of file zend_jit_trace.c.

◆ zend_jit_check_support()

int zend_jit_check_support ( void )

◆ zend_jit_config()

int zend_jit_config ( zend_string * jit_options,
int stage )

◆ zend_jit_deactivate()

void zend_jit_deactivate ( void )

◆ zend_jit_debug_config()

int zend_jit_debug_config ( zend_long old_val,
zend_long new_val,
int stage )

◆ zend_jit_init()

void zend_jit_init ( void )

◆ zend_jit_op_array()

int zend_jit_op_array ( zend_op_array * op_array,
zend_script * script )

◆ zend_jit_protect()

void zend_jit_protect ( void )

◆ zend_jit_restart()

void zend_jit_restart ( void )

◆ zend_jit_script()

int zend_jit_script ( zend_script * script)

◆ zend_jit_shutdown()

void zend_jit_shutdown ( void )

◆ zend_jit_startup()

void zend_jit_startup ( void * jit_buffer,
size_t size,
bool reattached )

◆ zend_jit_status()

ZEND_EXT_API void zend_jit_status ( zval * ret)

◆ zend_jit_unprotect()

void zend_jit_unprotect ( void )

Variable Documentation

◆ jit_globals

zend_jit_globals jit_globals
extern

◆ zend_jit_startup_ok

bool zend_jit_startup_ok
extern