Lines Matching refs:persistent_script
895 static inline int do_validate_timestamps(zend_persistent_script *persistent_script, zend_file_handl… in do_validate_timestamps() argument
905 if (persistent_script->script.filename != file_handle->opened_path && in do_validate_timestamps()
906 (ZSTR_LEN(persistent_script->script.filename) != ZSTR_LEN(file_handle->opened_path) || in do_validate_timestamps()
907 …memcmp(ZSTR_VAL(persistent_script->script.filename), ZSTR_VAL(file_handle->opened_path), ZSTR_LEN(… in do_validate_timestamps()
913 persistent_script->script.filename != full_path_ptr && in do_validate_timestamps()
914 (ZSTR_LEN(persistent_script->script.filename) != ZSTR_LEN(full_path_ptr) || in do_validate_timestamps()
915 …memcmp(ZSTR_VAL(persistent_script->script.filename), ZSTR_VAL(full_path_ptr), ZSTR_LEN(full_path_p… in do_validate_timestamps()
922 if (persistent_script->timestamp == 0) { in do_validate_timestamps()
930 if (zend_get_file_handle_timestamp(file_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
943 ps_handle.filename = ZSTR_VAL(persistent_script->script.filename); in do_validate_timestamps()
944 ps_handle.opened_path = persistent_script->script.filename; in do_validate_timestamps()
946 if (zend_get_file_handle_timestamp(&ps_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
953 int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file… in validate_timestamp_and_record() argument
956 persistent_script->dynamic_members.revalidate >= ZCG(request_time)) { in validate_timestamp_and_record()
958 } else if (do_validate_timestamps(persistent_script, file_handle) == FAILURE) { in validate_timestamp_and_record()
961 …persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalida… in validate_timestamp_and_record()
966 int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *f… in validate_timestamp_and_record_ex() argument
971 ret = validate_timestamp_and_record(persistent_script, file_handle); in validate_timestamp_and_record_ex()
1143 zend_persistent_script *persistent_script; in zend_accel_invalidate() local
1161 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1162 if (persistent_script && !persistent_script->corrupted) { in zend_accel_invalidate()
1171 do_validate_timestamps(persistent_script, &file_handle) == FAILURE) { in zend_accel_invalidate()
1175 if (!persistent_script->corrupted) { in zend_accel_invalidate()
1176 persistent_script->corrupted = 1; in zend_accel_invalidate()
1177 persistent_script->timestamp = 0; in zend_accel_invalidate()
1178 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in zend_accel_invalidate()
1624 zend_persistent_script *persistent_script; in file_cache_compile_file() local
1648 persistent_script = zend_file_cache_script_load(file_handle); in file_cache_compile_file()
1651 if (persistent_script) { in file_cache_compile_file()
1653 if (persistent_script->script.filename) { in file_cache_compile_file()
1660 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in file_cache_compile_file()
1662 if (persistent_script->is_phar) { in file_cache_compile_file()
1664 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in file_cache_compile_file()
1667 …mcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in file_cache_compile_file()
1676 if (persistent_script->ping_auto_globals_mask) { in file_cache_compile_file()
1677 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in file_cache_compile_file()
1680 return zend_accel_load_script(persistent_script, 1); in file_cache_compile_file()
1683 persistent_script = opcache_compile_file(file_handle, type, NULL, &op_array); in file_cache_compile_file()
1685 if (persistent_script) { in file_cache_compile_file()
1687 persistent_script = cache_script_in_file_cache(persistent_script, &from_memory); in file_cache_compile_file()
1688 return zend_accel_load_script(persistent_script, from_memory); in file_cache_compile_file()
1698 zend_persistent_script *persistent_script = NULL; in persistent_compile_file() local
1732 persistent_script = ZCG(cache_persistent_script); in persistent_compile_file()
1745 persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length); in persistent_compile_file()
1750 if (!persistent_script) { in persistent_compile_file()
1770 persistent_script = (zend_persistent_script *)bucket->data; in persistent_compile_file()
1772 if (key && !persistent_script->corrupted) { in persistent_compile_file()
1790 if (persistent_script && persistent_script->corrupted) { in persistent_compile_file()
1791 persistent_script = NULL; in persistent_compile_file()
1811 if (EXPECTED(persistent_script != NULL) && in persistent_compile_file()
1814 UNEXPECTED(access(ZSTR_VAL(persistent_script->script.filename), R_OK) != 0)) { in persistent_compile_file()
1828 if (persistent_script && ZCG(accel_directives).validate_timestamps) { in persistent_compile_file()
1829 if (validate_timestamp_and_record(persistent_script, file_handle) == FAILURE) { in persistent_compile_file()
1831 if (!persistent_script->corrupted) { in persistent_compile_file()
1832 persistent_script->corrupted = 1; in persistent_compile_file()
1833 persistent_script->timestamp = 0; in persistent_compile_file()
1834 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in persistent_compile_file()
1842 persistent_script = NULL; in persistent_compile_file()
1847 if (persistent_script && ZCG(accel_directives).consistency_checks in persistent_compile_file()
1848 && persistent_script->dynamic_members.hits % ZCG(accel_directives).consistency_checks == 0) { in persistent_compile_file()
1850 unsigned int checksum = zend_accel_script_checksum(persistent_script); in persistent_compile_file()
1851 if (checksum != persistent_script->dynamic_members.checksum ) { in persistent_compile_file()
1854 …ZSTR_VAL(persistent_script->script.filename), persistent_script->dynamic_members.checksum, checksu… in persistent_compile_file()
1856 if (!persistent_script->corrupted) { in persistent_compile_file()
1857 persistent_script->corrupted = 1; in persistent_compile_file()
1858 persistent_script->timestamp = 0; in persistent_compile_file()
1859 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in persistent_compile_file()
1867 persistent_script = NULL; in persistent_compile_file()
1873 if (!persistent_script && ZCG(accel_directives).file_cache) { in persistent_compile_file()
1874 persistent_script = zend_file_cache_script_load(file_handle); in persistent_compile_file()
1879 if (!persistent_script) { in persistent_compile_file()
1902 persistent_script = opcache_compile_file(file_handle, type, key, &op_array); in persistent_compile_file()
1903 if (persistent_script) { in persistent_compile_file()
1904 …persistent_script = cache_script_in_shared_memory(persistent_script, key, key ? key_length : 0, &f… in persistent_compile_file()
1910 if (!persistent_script) { in persistent_compile_file()
1927 persistent_script->dynamic_members.hits++; /* see above */ in persistent_compile_file()
1934 InterlockedIncrement64(&persistent_script->dynamic_members.hits); in persistent_compile_file()
1938 if (persistent_script->script.filename) { in persistent_compile_file()
1945 …if (zend_hash_add_empty_element(&EG(included_files), persistent_script->script.filename) != NULL) { in persistent_compile_file()
1947 if (persistent_script->is_phar) { in persistent_compile_file()
1949 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->script.filename)); in persistent_compile_file()
1952 …mcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->script.filename), ZSTR_LEN(persist… in persistent_compile_file()
1963 persistent_script->dynamic_members.last_used = ZCG(request_time); in persistent_compile_file()
1969 if (persistent_script->ping_auto_globals_mask) { in persistent_compile_file()
1970 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in persistent_compile_file()
1973 return zend_accel_load_script(persistent_script, from_shared_memory); in persistent_compile_file()
2033 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2034 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2036 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()
2037 return zend_string_copy(persistent_script->script.filename); in persistent_zend_resolve_path()
2054 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2055 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2069 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()