summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_accelerator_module.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-06-25 13:05:53 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2019-06-25 13:06:20 +0200
commitead40e31e9be5d941861d5062ba8867fe4f7bc9f (patch)
treec7bdc5f214f0ced9806835ca66793052ca96aae7 /ext/opcache/zend_accelerator_module.c
parentbd0cb99d8c57f3f6b49abe4ccfdb2ef72ce3ab78 (diff)
parent18bba63f390647af9d54a2be5605bf19e4bb99d0 (diff)
downloadphp-git-ead40e31e9be5d941861d5062ba8867fe4f7bc9f.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #78202: Opcache stats for cache hits are capped at 32bit NUM
Diffstat (limited to 'ext/opcache/zend_accelerator_module.c')
-rw-r--r--ext/opcache/zend_accelerator_module.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index 9e0d22e414..0843d908a2 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -468,9 +468,9 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
char buf[32];
php_info_print_table_row(2, "Startup", "OK");
php_info_print_table_row(2, "Shared memory model", zend_accel_get_shared_model());
- snprintf(buf, sizeof(buf), ZEND_LONG_FMT, (zend_ulong)ZCSG(hits));
+ snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZCSG(hits));
php_info_print_table_row(2, "Cache hits", buf);
- snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ZSMMG(memory_exhausted)?ZCSG(misses):ZCSG(misses)-ZCSG(blacklist_misses));
+ snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZSMMG(memory_exhausted)?ZCSG(misses):ZCSG(misses)-ZCSG(blacklist_misses));
php_info_print_table_row(2, "Cache misses", buf);
snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ZCG(accel_directives).memory_consumption-zend_shared_alloc_get_free_memory()-ZSMMG(wasted_shared_memory));
php_info_print_table_row(2, "Used memory", buf);
@@ -484,17 +484,17 @@ void zend_accel_info(ZEND_MODULE_INFO_FUNC_ARGS)
snprintf(buf, sizeof(buf), "%zu", (size_t)((char*)ZCSG(interned_strings).end - (char*)ZCSG(interned_strings).top));
php_info_print_table_row(2, "Interned Strings Free memory", buf);
}
- snprintf(buf, sizeof(buf), "%d", ZCSG(hash).num_direct_entries);
+ snprintf(buf, sizeof(buf), "%" PRIu32, ZCSG(hash).num_direct_entries);
php_info_print_table_row(2, "Cached scripts", buf);
- snprintf(buf, sizeof(buf), "%d", ZCSG(hash).num_entries);
+ snprintf(buf, sizeof(buf), "%" PRIu32, ZCSG(hash).num_entries);
php_info_print_table_row(2, "Cached keys", buf);
- snprintf(buf, sizeof(buf), "%d", ZCSG(hash).max_num_entries);
+ snprintf(buf, sizeof(buf), "%" PRIu32, ZCSG(hash).max_num_entries);
php_info_print_table_row(2, "Max keys", buf);
- snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ZCSG(oom_restarts));
+ snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZCSG(oom_restarts));
php_info_print_table_row(2, "OOM restarts", buf);
- snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ZCSG(hash_restarts));
+ snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZCSG(hash_restarts));
php_info_print_table_row(2, "Hash keys restarts", buf);
- snprintf(buf, sizeof(buf), ZEND_LONG_FMT, ZCSG(manual_restarts));
+ snprintf(buf, sizeof(buf), ZEND_ULONG_FMT, ZCSG(manual_restarts));
php_info_print_table_row(2, "Manual restarts", buf);
}
}