Bug #66472 [Opn->Fbk]: Add extra outputs to opcache_get_status() to enable table sizing

From: Date: Fri, 21 Feb 2014 08:49:44 +0000
Subject: Bug #66472 [Opn->Fbk]: Add extra outputs to opcache_get_status() to enable table sizing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184381@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66472&edit=1 ID: 66472 Updated by: dmitry@php.net Reported by: Terry at ellisons dot org dot uk Summary: Add extra outputs to opcache_get_status() to enable table sizing -Status: Open +Status: Feedback Type: Bug Package: opcache Operating System: N/ PHP Version: master-Git-2014-01-12 (Git) Block user comment: N Private report: N New Comment: I've added information about interned strings into phpinfo() and opcache_get_status(). However I didn't add information about ZCSG(include_path). A also don't think that opcache_dump_interned_strings() is useful. Previous Comments: ------------------------------------------------------------------------ [2014-02-19 16:00:55] Terry at ellisons dot org dot uk jpauli, I don't think that your proposal is the way to go: 1) Interned String pool exhaustion: this fails safe to not using interned strings. Raising warnings that the pool is full will fill the error log without value. If the sysadmins want to monitor this then some form of extended status is quite adequate. 2) I don't like the idea of adding a opcache_dump_interned_strings() function as this makes all interned strings available to the caller. This introduces a potential exploitable vulnerability. At a minium, this should be subject to a validate_api_restriction() check. ------------------------------------------------------------------------ [2014-02-19 14:37:09] jpauli@php.net I have some ideas as well, here : https://github.com/jpauli/ZendOptimizerPlus/compare/interned_string_patch ------------------------------------------------------------------------ [2014-01-12 15:44:00] Terry at ellisons dot org dot uk Description: ------------ Sysadmins currently need to set various table sizes explicitly using the OPcache INI parameters, but they have no means of knowing the current sizes. This is a simple patch to add the extra field reporting to the opcache_get_status() output to allow them to do this properly. The key table here is the interned_strings pool, but I've also added ZCSG(include_paths) reporting. Note that ZendAccelerator.c nominally allocates 32 slots for the ZCSG(include_paths) table but in fact this is rounded up to the prime value 53, so the ZCSG(include_paths) short prefix is infact [A-Z\[\\\]^_`a-u]. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66472&edit=1

« previous php.bugs (#184381) next »