com php-src: opcache: print restart reason: ext/opcache/ZendAccelerator.c
| From: | Joe Watkins | Date: | Fri, 13 Jan 2017 21:34:11 +0000 |
| Subject: | com php-src: opcache: print restart reason: ext/opcache/ZendAccelerator.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96723@lists.php.net to get a copy of this message | ||
Commit: a4accc0e3e14bce27f4aaf1f6ab060aa8f4a27ec
Author: Alexander Polyakov <apolyakov@beget.com> Fri, 13 Jan 2017 14:55:10 +0300
Committer: Joe Watkins <krakjoe@php.net> Fri, 13 Jan 2017 21:34:11 +0000
Parents: aaaef22db657953b8cec679e7a492c0c9ec7d95a
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a4accc0e3e14bce27f4aaf1f6ab060aa8f4a27ec
Log:
opcache: print restart reason
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 0351729..8e3bbad 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2921,11 +2921,18 @@ void accel_shutdown(void)
void zend_accel_schedule_restart(zend_accel_restart_reason reason)
{
+ const char *zend_accel_restart_reason_text[ACCEL_RESTART_USER + 1] = {
+ "out of memory",
+ "hash overflow",
+ "user",
+ };
+
if (ZCSG(restart_pending)) {
/* don't schedule twice */
return;
}
- zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
+ zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled! Reason: %s",
+ zend_accel_restart_reason_text[reason]);
SHM_UNPROTECT();
ZCSG(restart_pending) = 1;