summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_persist_calc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/zend_persist_calc.c')
-rw-r--r--ext/opcache/zend_persist_calc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/opcache/zend_persist_calc.c b/ext/opcache/zend_persist_calc.c
index 5de27b9efb..8a1e99c65d 100644
--- a/ext/opcache/zend_persist_calc.c
+++ b/ext/opcache/zend_persist_calc.c
@@ -514,6 +514,15 @@ static void zend_accel_persist_class_table_calc(HashTable *class_table)
} ZEND_HASH_FOREACH_END();
}
+static void zend_persist_warnings_calc(zend_persistent_script *script) {
+ ADD_SIZE(script->num_warnings * sizeof(zend_recorded_warning *));
+ for (uint32_t i = 0; i < script->num_warnings; i++) {
+ ADD_SIZE(sizeof(zend_recorded_warning));
+ ADD_STRING(script->warnings[i]->error_filename);
+ ADD_STRING(script->warnings[i]->error_message);
+ }
+}
+
uint32_t zend_accel_script_persist_calc(zend_persistent_script *new_persistent_script, const char *key, unsigned int key_length, int for_shm)
{
Bucket *p;
@@ -556,6 +565,7 @@ uint32_t zend_accel_script_persist_calc(zend_persistent_script *new_persistent_s
zend_persist_op_array_calc(&p->val);
} ZEND_HASH_FOREACH_END();
zend_persist_op_array_calc_ex(&new_persistent_script->script.main_op_array);
+ zend_persist_warnings_calc(new_persistent_script);
#if defined(__AVX__) || defined(__SSE2__)
/* Align size to 64-byte boundary */