Lines Matching refs:ZCSG

127 # define INCREMENT(v) InterlockedIncrement64(&ZCSG(v))
128 # define DECREMENT(v) InterlockedDecrement64(&ZCSG(v))
129 # define LOCKVAL(v) (ZCSG(v))
243 ZCSG(restart_in_progress) = 1; in accel_restart_enter()
249 ZCSG(restart_in_progress) = 0; in accel_restart_leave()
258 ZCSG(restart_in_progress) = 0; in accel_restart_leave()
267 if (ZCSG(restart_in_progress)) { in accel_restart_is_active()
276 ZCSG(restart_in_progress) = 0; in accel_restart_is_active()
371 uint idx = ZCSG(interned_strings).nNumUsed; in accel_interned_strings_restore_state()
375 memset(ZCSG(interned_strings_saved_top), in accel_interned_strings_restore_state()
376 0, ZCSG(interned_strings_top) - ZCSG(interned_strings_saved_top)); in accel_interned_strings_restore_state()
377 ZCSG(interned_strings_top) = ZCSG(interned_strings_saved_top); in accel_interned_strings_restore_state()
380 p = ZCSG(interned_strings).arData + idx; in accel_interned_strings_restore_state()
381 if ((char*)p->key < ZCSG(interned_strings_top)) break; in accel_interned_strings_restore_state()
382 ZCSG(interned_strings).nNumUsed--; in accel_interned_strings_restore_state()
383 ZCSG(interned_strings).nNumOfElements--; in accel_interned_strings_restore_state()
385 nIndex = p->h | ZCSG(interned_strings).nTableMask; in accel_interned_strings_restore_state()
386 if (HT_HASH(&ZCSG(interned_strings), nIndex) == HT_IDX_TO_HASH(idx)) { in accel_interned_strings_restore_state()
387 HT_HASH(&ZCSG(interned_strings), nIndex) = Z_NEXT(p->val); in accel_interned_strings_restore_state()
389 uint32_t prev = HT_HASH(&ZCSG(interned_strings), nIndex); in accel_interned_strings_restore_state()
390 while (Z_NEXT(HT_HASH_TO_BUCKET(&ZCSG(interned_strings), prev)->val) != idx) { in accel_interned_strings_restore_state()
391 prev = Z_NEXT(HT_HASH_TO_BUCKET(&ZCSG(interned_strings), prev)->val); in accel_interned_strings_restore_state()
393 Z_NEXT(HT_HASH_TO_BUCKET(&ZCSG(interned_strings), prev)->val) = Z_NEXT(p->val); in accel_interned_strings_restore_state()
400 ZCSG(interned_strings_saved_top) = ZCSG(interned_strings_top); in accel_interned_strings_save_state()
425 nIndex = h | ZCSG(interned_strings).nTableMask; in accel_find_interned_string()
428 idx = HT_HASH(&ZCSG(interned_strings), nIndex); in accel_find_interned_string()
429 arData = ZCSG(interned_strings).arData; in accel_find_interned_string()
465 nIndex = h | ZCSG(interned_strings).nTableMask; in accel_new_interned_string()
468 idx = HT_HASH(&ZCSG(interned_strings), nIndex); in accel_new_interned_string()
470 p = HT_HASH_TO_BUCKET(&ZCSG(interned_strings), idx); in accel_new_interned_string()
480 if (ZCSG(interned_strings_top) + ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(ZSTR_LEN(str))) >= in accel_new_interned_string()
481 ZCSG(interned_strings_end)) { in accel_new_interned_string()
489 idx = ZCSG(interned_strings).nNumUsed++; in accel_new_interned_string()
490 ZCSG(interned_strings).nNumOfElements++; in accel_new_interned_string()
491 p = ZCSG(interned_strings).arData + idx; in accel_new_interned_string()
492 p->key = (zend_string*) ZCSG(interned_strings_top); in accel_new_interned_string()
493 ZCSG(interned_strings_top) += ZEND_MM_ALIGNED_SIZE(_ZSTR_STRUCT_SIZE(ZSTR_LEN(str))); in accel_new_interned_string()
507 Z_NEXT(p->val) = HT_HASH(&ZCSG(interned_strings), nIndex); in accel_new_interned_string()
508 HT_HASH(&ZCSG(interned_strings), nIndex) = HT_IDX_TO_HASH(idx); in accel_new_interned_string()
632 ZCSG(force_restart_time) = 0; in kill_all_lockers()
663 ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */ in kill_all_lockers()
704 && ZCSG(force_restart_time) in accel_is_inactive()
705 && time(NULL) >= ZCSG(force_restart_time)) { in accel_is_inactive()
1019 if ((ZCG(counted) || ZCSG(accelerator_enabled))) { in accel_make_persistent_key()
1037 …char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, ZSTR_VAL(str) - ZCSG(interned_strings_st… in accel_make_persistent_key()
1061 if ((ZCG(counted) || ZCSG(accelerator_enabled))) { in accel_make_persistent_key()
1078 …char *res = zend_print_long_to_buf(buf + sizeof(buf) - 1, ZSTR_VAL(str) - ZCSG(interned_strings_st… in accel_make_persistent_key()
1145 …if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled) || accelerator_shm_read_lock(… in zend_accel_invalidate()
1161 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1181 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in zend_accel_invalidate()
1200 if (!zend_accel_hash_str_find(&ZCSG(hash), key, key_length)) { in zend_accel_add_key()
1201 if (zend_accel_hash_is_full(&ZCSG(hash))) { in zend_accel_add_key()
1209 if (zend_accel_hash_update(&ZCSG(hash), new_key, key_length, 1, bucket)) { in zend_accel_add_key()
1306 bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->script.filename); in cache_script_in_shared_memory()
1321 if (zend_accel_hash_is_full(&ZCSG(hash))) { in cache_script_in_shared_memory()
1382 …bucket = zend_accel_hash_update(&ZCSG(hash), ZSTR_VAL(new_persistent_script->script.filename), ZST… in cache_script_in_shared_memory()
1391 if (zend_accel_hash_update(&ZCSG(hash), key, key_length, 1, bucket)) { in cache_script_in_shared_memory()
1505 ZCSG(blacklist_misses)++; in opcache_compile_file()
1536 ZCSG(blacklist_misses)++; in opcache_compile_file()
1710 } else if ((!ZCG(counted) && !ZCSG(accelerator_enabled)) || in persistent_compile_file()
1711 (ZCSG(restart_in_progress) && accel_restart_is_active())) { in persistent_compile_file()
1745 persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length); in persistent_compile_file()
1767 bucket = zend_accel_hash_find_entry(&ZCSG(hash), file_handle->opened_path); in persistent_compile_file()
1837 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in persistent_compile_file()
1862 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in persistent_compile_file()
1884 ZCSG(misses)++; in persistent_compile_file()
1887 if (ZSMMG(memory_exhausted) || ZCSG(restart_pending)) { in persistent_compile_file()
1926 ZCSG(hits)++; /* TBFixed: may lose one hit */ in persistent_compile_file()
1930 InterlockedIncrement64(&ZCSG(hits)); in persistent_compile_file()
1932 InterlockedIncrement(&ZCSG(hits)); in persistent_compile_file()
2009 (ZCG(counted) || ZCSG(accelerator_enabled)) && in persistent_zend_resolve_path()
2010 !ZCSG(restart_in_progress)) { in persistent_zend_resolve_path()
2031 zend_accel_hash_entry *bucket = zend_accel_hash_str_find_entry(&ZCSG(hash), key, key_length); in persistent_zend_resolve_path()
2052 zend_accel_hash_entry *bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path); in persistent_zend_resolve_path()
2088 ZCSG(hits) = 0; in zend_reset_cache_vars()
2089 ZCSG(misses) = 0; in zend_reset_cache_vars()
2090 ZCSG(blacklist_misses) = 0; in zend_reset_cache_vars()
2092 ZCSG(restart_pending) = 0; in zend_reset_cache_vars()
2093 ZCSG(force_restart_time) = 0; in zend_reset_cache_vars()
2181 if (ZCSG(restart_pending)) { in accel_activate()
2183 …if (ZCSG(restart_pending) != 0) { /* check again, to ensure that the cache wasn't already cleaned … in accel_activate()
2186 ZCSG(restart_pending) = 0; in accel_activate()
2187 switch ZCSG(restart_reason) { in accel_activate()
2189 ZCSG(oom_restarts)++; in accel_activate()
2192 ZCSG(hash_restarts)++; in accel_activate()
2195 ZCSG(manual_restarts)++; in accel_activate()
2201 zend_accel_hash_clean(&ZCSG(hash)); in accel_activate()
2210 ZCSG(accelerator_enabled) = ZCSG(cache_status_before_restart); in accel_activate()
2211 if (ZCSG(last_restart_time) < ZCG(request_time)) { in accel_activate()
2212 ZCSG(last_restart_time) = ZCG(request_time); in accel_activate()
2214 ZCSG(last_restart_time)++; in accel_activate()
2227 if (ZCSG(last_restart_time) != ZCG(last_restart_time)) { in accel_activate()
2229 ZCG(last_restart_time) = ZCSG(last_restart_time); in accel_activate()
2542 zend_accel_hash_init(&ZCSG(hash), ZCG(accel_directives).max_accelerated_files); in zend_accel_init_shm()
2544 ZCSG(interned_strings_start) = ZCSG(interned_strings_end) = NULL; in zend_accel_init_shm()
2546 …zend_hash_init(&ZCSG(interned_strings), (ZCG(accel_directives).interned_strings_buffer * 1024 * 10… in zend_accel_init_shm()
2550 ZCSG(interned_strings).nTableMask = -ZCSG(interned_strings).nTableSize; in zend_accel_init_shm()
2551 data = zend_shared_alloc(HT_SIZE(&ZCSG(interned_strings))); in zend_accel_init_shm()
2552ZCSG(interned_strings_start) = zend_shared_alloc((ZCG(accel_directives).interned_strings_buffer * … in zend_accel_init_shm()
2553 if (!data || !ZCSG(interned_strings_start)) { in zend_accel_init_shm()
2558 HT_SET_DATA_ADDR(&ZCSG(interned_strings), data); in zend_accel_init_shm()
2559 HT_HASH_RESET(&ZCSG(interned_strings)); in zend_accel_init_shm()
2560ZCSG(interned_strings_end) = ZCSG(interned_strings_start) + (ZCG(accel_directives).interned_stri… in zend_accel_init_shm()
2561 ZCSG(interned_strings_top) = ZCSG(interned_strings_start); in zend_accel_init_shm()
2586 ZCSG(oom_restarts) = 0; in zend_accel_init_shm()
2587 ZCSG(hash_restarts) = 0; in zend_accel_init_shm()
2588 ZCSG(manual_restarts) = 0; in zend_accel_init_shm()
2590 ZCSG(accelerator_enabled) = 1; in zend_accel_init_shm()
2591 ZCSG(start_time) = zend_accel_get_time(); in zend_accel_init_shm()
2592 ZCSG(last_restart_time) = 0; in zend_accel_init_shm()
2593 ZCSG(restart_in_progress) = 0; in zend_accel_init_shm()
2597 ZCSG(uninitialized_bucket)[i] = HT_INVALID_IDX; in zend_accel_init_shm()
2869 ZCG(last_restart_time) = ZCSG(last_restart_time);
3006 if (ZCSG(restart_pending)) {
3015 ZCSG(restart_pending) = 1;
3016 ZCSG(restart_reason) = reason;
3017 ZCSG(cache_status_before_restart) = ZCSG(accelerator_enabled);
3018 ZCSG(accelerator_enabled) = 0;
3021 ZCSG(force_restart_time) = zend_accel_get_time() + ZCG(accel_directives).force_restart_timeout;
3023 ZCSG(force_restart_time) = 0;
3053 if (ZCSG(restart_in_progress)) {