Lines Matching refs:ZCSG
145 # define INCREMENT(v) InterlockedIncrement64(&ZCSG(v))
146 # define DECREMENT(v) InterlockedDecrement64(&ZCSG(v))
147 # define LOCKVAL(v) (ZCSG(v))
262 ZCSG(restart_in_progress) = 1; in accel_restart_enter()
268 ZCSG(restart_in_progress) = 0; in accel_restart_leave()
278 ZCSG(restart_in_progress) = 0; in accel_restart_leave()
287 if (ZCSG(restart_in_progress)) { in accel_restart_is_active()
301 ZCSG(restart_in_progress) = 0; in accel_restart_is_active()
406 memset(ZCSG(interned_strings).saved_top, in accel_interned_strings_restore_state()
407 0, (char*)ZCSG(interned_strings).top - (char*)ZCSG(interned_strings).saved_top); in accel_interned_strings_restore_state()
410 ZCSG(interned_strings).top = ZCSG(interned_strings).saved_top; in accel_interned_strings_restore_state()
413 memset((char*)&ZCSG(interned_strings) + sizeof(zend_string_table), in accel_interned_strings_restore_state()
415 (char*)ZCSG(interned_strings).start - in accel_interned_strings_restore_state()
416 ((char*)&ZCSG(interned_strings) + sizeof(zend_string_table))); in accel_interned_strings_restore_state()
417 s = ZCSG(interned_strings).start; in accel_interned_strings_restore_state()
418 top = ZCSG(interned_strings).top; in accel_interned_strings_restore_state()
422 hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), ZSTR_H(s)); in accel_interned_strings_restore_state()
424 *hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s); in accel_interned_strings_restore_state()
429 ZCSG(interned_strings).nNumOfElements = n; in accel_interned_strings_restore_state()
434 ZCSG(interned_strings).saved_top = ZCSG(interned_strings).top; in accel_interned_strings_save_state()
459 pos = *STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_find_interned_string()
462 s = STRTAB_POS_TO_STR(&ZCSG(interned_strings), pos); in accel_find_interned_string()
491 hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_new_interned_string()
495 s = STRTAB_POS_TO_STR(&ZCSG(interned_strings), pos); in accel_new_interned_string()
504 …if (UNEXPECTED((char*)ZCSG(interned_strings).end - (char*)ZCSG(interned_strings).top < STRTAB_STR_… in accel_new_interned_string()
511 ZCSG(interned_strings).nNumOfElements++; in accel_new_interned_string()
512 s = ZCSG(interned_strings).top; in accel_new_interned_string()
513 hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_new_interned_string()
515 *hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s); in accel_new_interned_string()
521 ZCSG(interned_strings).top = STRTAB_NEXT(s); in accel_new_interned_string()
547 pos = *STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_find_interned_string_ex()
550 s = STRTAB_POS_TO_STR(&ZCSG(interned_strings), pos); in accel_find_interned_string_ex()
756 if (ZCSG(interned_strings).saved_top == NULL) { in accel_use_shm_interned_strings()
775 ZCSG(force_restart_time) = 0; in kill_all_lockers()
809 ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */ in kill_all_lockers()
854 && ZCSG(force_restart_time) in accel_is_inactive()
855 && time(NULL) >= ZCSG(force_restart_time)) { in accel_is_inactive()
1179 …char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, STRTAB_STR_TO_POS(&ZCSG(interned_strings… in accel_make_persistent_key()
1222 …char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, STRTAB_STR_TO_POS(&ZCSG(interned_strings… in accel_make_persistent_key()
1306 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1324 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in zend_accel_invalidate()
1343 if (!zend_accel_hash_str_find(&ZCSG(hash), key, key_length)) { in zend_accel_add_key()
1344 if (zend_accel_hash_is_full(&ZCSG(hash))) { in zend_accel_add_key()
1352 if (zend_accel_hash_update(&ZCSG(hash), new_key, key_length, 1, bucket)) { in zend_accel_add_key()
1466 bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->script.filename); in cache_script_in_shared_memory()
1481 if (zend_accel_hash_is_full(&ZCSG(hash))) { in cache_script_in_shared_memory()
1574 …bucket = zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(new_persistent_script->script.filename), ZST… in cache_script_in_shared_memory()
1583 if (zend_accel_hash_update(&ZCSG(hash), key, key_length, 1, bucket)) { in cache_script_in_shared_memory()
1698 ZCSG(blacklist_misses)++; in opcache_compile_file()
1731 ZCSG(blacklist_misses)++; in opcache_compile_file()
1939 (ZCSG(restart_in_progress) && accel_restart_is_active())) { in persistent_compile_file()
1975 persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length); in persistent_compile_file()
2001 bucket = zend_accel_hash_find_entry(&ZCSG(hash), file_handle->opened_path); in persistent_compile_file()
2071 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in persistent_compile_file()
2096 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in persistent_compile_file()
2116 ZCSG(misses)++; in persistent_compile_file()
2119 if (ZSMMG(memory_exhausted) || ZCSG(restart_pending)) { in persistent_compile_file()
2161 ZCSG(hits)++; /* TBFixed: may lose one hit */ in persistent_compile_file()
2165 InterlockedIncrement64(&ZCSG(hits)); in persistent_compile_file()
2167 InterlockedIncrement(&ZCSG(hits)); in persistent_compile_file()
2280 zend_accel_hash_entry *bucket = zend_accel_hash_str_find_entry(&ZCSG(hash), key, key_length); in persistent_zend_resolve_path()
2301 zend_accel_hash_entry *bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path); in persistent_zend_resolve_path()
2337 ZCSG(hits) = 0; in zend_reset_cache_vars()
2338 ZCSG(misses) = 0; in zend_reset_cache_vars()
2339 ZCSG(blacklist_misses) = 0; in zend_reset_cache_vars()
2341 ZCSG(restart_pending) = 0; in zend_reset_cache_vars()
2342 ZCSG(force_restart_time) = 0; in zend_reset_cache_vars()
2343 ZCSG(map_ptr_last) = CG(map_ptr_last); in zend_reset_cache_vars()
2423 if (ZCSG(restart_pending)) { in accel_activate()
2425 …if (ZCSG(restart_pending) != 0) { /* check again, to ensure that the cache wasn't already cleaned … in accel_activate()
2428 ZCSG(restart_pending) = 0; in accel_activate()
2429 switch ZCSG(restart_reason) { in accel_activate()
2431 ZCSG(oom_restarts)++; in accel_activate()
2434 ZCSG(hash_restarts)++; in accel_activate()
2437 ZCSG(manual_restarts)++; in accel_activate()
2444 zend_accel_hash_clean(&ZCSG(hash)); in accel_activate()
2451 if (ZCSG(preload_script)) { in accel_activate()
2454 ZCSG(accelerator_enabled) = ZCSG(cache_status_before_restart); in accel_activate()
2455 if (ZCSG(last_restart_time) < ZCG(request_time)) { in accel_activate()
2456 ZCSG(last_restart_time) = ZCG(request_time); in accel_activate()
2458 ZCSG(last_restart_time)++; in accel_activate()
2466 ZCG(accelerator_enabled) = ZCSG(accelerator_enabled); in accel_activate()
2471 if (ZCG(accelerator_enabled) && ZCSG(last_restart_time) != ZCG(last_restart_time)) { in accel_activate()
2473 ZCG(last_restart_time) = ZCSG(last_restart_time); in accel_activate()
2485 if (ZCSG(preload_script)) { in accel_activate()
2594 zend_accel_hash_init(&ZCSG(hash), ZCG(accel_directives).max_accelerated_files); in zend_accel_init_shm()
2607 ZCSG(interned_strings).nTableMask = hash_size << 2; in zend_accel_init_shm()
2608 ZCSG(interned_strings).nNumOfElements = 0; in zend_accel_init_shm()
2609 ZCSG(interned_strings).start = in zend_accel_init_shm()
2610 (zend_string*)((char*)&ZCSG(interned_strings) + in zend_accel_init_shm()
2614 ZCSG(interned_strings).top = in zend_accel_init_shm()
2615 ZCSG(interned_strings).start; in zend_accel_init_shm()
2616 ZCSG(interned_strings).end = in zend_accel_init_shm()
2619 ZCSG(interned_strings).saved_top = NULL; in zend_accel_init_shm()
2621 memset((char*)&ZCSG(interned_strings) + sizeof(zend_string_table), in zend_accel_init_shm()
2623 (char*)ZCSG(interned_strings).start - in zend_accel_init_shm()
2624 ((char*)&ZCSG(interned_strings) + sizeof(zend_string_table))); in zend_accel_init_shm()
2626 *STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), 0) = STRTAB_INVALID_POS; in zend_accel_init_shm()
2633 ZCSG(oom_restarts) = 0; in zend_accel_init_shm()
2634 ZCSG(hash_restarts) = 0; in zend_accel_init_shm()
2635 ZCSG(manual_restarts) = 0; in zend_accel_init_shm()
2637 ZCSG(accelerator_enabled) = 1; in zend_accel_init_shm()
2638 ZCSG(start_time) = zend_accel_get_time(); in zend_accel_init_shm()
2639 ZCSG(last_restart_time) = 0; in zend_accel_init_shm()
2640 ZCSG(restart_in_progress) = 0; in zend_accel_init_shm()
2643 ZCSG(uninitialized_bucket)[i] = HT_INVALID_IDX; in zend_accel_init_shm()
2985 ZCG(last_restart_time) = ZCSG(last_restart_time); in accel_post_startup()
3085 if (ZCSG(preload_script)) { in accel_shutdown()
3118 if (ZCSG(restart_pending)) { in zend_accel_schedule_restart()
3127 ZCSG(restart_pending) = 1; in zend_accel_schedule_restart()
3128 ZCSG(restart_reason) = reason; in zend_accel_schedule_restart()
3129 ZCSG(cache_status_before_restart) = ZCSG(accelerator_enabled); in zend_accel_schedule_restart()
3130 ZCSG(accelerator_enabled) = 0; in zend_accel_schedule_restart()
3133 ZCSG(force_restart_time) = zend_accel_get_time() + ZCG(accel_directives).force_restart_timeout; in zend_accel_schedule_restart()
3135 ZCSG(force_restart_time) = 0; in zend_accel_schedule_restart()
3165 if (ZCSG(restart_in_progress)) { in accelerator_shm_read_lock()
3224 if (ZCSG(preload_script)->ping_auto_globals_mask) { in preload_activate()
3225 zend_accel_set_auto_globals(ZCSG(preload_script)->ping_auto_globals_mask); in preload_activate()
3231 …ccel_hash_update(&ZCSG(hash), ZSTR_VAL(ZCSG(preload_script)->script.filename), ZSTR_LEN(ZCSG(prelo… in preload_restart()
3232 if (ZCSG(saved_scripts)) { in preload_restart()
3233 zend_persistent_script **p = ZCSG(saved_scripts); in preload_restart()
3235 …zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL((*p)->script.filename), ZSTR_LEN((*p)->script.filenam… in preload_restart()
4137 if (zend_accel_hash_is_full(&ZCSG(hash))) { in preload_script_in_shared_memory()
4215 …bucket = zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(new_persistent_script->script.filename), ZST… in preload_script_in_shared_memory()
4228 zend_script *script = &ZCSG(preload_script)->script; in preload_load()
4260 if (CG(map_ptr_last) != ZCSG(map_ptr_last)) { in preload_load()
4262 CG(map_ptr_last) = ZCSG(map_ptr_last); in preload_load()
4283 persistent_script = zend_accel_hash_find(&ZCSG(hash), filename); in preload_autoload()
4613 ZCSG(preload_script) = preload_script_in_shared_memory(script); in accel_preload()
4620 ZEND_ASSERT(ZCSG(preload_script)->arena_size == 0); in accel_preload()
4629 …ZCSG(saved_scripts) = zend_shared_alloc((zend_hash_num_elements(preload_scripts) + 1) * sizeof(voi… in accel_preload()
4634 ZCSG(saved_scripts)[i++] = preload_script_in_shared_memory(script); in accel_preload()
4636 ZCSG(saved_scripts)[i] = NULL; in accel_preload()
4721 if (ZCSG(preload_script)) { in accel_finish_startup()
4774 if (ZCSG(preload_script)) { in accel_finish_startup()