Lines Matching refs:persistent_script

889 static inline int do_validate_timestamps(zend_persistent_script *persistent_script, zend_file_handl…  in do_validate_timestamps()  argument
899 if (persistent_script->full_path != file_handle->opened_path && in do_validate_timestamps()
900 (ZSTR_LEN(persistent_script->full_path) != ZSTR_LEN(file_handle->opened_path) || in do_validate_timestamps()
901 …memcmp(ZSTR_VAL(persistent_script->full_path), ZSTR_VAL(file_handle->opened_path), ZSTR_LEN(file_h… in do_validate_timestamps()
907 persistent_script->full_path != full_path_ptr && in do_validate_timestamps()
908 (ZSTR_LEN(persistent_script->full_path) != ZSTR_LEN(full_path_ptr) || in do_validate_timestamps()
909 …memcmp(ZSTR_VAL(persistent_script->full_path), ZSTR_VAL(full_path_ptr), ZSTR_LEN(full_path_ptr)) !… in do_validate_timestamps()
916 if (persistent_script->timestamp == 0) { in do_validate_timestamps()
924 if (zend_get_file_handle_timestamp(file_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
937 ps_handle.filename = ZSTR_VAL(persistent_script->full_path); in do_validate_timestamps()
938 ps_handle.opened_path = persistent_script->full_path; in do_validate_timestamps()
940 if (zend_get_file_handle_timestamp(&ps_handle, NULL) == persistent_script->timestamp) { in do_validate_timestamps()
947 int validate_timestamp_and_record(zend_persistent_script *persistent_script, zend_file_handle *file… in validate_timestamp_and_record() argument
950 persistent_script->dynamic_members.revalidate >= ZCG(request_time)) { in validate_timestamp_and_record()
952 } else if (do_validate_timestamps(persistent_script, file_handle) == FAILURE) { in validate_timestamp_and_record()
955persistent_script->dynamic_members.revalidate = ZCG(request_time) + ZCG(accel_directives).revalida… in validate_timestamp_and_record()
960 int validate_timestamp_and_record_ex(zend_persistent_script *persistent_script, zend_file_handle *f… in validate_timestamp_and_record_ex() argument
965 ret = validate_timestamp_and_record(persistent_script, file_handle); in validate_timestamp_and_record_ex()
1133 zend_persistent_script *persistent_script; in zend_accel_invalidate() local
1151 persistent_script = zend_accel_hash_find(&ZCSG(hash), realpath); in zend_accel_invalidate()
1152 if (persistent_script && !persistent_script->corrupted) { in zend_accel_invalidate()
1161 do_validate_timestamps(persistent_script, &file_handle) == FAILURE) { in zend_accel_invalidate()
1164 if (!persistent_script->corrupted) { in zend_accel_invalidate()
1165 persistent_script->corrupted = 1; in zend_accel_invalidate()
1166 persistent_script->timestamp = 0; in zend_accel_invalidate()
1167 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in zend_accel_invalidate()
1600 zend_persistent_script *persistent_script; in file_cache_compile_file() local
1623 persistent_script = zend_file_cache_script_load(file_handle); in file_cache_compile_file()
1625 if (persistent_script) { in file_cache_compile_file()
1627 if (persistent_script->full_path) { in file_cache_compile_file()
1634 if (zend_hash_add_empty_element(&EG(included_files), persistent_script->full_path) != NULL) { in file_cache_compile_file()
1636 if (persistent_script->is_phar) { in file_cache_compile_file()
1638 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->full_path)); in file_cache_compile_file()
1641 …memcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->full_path), ZSTR_LEN(persistent_… in file_cache_compile_file()
1650 if (persistent_script->ping_auto_globals_mask) { in file_cache_compile_file()
1651 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in file_cache_compile_file()
1654 return zend_accel_load_script(persistent_script, 1); in file_cache_compile_file()
1657 persistent_script = opcache_compile_file(file_handle, type, NULL, 0, &op_array); in file_cache_compile_file()
1659 if (persistent_script) { in file_cache_compile_file()
1661 persistent_script = cache_script_in_file_cache(persistent_script, &from_memory); in file_cache_compile_file()
1662 return zend_accel_load_script(persistent_script, from_memory); in file_cache_compile_file()
1672 zend_persistent_script *persistent_script = NULL; in persistent_compile_file() local
1706 persistent_script = ZCG(cache_persistent_script); in persistent_compile_file()
1719 persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length); in persistent_compile_file()
1724 if (!persistent_script) { in persistent_compile_file()
1744 persistent_script = (zend_persistent_script *)bucket->data; in persistent_compile_file()
1746 if (key && !persistent_script->corrupted) { in persistent_compile_file()
1762 if (persistent_script && persistent_script->corrupted) { in persistent_compile_file()
1763 persistent_script = NULL; in persistent_compile_file()
1783 if (EXPECTED(persistent_script != NULL) && in persistent_compile_file()
1786 UNEXPECTED(access(ZSTR_VAL(persistent_script->full_path), R_OK) != 0)) { in persistent_compile_file()
1799 if (persistent_script && ZCG(accel_directives).validate_timestamps) { in persistent_compile_file()
1800 if (validate_timestamp_and_record(persistent_script, file_handle) == FAILURE) { in persistent_compile_file()
1802 if (!persistent_script->corrupted) { in persistent_compile_file()
1803 persistent_script->corrupted = 1; in persistent_compile_file()
1804 persistent_script->timestamp = 0; in persistent_compile_file()
1805 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in persistent_compile_file()
1813 persistent_script = NULL; in persistent_compile_file()
1818 if (persistent_script && ZCG(accel_directives).consistency_checks in persistent_compile_file()
1819 && persistent_script->dynamic_members.hits % ZCG(accel_directives).consistency_checks == 0) { in persistent_compile_file()
1821 unsigned int checksum = zend_accel_script_checksum(persistent_script); in persistent_compile_file()
1822 if (checksum != persistent_script->dynamic_members.checksum ) { in persistent_compile_file()
1825 … ZSTR_VAL(persistent_script->full_path), persistent_script->dynamic_members.checksum, checksum); in persistent_compile_file()
1827 if (!persistent_script->corrupted) { in persistent_compile_file()
1828 persistent_script->corrupted = 1; in persistent_compile_file()
1829 persistent_script->timestamp = 0; in persistent_compile_file()
1830 ZSMMG(wasted_shared_memory) += persistent_script->dynamic_members.memory_consumption; in persistent_compile_file()
1838 persistent_script = NULL; in persistent_compile_file()
1844 if (!persistent_script && ZCG(accel_directives).file_cache) { in persistent_compile_file()
1845 persistent_script = zend_file_cache_script_load(file_handle); in persistent_compile_file()
1850 if (!persistent_script) { in persistent_compile_file()
1867 persistent_script = opcache_compile_file(file_handle, type, key, key ? key_length : 0, &op_array); in persistent_compile_file()
1868 if (persistent_script) { in persistent_compile_file()
1869persistent_script = cache_script_in_shared_memory(persistent_script, key, key ? key_length : 0, &f… in persistent_compile_file()
1875 if (!persistent_script) { in persistent_compile_file()
1891 persistent_script->dynamic_members.hits++; /* see above */ in persistent_compile_file()
1898 InterlockedIncrement64(&persistent_script->dynamic_members.hits); in persistent_compile_file()
1902 if (persistent_script->full_path) { in persistent_compile_file()
1909 if (zend_hash_add_empty_element(&EG(included_files), persistent_script->full_path) != NULL) { in persistent_compile_file()
1911 if (persistent_script->is_phar) { in persistent_compile_file()
1913 char *fname = emalloc(sizeof("phar://") + ZSTR_LEN(persistent_script->full_path)); in persistent_compile_file()
1916 …memcpy(fname + sizeof("phar://") - 1, ZSTR_VAL(persistent_script->full_path), ZSTR_LEN(persistent_… in persistent_compile_file()
1927 persistent_script->dynamic_members.last_used = ZCG(request_time); in persistent_compile_file()
1932 if (persistent_script->ping_auto_globals_mask) { in persistent_compile_file()
1933 zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask); in persistent_compile_file()
1936 return zend_accel_load_script(persistent_script, from_shared_memory); in persistent_compile_file()
1993 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
1994 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
1996 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()
1997 return zend_string_copy(persistent_script->full_path); in persistent_zend_resolve_path()
2014 zend_persistent_script *persistent_script = (zend_persistent_script *)bucket->data; in persistent_zend_resolve_path() local
2015 if (!persistent_script->corrupted) { in persistent_zend_resolve_path()
2027 ZCG(cache_persistent_script) = persistent_script; in persistent_zend_resolve_path()