Lines Matching refs:ZCSG

116 # define INCREMENT(v) InterlockedIncrement(&ZCSG(v))
117 # define DECREMENT(v) InterlockedDecrement(&ZCSG(v))
118 # define LOCKVAL(v) (ZCSG(v))
210 (ZCG(counted) || ZCSG(accelerator_enabled))) { in ZEND_INI_MH()
212 …ZCG(include_path_key) = zend_accel_hash_find(&ZCSG(include_paths), ZCG(include_path), ZCG(include_… in ZEND_INI_MH()
214 !zend_accel_hash_is_full(&ZCSG(include_paths))) { in ZEND_INI_MH()
218 …ZCG(include_path_key) = zend_accel_hash_find(&ZCSG(include_paths), ZCG(include_path), ZCG(include_… in ZEND_INI_MH()
220 !zend_accel_hash_is_full(&ZCSG(include_paths))) { in ZEND_INI_MH()
226 key[ZCG(include_path_len) + 1] = 'A' + ZCSG(include_paths).num_entries; in ZEND_INI_MH()
228 …zend_accel_hash_update(&ZCSG(include_paths), key, ZCG(include_path_len) + 1, 0, ZCG(include_path_k… in ZEND_INI_MH()
278 for (i = 0; i < ZCSG(interned_strings).nTableSize; i++) { in accel_interned_strings_restore_state()
279 ZCSG(interned_strings).arBuckets[i] = ZCSG(interned_strings_saved_state).arBuckets[i]; in accel_interned_strings_restore_state()
280 if (ZCSG(interned_strings).arBuckets[i]) { in accel_interned_strings_restore_state()
281 ZCSG(interned_strings).arBuckets[i]->pLast = NULL; in accel_interned_strings_restore_state()
284 ZCSG(interned_strings).pListHead = ZCSG(interned_strings_saved_state).pListHead; in accel_interned_strings_restore_state()
285 ZCSG(interned_strings).pListTail = ZCSG(interned_strings_saved_state).pListTail; in accel_interned_strings_restore_state()
286 if (ZCSG(interned_strings).pListHead) { in accel_interned_strings_restore_state()
287 ZCSG(interned_strings).pListHead->pListLast = NULL; in accel_interned_strings_restore_state()
289 if (ZCSG(interned_strings).pListTail) { in accel_interned_strings_restore_state()
290 ZCSG(interned_strings).pListTail->pListNext = NULL; in accel_interned_strings_restore_state()
292 ZCSG(interned_strings_top) = ZCSG(interned_strings_saved_state).top; in accel_interned_strings_restore_state()
297ZCSG(interned_strings_saved_state).arBuckets = (Bucket**)zend_shared_alloc(ZCSG(interned_strings).… in accel_interned_strings_save_state()
298 if (!ZCSG(interned_strings_saved_state).arBuckets) { in accel_interned_strings_save_state()
301 …memcpy(ZCSG(interned_strings_saved_state).arBuckets, ZCSG(interned_strings).arBuckets, ZCSG(intern… in accel_interned_strings_save_state()
302 ZCSG(interned_strings_saved_state).pListHead = ZCSG(interned_strings).pListHead; in accel_interned_strings_save_state()
303 ZCSG(interned_strings_saved_state).pListTail = ZCSG(interned_strings).pListTail; in accel_interned_strings_save_state()
304 ZCSG(interned_strings_saved_state).top = ZCSG(interned_strings_top); in accel_interned_strings_save_state()
316 if (arKey >= ZCSG(interned_strings_start) && arKey < ZCSG(interned_strings_end)) { in accel_new_interned_string()
322 nIndex = h & ZCSG(interned_strings).nTableMask; in accel_new_interned_string()
325 p = ZCSG(interned_strings).arBuckets[nIndex]; in accel_new_interned_string()
338 if (ZCSG(interned_strings_top) + ZEND_MM_ALIGNED_SIZE(sizeof(Bucket) + nKeyLength) >= in accel_new_interned_string()
339 ZCSG(interned_strings_end)) { in accel_new_interned_string()
346 p = (Bucket *) ZCSG(interned_strings_top); in accel_new_interned_string()
347 ZCSG(interned_strings_top) += ZEND_MM_ALIGNED_SIZE(sizeof(Bucket) + nKeyLength); in accel_new_interned_string()
356 p->pNext = ZCSG(interned_strings).arBuckets[nIndex]; in accel_new_interned_string()
361 ZCSG(interned_strings).arBuckets[nIndex] = p; in accel_new_interned_string()
363 p->pListLast = ZCSG(interned_strings).pListTail; in accel_new_interned_string()
364 ZCSG(interned_strings).pListTail = p; in accel_new_interned_string()
369 if (!ZCSG(interned_strings).pListHead) { in accel_new_interned_string()
370 ZCSG(interned_strings).pListHead = p; in accel_new_interned_string()
373 ZCSG(interned_strings).nNumOfElements++; in accel_new_interned_string()
482 ZCSG(restart_in_progress) = 1; in accel_restart_enter()
488 ZCSG(restart_in_progress) = 0; in accel_restart_leave()
493 ZCSG(restart_in_progress) = 0; in accel_restart_leave()
502 if (ZCSG(restart_in_progress)) { in accel_restart_is_active()
511 ZCSG(restart_in_progress) = 0; in accel_restart_is_active()
573 ZCSG(force_restart_time) = 0; in kill_all_lockers()
590 ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */ in kill_all_lockers()
629 && ZCSG(force_restart_time) in accel_is_inactive()
630 && time(NULL) >= ZCSG(force_restart_time)) { in accel_is_inactive()
956 (ZCG(counted) || ZCSG(accelerator_enabled)) && in accel_make_persistent_key_ex()
957 !zend_accel_hash_find(&ZCSG(include_paths), ZCG(include_path), ZCG(include_path_len) + 1) && in accel_make_persistent_key_ex()
958 !zend_accel_hash_is_full(&ZCSG(include_paths))) { in accel_make_persistent_key_ex()
963 …ZCG(include_path_key) = zend_accel_hash_find(&ZCSG(include_paths), ZCG(include_path), ZCG(include_… in accel_make_persistent_key_ex()
967 } else if (!zend_accel_hash_is_full(&ZCSG(include_paths))) { in accel_make_persistent_key_ex()
973 key[ZCG(include_path_len) + 1] = 'A' + ZCSG(include_paths).num_entries; in accel_make_persistent_key_ex()
975 …zend_accel_hash_update(&ZCSG(include_paths), key, ZCG(include_path_len) + 1, 0, ZCG(include_path_k… in accel_make_persistent_key_ex()
1056 …if (!ZCG(enabled) || !accel_startup_ok || !ZCSG(accelerator_enabled) || accelerator_shm_read_lock(… in zend_accel_invalidate()
1070 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath, strlen(realpath) + 1); in zend_accel_invalidate()
1089 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM; in zend_accel_invalidate()
1107 if (!zend_accel_hash_find(&ZCSG(hash), key, key_length + 1)) { in zend_accel_add_key()
1108 if (zend_accel_hash_is_full(&ZCSG(hash))) { in zend_accel_add_key()
1116 if (zend_accel_hash_update(&ZCSG(hash), new_key, key_length + 1, 1, bucket)) { in zend_accel_add_key()
1143 if (zend_accel_hash_is_full(&ZCSG(hash))) { in cache_script_in_shared_memory()
1154 …bucket = zend_accel_hash_find_entry(&ZCSG(hash), new_persistent_script->full_path, new_persistent_… in cache_script_in_shared_memory()
1201 …bucket = zend_accel_hash_update(&ZCSG(hash), new_persistent_script->full_path, new_persistent_scri… in cache_script_in_shared_memory()
1210 if (zend_accel_hash_update(&ZCSG(hash), key, key_length + 1, 1, bucket)) { in cache_script_in_shared_memory()
1321 ZCSG(blacklist_misses)++; in compile_and_cache_file()
1352 ZCSG(blacklist_misses)++; in compile_and_cache_file()
1461 (!ZCG(counted) && !ZCSG(accelerator_enabled)) ||
1463 (ZCSG(restart_in_progress) && accel_restart_is_active(TSRMLS_C)) ||
1509 persistent_script = zend_accel_hash_find(&ZCSG(hash), key, key_length + 1);
1539 …(bucket = zend_accel_hash_find_entry(&ZCSG(hash), file_handle->opened_path, strlen(file_handle->op…
1574 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM;
1599 zend_accel_hash_is_full(&ZCSG(hash)) ? ACCEL_RESTART_HASH : ACCEL_RESTART_OOM;
1613 ZCSG(misses)++;
1616 if (ZSMMG(memory_exhausted) || ZCSG(restart_pending)) {
1637 ZCSG(hits)++; /* TBFixed: may lose one hit */
1640 InterlockedIncrement(&ZCSG(hits));
1804 (ZCG(counted) || ZCSG(accelerator_enabled)) &&
1806 !ZCSG(restart_in_progress)) {
1833 …(persistent_script = zend_accel_hash_find(&ZCSG(hash), (char*)filename, filename_len + 1)) != NULL…
1849 (persistent_script = zend_accel_hash_find(&ZCSG(hash), key, key_length + 1)) != NULL &&
1864 …(bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path, strlen(resolved_path) + 1)) != NU…
1900 (ZCG(counted) || ZCSG(accelerator_enabled)) &&
1902 !ZCSG(restart_in_progress)) {
1941 …(persistent_script = zend_accel_hash_find(&ZCSG(hash), (char*)filename, filename_len + 1)) != NULL…
1965 (ZCG(counted) || ZCSG(accelerator_enabled)) &&
1967 !ZCSG(restart_in_progress)) {
1994 … (bucket = zend_accel_hash_find_entry(&ZCSG(hash), (char*)filename, filename_len + 1)) != NULL) {
2012 (persistent_script = zend_accel_hash_find(&ZCSG(hash), key, key_length + 1)) != NULL &&
2026 …(bucket = zend_accel_hash_find_entry(&ZCSG(hash), resolved_path, strlen(resolved_path) + 1)) != NU…
2058 ZCSG(hits) = 0;
2059 ZCSG(misses) = 0;
2060 ZCSG(blacklist_misses) = 0;
2062 ZCSG(restart_pending) = 0;
2063 ZCSG(force_restart_time) = 0;
2091 if (ZCSG(restart_pending)) {
2093 …if (ZCSG(restart_pending) != 0) { /* check again, to ensure that the cache wasn't already cleaned …
2096 ZCSG(restart_pending) = 0;
2097 switch ZCSG(restart_reason) {
2099 ZCSG(oom_restarts)++;
2102 ZCSG(hash_restarts)++;
2105 ZCSG(manual_restarts)++;
2111 zend_accel_hash_clean(&ZCSG(hash));
2114 if (ZCSG(include_paths).num_entries > 1) {
2115 ZCSG(include_paths).num_entries = 1;
2116 ZCSG(include_paths).num_direct_entries = 1;
2117 …memset(ZCSG(include_paths).hash_table, 0, sizeof(zend_accel_hash_entry*) * ZCSG(include_paths).max…
2118ZCSG(include_paths).hash_table[zend_inline_hash_func(ZCSG(include_paths).hash_entries[0].key, ZCSG
2128 ZCSG(accelerator_enabled) = ZCSG(cache_status_before_restart);
2129 ZCSG(last_restart_time) = ZCG(request_time);
2430 zend_accel_hash_init(&ZCSG(hash), ZCG(accel_directives).max_accelerated_files);
2431 zend_accel_hash_init(&ZCSG(include_paths), 32);
2435 ZCSG(interned_strings_start) = ZCSG(interned_strings_end) = NULL;
2437 …zend_hash_init(&ZCSG(interned_strings), (ZCG(accel_directives).interned_strings_buffer * 1024 * 10…
2439 ZCSG(interned_strings).nTableMask = ZCSG(interned_strings).nTableSize - 1;
2440ZCSG(interned_strings).arBuckets = zend_shared_alloc(ZCSG(interned_strings).nTableSize * sizeof(Bu…
2441ZCSG(interned_strings_start) = zend_shared_alloc((ZCG(accel_directives).interned_strings_buffer * …
2442 if (!ZCSG(interned_strings).arBuckets || !ZCSG(interned_strings_start)) {
2446ZCSG(interned_strings_end) = ZCSG(interned_strings_start) + (ZCG(accel_directives).interned_stri…
2447 ZCSG(interned_strings_top) = ZCSG(interned_strings_start);
2451 CG(interned_strings_start) = ZCSG(interned_strings_start);
2452 CG(interned_strings_end) = ZCSG(interned_strings_end);
2474 ZCSG(oom_restarts) = 0;
2475 ZCSG(hash_restarts) = 0;
2476 ZCSG(manual_restarts) = 0;
2478 ZCSG(accelerator_enabled) = 1;
2479 ZCSG(start_time) = zend_accel_get_time();
2480 ZCSG(last_restart_time) = 0;
2481 ZCSG(restart_in_progress) = 0;
2562 CG(interned_strings_start) = ZCSG(interned_strings_start);
2563 CG(interned_strings_end) = ZCSG(interned_strings_end);
2615 …ZCG(include_path_key) = zend_accel_hash_find(&ZCSG(include_paths), ZCG(include_path), ZCG(include_…
2617 !zend_accel_hash_is_full(&ZCSG(include_paths))) {
2624 key[ZCG(include_path_len) + 1] = 'A' + ZCSG(include_paths).num_entries;
2626 …zend_accel_hash_update(&ZCSG(include_paths), key, ZCG(include_path_len) + 1, 0, ZCG(include_path_k…
2714 if (ZCSG(restart_pending)) {
2721 ZCSG(restart_pending) = 1;
2722 ZCSG(restart_reason) = reason;
2723 ZCSG(cache_status_before_restart) = ZCSG(accelerator_enabled);
2724 ZCSG(accelerator_enabled) = 0;
2727 ZCSG(force_restart_time) = zend_accel_get_time() + ZCG(accel_directives).force_restart_timeout;
2729 ZCSG(force_restart_time) = 0;
2756 if (ZCSG(restart_in_progress)) {
2780 ZCSG(accelerator_enabled) &&
2782 !ZCSG(restart_pending)) {