Lines Matching refs:persistent_script

1039 static inline int do_validate_timestamps(zend_persistent_script *persistent_script, zend_file_handl…  in do_validate_timestamps()  argument
1049 if (persistent_script->script.filename != file_handle->opened_path && in do_validate_timestamps()
1050 !zend_string_equal_content(persistent_script->script.filename, file_handle->opened_path)) { in do_validate_timestamps()
1056 persistent_script->script.filename != full_path_ptr && in do_validate_timestamps()
1057 !zend_string_equal_content(persistent_script->script.filename, full_path_ptr)) { in do_validate_timestamps()
1064 if (persistent_script->timestamp == 0) { in do_validate_timestamps()
1072 if (zend_get_file_handle_timestamp(file_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
1084 zend_stream_init_filename(&ps_handle, ZSTR_VAL(persistent_script->script.filename)); in do_validate_timestamps()
1085 ps_handle.opened_path = persistent_script->script.filename; in do_validate_timestamps()
1087 if (zend_get_file_handle_timestamp(&ps_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
1094 int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file… in validate_timestamp_and_record() argument
1096 if (persistent_script->timestamp == 0) { in validate_timestamp_and_record()
1099 persistent_script->dynamic_members.revalidate >= ZCG(request_time)) { in validate_timestamp_and_record()
1101 } else if (do_validate_timestamps(persistent_script, file_handle) == FAILURE) { in validate_timestamp_and_record()
1104persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalida… in validate_timestamp_and_record()
1109 int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *f… in validate_timestamp_and_record_ex() argument
1114 ret = validate_timestamp_and_record(persistent_script, file_handle); in validate_timestamp_and_record_ex()
1290 zend_persistent_script *persistent_script; in zend_accel_invalidate() local
1306 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1307 if (persistent_script && !persistent_script->corrupted) { in zend_accel_invalidate()
1314 do_validate_timestamps(persistent_script, &file_handle) == FAILURE) { in zend_accel_invalidate()
1318 if (!persistent_script->corrupted) { in zend_accel_invalidate()
1319 persistent_script->corrupted = 1; in zend_accel_invalidate()
1320 persistent_script->timestamp = 0; in zend_accel_invalidate()
1321 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in zend_accel_invalidate()
1821 zend_persistent_script *persistent_script; in file_cache_compile_file() local
1847 persistent_script = zend_file_cache_script_load(file_handle); in file_cache_compile_file()
1850 if (persistent_script) { in file_cache_compile_file()
1852 if (persistent_script->script.filename) { in file_cache_compile_file()
1859 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in file_cache_compile_file()
1861 if (persistent_script->is_phar) { in file_cache_compile_file()
1863 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in file_cache_compile_file()
1866 …mcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in file_cache_compile_file()
1875 if (persistent_script->ping_auto_globals_mask) { in file_cache_compile_file()
1876 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in file_cache_compile_file()
1879 return zend_accel_load_script(persistent_script, 1); in file_cache_compile_file()
1882 persistent_script = opcache_compile_file(file_handle, type, NULL, &op_array); in file_cache_compile_file()
1884 if (persistent_script) { in file_cache_compile_file()
1886 persistent_script = cache_script_in_file_cache(persistent_script, &from_memory); in file_cache_compile_file()
1887 return zend_accel_load_script(persistent_script, from_memory); in file_cache_compile_file()
1893 int check_persistent_script_access(zend_persistent_script *persistent_script) in check_persistent_script_access() argument
1897 if ((ZSTR_LEN(persistent_script->script.filename)<sizeof("phar://.phar")) || in check_persistent_script_access()
1898 memcmp(ZSTR_VAL(persistent_script->script.filename), "phar://", sizeof("phar://")-1)) { in check_persistent_script_access()
1900 return access(ZSTR_VAL(persistent_script->script.filename), R_OK) != 0; in check_persistent_script_access()
1904 phar_path = estrdup(ZSTR_VAL(persistent_script->script.filename)+sizeof("phar://")-1); in check_persistent_script_access()
1919 zend_persistent_script *persistent_script = NULL; in persistent_compile_file() local
1960 persistent_script = ZCG(cache_persistent_script); in persistent_compile_file()
1975 persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length); in persistent_compile_file()
1982 if (!persistent_script) { in persistent_compile_file()
2004 persistent_script = (zend_persistent_script *)bucket->data; in persistent_compile_file()
2006 if (key && !persistent_script->corrupted) { in persistent_compile_file()
2024 if (persistent_script && persistent_script->corrupted) { in persistent_compile_file()
2025 persistent_script = NULL; in persistent_compile_file()
2043 if (EXPECTED(persistent_script != NULL) && in persistent_compile_file()
2046 UNEXPECTED(check_persistent_script_access(persistent_script))) { in persistent_compile_file()
2062 if (persistent_script && ZCG(accel_directives).validate_timestamps) { in persistent_compile_file()
2063 if (validate_timestamp_and_record(persistent_script, file_handle) == FAILURE) { in persistent_compile_file()
2065 if (!persistent_script->corrupted) { in persistent_compile_file()
2066 persistent_script->corrupted = 1; in persistent_compile_file()
2067 persistent_script->timestamp = 0; in persistent_compile_file()
2068 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in persistent_compile_file()
2076 persistent_script = NULL; in persistent_compile_file()
2081 if (persistent_script && ZCG(accel_directives).consistency_checks in persistent_compile_file()
2082 && persistent_script->dynamic_members.hits % ZCG(accel_directives).consistency_checks == 0) { in persistent_compile_file()
2084 unsigned int checksum = zend_accel_script_checksum(persistent_script); in persistent_compile_file()
2085 if (checksum != persistent_script->dynamic_members.checksum ) { in persistent_compile_file()
2088 …ZSTR_VAL(persistent_script->script.filename), persistent_script->dynamic_members.checksum, checksu… in persistent_compile_file()
2090 if (!persistent_script->corrupted) { in persistent_compile_file()
2091 persistent_script->corrupted = 1; in persistent_compile_file()
2092 persistent_script->timestamp = 0; in persistent_compile_file()
2093 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in persistent_compile_file()
2101 persistent_script = NULL; in persistent_compile_file()
2106 if (!persistent_script && ZCG(accel_directives).file_cache) { in persistent_compile_file()
2107 persistent_script = zend_file_cache_script_load(file_handle); in persistent_compile_file()
2111 if (!persistent_script) { in persistent_compile_file()
2130 persistent_script = opcache_compile_file(file_handle, type, key, &op_array); in persistent_compile_file()
2138 if (persistent_script) { in persistent_compile_file()
2139persistent_script = cache_script_in_shared_memory(persistent_script, key, key ? key_length : 0, &f… in persistent_compile_file()
2145 if (!persistent_script) { in persistent_compile_file()
2162 persistent_script->dynamic_members.hits++; /* see above */ in persistent_compile_file()
2169 InterlockedIncrement64(&persistent_script->dynamic_members.hits); in persistent_compile_file()
2173 if (persistent_script->script.filename) { in persistent_compile_file()
2180 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in persistent_compile_file()
2182 if (persistent_script->is_phar) { in persistent_compile_file()
2184 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in persistent_compile_file()
2187 …mcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in persistent_compile_file()
2198 persistent_script->dynamic_members.last_used = ZCG(request_time); in persistent_compile_file()
2204 if (persistent_script->ping_auto_globals_mask) { in persistent_compile_file()
2205 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in persistent_compile_file()
2208 return zend_accel_load_script(persistent_script, from_shared_memory); in persistent_compile_file()
2282 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2283 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2285 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()
2286 return zend_string_copy(persistent_script->script.filename); in persistent_zend_resolve_path()
2303 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2304 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2318 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()
4272 zend_persistent_script *persistent_script; in preload_autoload() local
4283 persistent_script = zend_accel_hash_find(&ZCSG(hash), filename); in preload_autoload()
4284 if (!persistent_script) { in preload_autoload()
4290 if (persistent_script->ping_auto_globals_mask) { in preload_autoload()
4291 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in preload_autoload()
4294 op_array = zend_accel_load_script(persistent_script, 1); in preload_autoload()