Changeset 1117 for trunk


Ignore:
Timestamp:
2012-08-02T08:27:41+02:00 (3 years ago)
Author:
moo
Message:

fixed #39: ini_set never work for xcache.coverager setting

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r1091 r1117  
    88========
    99 * new: xcache.disable_on_crash = Off
     10 * new: xcache.coverager_autostart = On
    1011
    1112ChangeLog
     
    1415 * closes #73: warn for improper PHP_FCGI_CHILDREN setting fcgi mode (>=PHP_5_3)
    1516 * closes #174: updated api to support "clear all cache"
     17 * fixed #39: ini_set never work for xcache.coverager setting. use API instead
    1618 * code refactor
    1719   * uses extension to load XCache. load via zend_extension is unsupported
  • trunk/mod_coverager/xc_coverager.c

    r1060 r1117  
    245245static void xc_coverager_enable(TSRMLS_D) /* {{{ */
    246246{
    247     XG(coverage_enabled) = 1;
     247    XG(coverager_enabled) = 1;
    248248}
    249249/* }}} */
    250250static void xc_coverager_disable(TSRMLS_D) /* {{{ */
    251251{
    252     XG(coverage_enabled) = 0;
     252    XG(coverager_enabled) = 0;
    253253}
    254254/* }}} */
     
    257257{
    258258    if (XG(coverager)) {
    259         xc_coverager_enable(TSRMLS_C);
     259        if (XG(coverager_autostart)) {
     260            xc_coverager_enable(TSRMLS_C);
     261        }
    260262#ifdef ZEND_COMPILE_EXTENDED_INFO
    261263        CG(compiler_options) |= ZEND_COMPILE_EXTENDED_INFO;
     
    265267    }
    266268    else {
    267         XG(coverage_enabled) = 0;
     269        XG(coverager_enabled) = 0;
    268270    }
    269271    return SUCCESS;
     
    469471    TSRMLS_FETCH();
    470472
    471     if (XG(coverages) && XG(coverage_enabled)) {
     473    if (XG(coverages) && XG(coverager_enabled)) {
    472474        int size = xc_coverager_get_op_array_size_no_tail(op_array);
    473475        int oplineno = (*EG(opline_ptr)) - op_array->opcodes;
     
    631633/* {{{ PHP_INI */
    632634PHP_INI_BEGIN()
    633     STD_PHP_INI_BOOLEAN("xcache.coverager"      ,        "0", PHP_INI_ALL,    OnUpdateBool,         coverager,         zend_xcache_globals, xcache_globals)
     635    STD_PHP_INI_BOOLEAN("xcache.coverager",              "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, coverager,           zend_xcache_globals, xcache_globals)
     636    STD_PHP_INI_BOOLEAN("xcache.coverager_autostart",    "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, coverager_autostart, zend_xcache_globals, xcache_globals)
    634637    PHP_INI_ENTRY1     ("xcache.coveragedump_directory",  "", PHP_INI_SYSTEM, xcache_OnUpdateDummy, NULL)
    635638PHP_INI_END()
     
    644647        covdumpdir = NULL;
    645648    }
    646     php_info_print_table_row(2, "Coverage Auto Dumper", XG(coverager) && covdumpdir ? "enabled" : "disabled");
     649    php_info_print_table_row(2, "Coverage Started", XG(coverager_started) && covdumpdir ? "On" : "Off");
    647650    php_info_print_table_end();
    648651
  • trunk/xcache-zh-gb2312.ini

    r1106 r1117  
    6565[xcache.coverager]
    6666; ±¾¹¦ÄÜ¿ªÆôºó½µµÍÔËÐÐÐÔÄÜ
    67 ; ¾¡ÔÚ xcache.coverager == On && xcache.coveragedump_directory == "·Ç¿ÕÖµ" ʱ±¾¹¦ÄܲŻáÆôÓÃ
     67; ½öÔÚ xcache.coverager == On && xcache.coveragedump_directory == "·Ç¿ÕÖµ" ʱ±¾¹¦ÄܲŻáÆôÓÃ
    6868
    6969; per request settings. ¿ÉÒÔ ini_set, .htaccess µÈ
    7070; ÆôÓôúÂëÁ÷³Ì¸²¸ÇÃæÐÅÏ¢²É¼¯ÒÔ¼° xcache_coverager_start/stop/get/clean() µÈº¯Êý
    71 xcache.coverager =          Off
     71xcache.coverager =           Off
     72xcache.coverager_autostart =  On
    7273
    7374; ½öÔÚ php ini ÎļþÄÚÉèÖÃ
  • trunk/xcache.ini

    r1106 r1117  
    6565[xcache.coverager]
    6666; enabling this feature will impact performance
    67 ; enable only if xcache.coverager == On && xcache.coveragedump_directory == "non-empty-value"
     67; enabled only if xcache.coverager == On && xcache.coveragedump_directory == "non-empty-value"
    6868
    6969; per request settings. can ini_set, .htaccess etc
    7070; enable coverage data collecting and xcache_coverager_start/stop/get/clean() functions
    71 xcache.coverager =          Off
     71xcache.coverager =           Off
     72xcache.coverager_autostart =  On
    7273
    7374; set in php ini file only
  • trunk/xcache_globals.h

    r1040 r1117  
    1111#ifdef HAVE_XCACHE_COVERAGER
    1212    zend_bool coverager;
    13     zend_bool coverage_enabled;
     13    zend_bool coverager_autostart;
     14    zend_bool coverager_enabled;
    1415    HashTable *coverages;  /* coverages[file][line] = times */
    1516#endif
Note: See TracChangeset for help on using the changeset viewer.