Lines Matching refs:persistent_script

1106 static inline int do_validate_timestamps(zend_persistent_script *persistent_script, zend_file_handl…  in do_validate_timestamps()  argument
1117 if (persistent_script->script.filename != file_handle->opened_path && in do_validate_timestamps()
1118 !zend_string_equal_content(persistent_script->script.filename, file_handle->opened_path)) { in do_validate_timestamps()
1124 persistent_script->script.filename != full_path_ptr && in do_validate_timestamps()
1125 !zend_string_equal_content(persistent_script->script.filename, full_path_ptr)) { in do_validate_timestamps()
1132 if (persistent_script->timestamp == 0) { in do_validate_timestamps()
1140 if (zend_get_file_handle_timestamp(file_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
1152 zend_stream_init_filename_ex(&ps_handle, persistent_script->script.filename); in do_validate_timestamps()
1153 ps_handle.opened_path = persistent_script->script.filename; in do_validate_timestamps()
1155 ret = zend_get_file_handle_timestamp(&ps_handle, NULL) == persistent_script->timestamp in do_validate_timestamps()
1163 zend_result validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_hand… in validate_timestamp_and_record() argument
1165 if (persistent_script->timestamp == 0) { in validate_timestamp_and_record()
1168 persistent_script->dynamic_members.revalidate >= ZCG(request_time)) { in validate_timestamp_and_record()
1170 } else if (do_validate_timestamps(persistent_script, file_handle) == FAILURE) { in validate_timestamp_and_record()
1173persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalida… in validate_timestamp_and_record()
1178 zend_result validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_h… in validate_timestamp_and_record_ex() argument
1181 const zend_result ret = validate_timestamp_and_record(persistent_script, file_handle); in validate_timestamp_and_record_ex()
1366 static void zend_accel_discard_script(zend_persistent_script *persistent_script) in zend_accel_discard_script() argument
1368 if (persistent_script->corrupted) { in zend_accel_discard_script()
1373 persistent_script->corrupted = true; in zend_accel_discard_script()
1374 persistent_script->timestamp = 0; in zend_accel_discard_script()
1375 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in zend_accel_discard_script()
1387 static void zend_accel_lock_discard_script(zend_persistent_script *persistent_script) in zend_accel_lock_discard_script() argument
1390 zend_accel_discard_script(persistent_script); in zend_accel_lock_discard_script()
1397 zend_persistent_script *persistent_script; in zend_accel_invalidate() local
1417 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1418 if (persistent_script && !persistent_script->corrupted) { in zend_accel_invalidate()
1425 do_validate_timestamps(persistent_script, &file_handle) == FAILURE) { in zend_accel_invalidate()
1428 zend_accel_lock_discard_script(persistent_script); in zend_accel_invalidate()
1893 zend_persistent_script *persistent_script; in file_cache_compile_file() local
1918 persistent_script = zend_file_cache_script_load(file_handle); in file_cache_compile_file()
1921 if (persistent_script) { in file_cache_compile_file()
1923 if (persistent_script->script.filename) { in file_cache_compile_file()
1930 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in file_cache_compile_file()
1932 if (persistent_script->is_phar) { in file_cache_compile_file()
1934 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in file_cache_compile_file()
1937 …mcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in file_cache_compile_file()
1944 replay_warnings(persistent_script->num_warnings, persistent_script->warnings); in file_cache_compile_file()
1946 if (persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) { in file_cache_compile_file()
1947 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)); in file_cache_compile_file()
1950 return zend_accel_load_script(persistent_script, 1); in file_cache_compile_file()
1953 persistent_script = opcache_compile_file(file_handle, type, &op_array); in file_cache_compile_file()
1955 if (persistent_script) { in file_cache_compile_file()
1957 persistent_script = cache_script_in_file_cache(persistent_script, &from_memory); in file_cache_compile_file()
1958 return zend_accel_load_script(persistent_script, from_memory); in file_cache_compile_file()
1964 static int check_persistent_script_access(zend_persistent_script *persistent_script) in check_persistent_script_access() argument
1967 if ((ZSTR_LEN(persistent_script->script.filename)<sizeof("phar://.phar")) || in check_persistent_script_access()
1968 memcmp(ZSTR_VAL(persistent_script->script.filename), "phar://", sizeof("phar://")-1)) { in check_persistent_script_access()
1970 return access(ZSTR_VAL(persistent_script->script.filename), R_OK) != 0; in check_persistent_script_access()
1974 phar_path = estrdup(ZSTR_VAL(persistent_script->script.filename)+sizeof("phar://")-1); in check_persistent_script_access()
1988 zend_persistent_script *persistent_script = NULL; in persistent_compile_file() local
2027 persistent_script = ZCG(cache_persistent_script); in persistent_compile_file()
2041 persistent_script = zend_accel_hash_find(&ZCSG(hash), key); in persistent_compile_file()
2048 if (!persistent_script) { in persistent_compile_file()
2069 persistent_script = (zend_persistent_script *)bucket->data; in persistent_compile_file()
2071 if (key && !persistent_script->corrupted) { in persistent_compile_file()
2089 if (persistent_script && persistent_script->corrupted) { in persistent_compile_file()
2090 persistent_script = NULL; in persistent_compile_file()
2108 if (EXPECTED(persistent_script != NULL) && in persistent_compile_file()
2111 UNEXPECTED(check_persistent_script_access(persistent_script))) { in persistent_compile_file()
2126 if (persistent_script && ZCG(accel_directives).validate_timestamps) { in persistent_compile_file()
2127 if (validate_timestamp_and_record(persistent_script, file_handle) == FAILURE) { in persistent_compile_file()
2128 zend_accel_lock_discard_script(persistent_script); in persistent_compile_file()
2129 persistent_script = NULL; in persistent_compile_file()
2134 if (!persistent_script && ZCG(accel_directives).file_cache) { in persistent_compile_file()
2135 persistent_script = zend_file_cache_script_load(file_handle); in persistent_compile_file()
2139 if (!persistent_script) { in persistent_compile_file()
2158 persistent_script = opcache_compile_file(file_handle, type, &op_array); in persistent_compile_file()
2166 if (persistent_script) { in persistent_compile_file()
2167 persistent_script = cache_script_in_shared_memory(persistent_script, key, &from_shared_memory); in persistent_compile_file()
2173 if (!persistent_script) { in persistent_compile_file()
2186 persistent_script->dynamic_members.last_used = ZCG(request_time); in persistent_compile_file()
2193 persistent_script->dynamic_members.hits++; /* see above */ in persistent_compile_file()
2197 InterlockedIncrement64(&persistent_script->dynamic_members.hits); in persistent_compile_file()
2200 InterlockedIncrement(&persistent_script->dynamic_members.hits); in persistent_compile_file()
2205 if (persistent_script->script.filename) { in persistent_compile_file()
2213 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in persistent_compile_file()
2215 if (persistent_script->is_phar) { in persistent_compile_file()
2217 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in persistent_compile_file()
2220 …mcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in persistent_compile_file()
2227 persistent_script->dynamic_members.last_used = ZCG(request_time); in persistent_compile_file()
2231 replay_warnings(persistent_script->num_warnings, persistent_script->warnings); in persistent_compile_file()
2236 if (persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)) { in persistent_compile_file()
2237 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask & ~ZCG(auto_globals_mask)); in persistent_compile_file()
2240 return zend_accel_load_script(persistent_script, from_shared_memory); in persistent_compile_file()
2546 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2547 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2549 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()
2550 return zend_string_copy(persistent_script->script.filename); in persistent_zend_resolve_path()
2567 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2568 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2582 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()