Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -3282,6 +3282,7 @@ static zend_result accel_post_startup(void)
zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Could not enable JIT: could not use reserved buffer!");
} else {
zend_jit_startup(ZSMMG(reserved), jit_size, reattached);
zend_jit_startup_ok = true;
}
}
#endif
Expand Down
9 changes: 9 additions & 0 deletions ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ zend_jit_globals jit_globals;
#define JIT_STUB_PREFIX "JIT$$"
#define TRACE_PREFIX "TRACE-"

bool zend_jit_startup_ok = false;

zend_ulong zend_jit_profile_counter = 0;
int zend_jit_profile_counter_rid = -1;

Expand Down Expand Up @@ -3772,6 +3774,13 @@ static void zend_jit_reset_counters(void)

void zend_jit_activate(void)
{
#ifdef ZTS
if (!zend_jit_startup_ok) {
JIT_G(enabled) = 0;
JIT_G(on) = 0;
return;
}
#endif
zend_jit_profile_counter = 0;
if (JIT_G(on)) {
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_COUNTERS) {
Expand Down
2 changes: 2 additions & 0 deletions ext/opcache/jit/zend_jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ 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;

extern bool zend_jit_startup_ok;

typedef struct _zend_jit_globals {
bool enabled;
bool on;
Expand Down
1 change: 0 additions & 1 deletion run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ function main(): void
if ($test_cnt) {
putenv('NO_INTERACTION=1');
usort($test_files, "test_sort");
$start_timestamp = time();
$start_time = hrtime(true);

echo "Running selected tests.\n";
Expand Down