Lines Matching refs:ZCSG

143 # define INCREMENT(v) InterlockedIncrement64(&ZCSG(v))
144 # define DECREMENT(v) InterlockedDecrement64(&ZCSG(v))
145 # define LOCKVAL(v) (ZCSG(v))
281 ZCSG(restart_in_progress) = true; in accel_restart_enter()
287 ZCSG(restart_in_progress) = false; in accel_restart_leave()
297 ZCSG(restart_in_progress) = false; in accel_restart_leave()
306 if (ZCSG(restart_in_progress)) { in accel_restart_is_active()
320 ZCSG(restart_in_progress) = false; in accel_restart_is_active()
429 memset(ZCSG(interned_strings).saved_top, in accel_interned_strings_restore_state()
430 0, (char*)ZCSG(interned_strings).top - (char*)ZCSG(interned_strings).saved_top); in accel_interned_strings_restore_state()
433 ZCSG(interned_strings).top = ZCSG(interned_strings).saved_top; in accel_interned_strings_restore_state()
436 memset((char*)&ZCSG(interned_strings) + sizeof(zend_string_table), in accel_interned_strings_restore_state()
438 (char*)ZCSG(interned_strings).start - in accel_interned_strings_restore_state()
439 ((char*)&ZCSG(interned_strings) + sizeof(zend_string_table))); in accel_interned_strings_restore_state()
440 s = ZCSG(interned_strings).start; in accel_interned_strings_restore_state()
441 top = ZCSG(interned_strings).top; in accel_interned_strings_restore_state()
448 if (idx >= ZCSG(map_ptr_last)) { in accel_interned_strings_restore_state()
454 hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), ZSTR_H(s)); in accel_interned_strings_restore_state()
456 *hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s); in accel_interned_strings_restore_state()
461 ZCSG(interned_strings).nNumOfElements = n; in accel_interned_strings_restore_state()
466 ZCSG(interned_strings).saved_top = ZCSG(interned_strings).top; in accel_interned_strings_save_state()
490 pos = *STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_find_interned_string()
493 s = STRTAB_POS_TO_STR(&ZCSG(interned_strings), pos); in accel_find_interned_string()
522 hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_new_interned_string()
526 s = STRTAB_POS_TO_STR(&ZCSG(interned_strings), pos); in accel_new_interned_string()
534 …if (UNEXPECTED((char*)ZCSG(interned_strings).end - (char*)ZCSG(interned_strings).top < STRTAB_STR_… in accel_new_interned_string()
541 ZCSG(interned_strings).nNumOfElements++; in accel_new_interned_string()
542 s = ZCSG(interned_strings).top; in accel_new_interned_string()
543 hash_slot = STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_new_interned_string()
545 *hash_slot = STRTAB_STR_TO_POS(&ZCSG(interned_strings), s); in accel_new_interned_string()
551 ZCSG(interned_strings).top = STRTAB_NEXT(s); in accel_new_interned_string()
586 pos = *STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), h); in accel_find_interned_string_ex()
589 s = STRTAB_POS_TO_STR(&ZCSG(interned_strings), pos); in accel_find_interned_string_ex()
812 if (ZCSG(interned_strings).saved_top == NULL) { in accel_use_shm_interned_strings()
831 ZCSG(force_restart_time) = 0; in kill_all_lockers()
869 ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */ in kill_all_lockers()
921 && ZCSG(force_restart_time) in accel_is_inactive()
922 && time(NULL) >= ZCSG(force_restart_time)) { in accel_is_inactive()
1248 …char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, STRTAB_STR_TO_POS(&ZCSG(interned_strings… in accel_make_persistent_key()
1292 …char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, STRTAB_STR_TO_POS(&ZCSG(interned_strings… in accel_make_persistent_key()
1378 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in zend_accel_discard_script()
1417 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1470 if (!zend_accel_hash_find(&ZCSG(hash), key)) { in zend_accel_add_key()
1471 if (zend_accel_hash_is_full(&ZCSG(hash))) { in zend_accel_add_key()
1478 if (zend_accel_hash_update(&ZCSG(hash), new_key, 1, bucket)) { in zend_accel_add_key()
1576 bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->script.filename); in cache_script_in_shared_memory()
1598 if (zend_accel_hash_is_full(&ZCSG(hash))) { in cache_script_in_shared_memory()
1651 …bucket = zend_accel_hash_update(&ZCSG(hash), new_persistent_script->script.filename, 0, new_persis… in cache_script_in_shared_memory()
1662 if (zend_accel_hash_update(&ZCSG(hash), new_key, 1, bucket)) { in cache_script_in_shared_memory()
1758 ZCSG(blacklist_misses)++; in opcache_compile_file()
1791 ZCSG(blacklist_misses)++; in opcache_compile_file()
2006 } else if ((ZCSG(restart_in_progress) && accel_restart_is_active())) { in persistent_compile_file()
2041 persistent_script = zend_accel_hash_find(&ZCSG(hash), key); in persistent_compile_file()
2066 bucket = zend_accel_hash_find_entry(&ZCSG(hash), file_handle->opened_path); in persistent_compile_file()
2144 ZCSG(misses)++; in persistent_compile_file()
2147 if (ZSMMG(memory_exhausted) || ZCSG(restart_pending)) { in persistent_compile_file()
2192 ZCSG(hits)++; /* TBFixed: may lose one hit */ in persistent_compile_file()
2196 InterlockedIncrement64(&ZCSG(hits)); in persistent_compile_file()
2199 InterlockedIncrement(&ZCSG(hits)); in persistent_compile_file()
2299 if (ZCSG(map_ptr_last) > CG(map_ptr_last)) { in zend_accel_inheritance_cache_get()
2300 zend_map_ptr_extend(ZCSG(map_ptr_last)); in zend_accel_inheritance_cache_get()
2335 (ZCSG(restart_in_progress) && accel_restart_is_active())) { in zend_accel_inheritance_cache_add()
2357 zend_map_ptr_extend(ZCSG(map_ptr_last)); in zend_accel_inheritance_cache_add()
2396 zend_map_ptr_extend(ZCSG(map_ptr_last)); in zend_accel_inheritance_cache_add()
2455 ZCSG(map_ptr_last) = CG(map_ptr_last); in zend_accel_inheritance_cache_add()
2473 zend_map_ptr_extend(ZCSG(map_ptr_last)); in zend_accel_inheritance_cache_add()
2544 zend_accel_hash_entry *bucket = zend_accel_hash_find_entry(&ZCSG(hash), key); in persistent_zend_resolve_path()
2565 zend_accel_hash_entry *bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path); in persistent_zend_resolve_path()
2601 ZCSG(hits) = 0; in zend_reset_cache_vars()
2602 ZCSG(misses) = 0; in zend_reset_cache_vars()
2603 ZCSG(blacklist_misses) = 0; in zend_reset_cache_vars()
2605 ZCSG(restart_pending) = false; in zend_reset_cache_vars()
2606 ZCSG(force_restart_time) = 0; in zend_reset_cache_vars()
2607 ZCSG(map_ptr_last) = CG(map_ptr_last); in zend_reset_cache_vars()
2683 if (ZCSG(restart_pending)) { in accel_activate()
2685 …if (ZCSG(restart_pending)) { /* check again, to ensure that the cache wasn't already cleaned by an… in accel_activate()
2688 ZCSG(restart_pending) = false; in accel_activate()
2689 switch ZCSG(restart_reason) { in accel_activate()
2691 ZCSG(oom_restarts)++; in accel_activate()
2694 ZCSG(hash_restarts)++; in accel_activate()
2697 ZCSG(manual_restarts)++; in accel_activate()
2704 zend_accel_hash_clean(&ZCSG(hash)); in accel_activate()
2711 if (ZCSG(preload_script)) { in accel_activate()
2719 ZCSG(accelerator_enabled) = ZCSG(cache_status_before_restart); in accel_activate()
2720 if (ZCSG(last_restart_time) < ZCG(request_time)) { in accel_activate()
2721 ZCSG(last_restart_time) = ZCG(request_time); in accel_activate()
2723 ZCSG(last_restart_time)++; in accel_activate()
2731 ZCG(accelerator_enabled) = ZCSG(accelerator_enabled); in accel_activate()
2736 if (ZCG(accelerator_enabled) && ZCSG(last_restart_time) != ZCG(last_restart_time)) { in accel_activate()
2738 ZCG(last_restart_time) = ZCSG(last_restart_time); in accel_activate()
2755 if (ZCSG(preload_script)) { in accel_activate()
2879 zend_accel_hash_init(&ZCSG(hash), ZCG(accel_directives).max_accelerated_files); in zend_accel_init_shm()
2892 ZCSG(interned_strings).nTableMask = in zend_accel_init_shm()
2894 ZCSG(interned_strings).nNumOfElements = 0; in zend_accel_init_shm()
2895 ZCSG(interned_strings).start = in zend_accel_init_shm()
2896 (zend_string*)((char*)&ZCSG(interned_strings) + in zend_accel_init_shm()
2900 ZEND_ASSERT(((uintptr_t)ZCSG(interned_strings).start & 0x7) == 0); /* should be 8 byte aligned */ in zend_accel_init_shm()
2902 ZCSG(interned_strings).top = in zend_accel_init_shm()
2903 ZCSG(interned_strings).start; in zend_accel_init_shm()
2904 ZCSG(interned_strings).end = in zend_accel_init_shm()
2907 …ZEND_ASSERT(((uintptr_t)ZCSG(interned_strings).end - (uintptr_t)&ZCSG(interned_strings)) / ZEND_ST… in zend_accel_init_shm()
2908 ZCSG(interned_strings).saved_top = NULL; in zend_accel_init_shm()
2910 memset((char*)&ZCSG(interned_strings) + sizeof(zend_string_table), in zend_accel_init_shm()
2912 (char*)ZCSG(interned_strings).start - in zend_accel_init_shm()
2913 ((char*)&ZCSG(interned_strings) + sizeof(zend_string_table))); in zend_accel_init_shm()
2915 *STRTAB_HASH_TO_SLOT(&ZCSG(interned_strings), 0) = STRTAB_INVALID_POS; in zend_accel_init_shm()
2927 ZCSG(oom_restarts) = 0; in zend_accel_init_shm()
2928 ZCSG(hash_restarts) = 0; in zend_accel_init_shm()
2929 ZCSG(manual_restarts) = 0; in zend_accel_init_shm()
2931 ZCSG(accelerator_enabled) = true; in zend_accel_init_shm()
2932 ZCSG(start_time) = zend_accel_get_time(); in zend_accel_init_shm()
2933 ZCSG(last_restart_time) = 0; in zend_accel_init_shm()
2934 ZCSG(restart_in_progress) = false; in zend_accel_init_shm()
2937 ZCSG(uninitialized_bucket)[i] = HT_INVALID_IDX; in zend_accel_init_shm()
3273 ZCG(last_restart_time) = ZCSG(last_restart_time);
3395 if (ZCSG(preload_script)) {
3430 if (ZCSG(restart_pending)) {
3444 ZCSG(restart_pending) = true;
3445 ZCSG(restart_reason) = reason;
3446 ZCSG(cache_status_before_restart) = ZCSG(accelerator_enabled);
3447 ZCSG(accelerator_enabled) = false;
3450 ZCSG(force_restart_time) = zend_accel_get_time() + ZCG(accel_directives).force_restart_timeout;
3452 ZCSG(force_restart_time) = 0;
3484 if (ZCSG(restart_in_progress)) {
3543 if (ZCSG(preload_script)->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) {
3544 …zend_accel_set_auto_globals(ZCSG(preload_script)->ping_auto_globals_mask & ~ZCG(auto_globals_mask)…
3550 …zend_accel_hash_update(&ZCSG(hash), ZCSG(preload_script)->script.filename, 0, ZCSG(preload_script)…
3551 if (ZCSG(saved_scripts)) {
3552 zend_persistent_script **p = ZCSG(saved_scripts);
3554 zend_accel_hash_update(&ZCSG(hash), (*p)->script.filename, 0, *p);
4254 if (zend_accel_hash_is_full(&ZCSG(hash))) {
4292 …bucket = zend_accel_hash_update(&ZCSG(hash), new_persistent_script->script.filename, 0, new_persis…
4305 zend_script *script = &ZCSG(preload_script)->script;
4337 if (CG(map_ptr_last) != ZCSG(map_ptr_last)) {
4339 CG(map_ptr_last) = ZCSG(map_ptr_last);
4532 ZCSG(preload_script) = preload_script_in_shared_memory(script);
4544ZCSG(saved_scripts) = zend_shared_alloc((zend_hash_num_elements(preload_scripts) + 1) * sizeof(voi…
4549 ZCSG(saved_scripts)[i++] = preload_script_in_shared_memory(script);
4551 ZCSG(saved_scripts)[i] = NULL;
4787 if (ZCSG(preload_script)) {
4816 if (ZCSG(preload_script)) {