Commit:    64b029af0dc7d044586db9a554e0a47783076cc8
Author:    Dmitry Stogov <dmi...@zend.com>         Mon, 25 Mar 2013 12:33:24 
+0400
Parents:   987dee9ca1be517f4be02d9c8f721d569596dc5a
Branches:  PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=64b029af0dc7d044586db9a554e0a47783076cc8

Log:
Separate "start_time" from "last_restart_time"

Changed paths:
  M  ext/opcache/ZendAccelerator.c
  M  ext/opcache/ZendAccelerator.h
  M  ext/opcache/zend_accelerator_module.c


Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index e634c13..9d1fdce 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2362,7 +2362,8 @@ static void zend_accel_init_shm(TSRMLS_D)
        ZCSG(manual_restarts) = 0;
 
        ZCSG(accelerator_enabled) = 1;
-       ZCSG(last_restart_time) = zend_accel_get_time();
+       ZCSG(start_time) = zend_accel_get_time();
+       ZCSG(last_restart_time) = 0;
        ZCSG(restart_in_progress) = 0;
 
        zend_shared_alloc_unlock(TSRMLS_C);
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index cd89bcc..c611d65 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -275,6 +275,7 @@ typedef struct _zend_accel_shared_globals {
        zend_accel_hash include_paths;    /* used "include_path" values    */
 
        /* Directives & Maintenance */
+       time_t          start_time;
        time_t          last_restart_time;
        time_t          force_restart_time;
        zend_bool       accelerator_enabled;
diff --git a/ext/opcache/zend_accelerator_module.c 
b/ext/opcache/zend_accelerator_module.c
index 778fee5..0d452ad 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -503,6 +503,7 @@ static ZEND_FUNCTION(opcache_get_status)
        add_assoc_long(statistics, "num_cached_keys",    
ZCSG(hash).num_entries);
        add_assoc_long(statistics, "max_cached_keys",    
ZCSG(hash).max_num_entries);
        add_assoc_long(statistics, "hits", ZCSG(hits));
+       add_assoc_long(statistics, "start_time", ZCSG(start_time));
        add_assoc_long(statistics, "last_restart_time", 
ZCSG(last_restart_time));
        add_assoc_long(statistics, "oom_restarts", ZCSG(oom_restarts));
        add_assoc_long(statistics, "wasted_restarts", ZCSG(wasted_restarts));


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to