cvs: pecl /apc INSTALL TECHNOTES.txt apc.dsp apc_compile.c apc_globals.h config.m4 config.w32 package.xml php_apc.c
| From: | Gopal Vijayaraghavan | Date: | Thu, 07 Dec 2006 21:55:40 +0000 |
| Subject: | cvs: pecl /apc INSTALL TECHNOTES.txt apc.dsp apc_compile.c apc_globals.h config.m4 config.w32 package.xml php_apc.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-6772@lists.php.net to get a copy of this message | ||
gopalv Thu Dec 7 21:55:40 2006 UTC
Modified files:
/pecl/apc INSTALL TECHNOTES.txt apc.dsp apc_compile.c apc_globals.h
config.m4 config.w32 package.xml php_apc.c
Log:
Cleanup: Remove all references to apc optimizer
http://cvs.php.net/viewvc.cgi/pecl/apc/INSTALL?r1=3.53&r2=3.54&diff_format=u Index: pecl/apc/INSTALL diff -u pecl/apc/INSTALL:3.53 pecl/apc/INSTALL:3.54 --- pecl/apc/INSTALL:3.53 Mon Sep 18 12:51:00 2006 +++ pecl/apc/INSTALL Thu Dec 7 21:55:40 2006 @@ -24,7 +24,6 @@ extension=apc.so apc.enabled=1 apc.shm_segments=1 - apc.optimization=0 apc.shm_size=128 apc.ttl=7200 apc.user_ttl=7200 @@ -240,10 +239,7 @@ shared memory segment. (Default: 30) - apc.optimization The optimization level. Zero disables the - optimizer, and higher values use more aggressive - optimizations. Expect very modest speed - improvements. This is experimental. + apc.optimization This option has been deprecated. (Default: 0) apc.num_files_hint A "hint" about the number of distinct source files http://cvs.php.net/viewvc.cgi/pecl/apc/TECHNOTES.txt?r1=1.2&r2=1.3&diff_format=u Index: pecl/apc/TECHNOTES.txt diff -u pecl/apc/TECHNOTES.txt:1.2 pecl/apc/TECHNOTES.txt:1.3 --- pecl/apc/TECHNOTES.txt:1.2 Thu Jun 30 19:36:48 2005 +++ pecl/apc/TECHNOTES.txt Thu Dec 7 21:55:40 2006 @@ -349,34 +349,8 @@ operations were described in the previous section. 8. The Optimizer - - We basically don't use the optimizer currently. It isn't very advanced and doesn't - help things much. The idea behind it is that in apc_copy_op_array() in apc_compile.c - we do: - - if(APCG(optimization)) { - apc_optimize_op_array(src); - } - - That is, we check to see if the user has turned on the optimizer by checking the global - optimization variable via the APCG macro. If it is on we call the optimizer function - which walks through the opcode array and tries to get rid of useless opcodes or - replace certain combinations of opcodes with more efficient versions. For example, imagine - the userspace code: - - $a = 1; - $a = 2; - - That first assignment is completely useless, but the 1-pass compiler doesn't know that. - It will blindly create the corresponding opcodes. The optimizer tries to find redundant - opcodes like that and get rid of them before we copy the opcode array into shared memory. - Without an opcode cache doing a second pass of the opcode array to get rid of these before - execution is much more expensive than just executing those redundant opcodes, so we don't - have such an optimization phase right in the compiler. With an opcode cache, of course, - we have the luxury of spending a bit more time in the compile phase since once the opcode - array has been created and stored in shared memory it will be re-used many times and any - slight performance increase we can get through opcode optimization is going to be noticable. - But, as I said, the current optimizer in APC is not very advanced. + + The optimizer has been deprecated. If you made it to the end of this, you should have a pretty good idea of where things are in the code. I skimmed over a lot of things, so plan on spending some time reading through the code. http://cvs.php.net/viewvc.cgi/pecl/apc/apc.dsp?r1=3.2&r2=3.3&diff_format=u Index: pecl/apc/apc.dsp diff -u pecl/apc/apc.dsp:3.2 pecl/apc/apc.dsp:3.3 --- pecl/apc/apc.dsp:3.2 Sat Sep 3 21:04:20 2005 +++ pecl/apc/apc.dsp Thu Dec 7 21:55:40 2006 @@ -116,7 +116,7 @@ # End Source File # Begin Source File -SOURCE=.\apc_optimizer.c +SOURCE=.\apc_rfc1867.c # End Source File # Begin Source File @@ -180,10 +180,6 @@ # End Source File # Begin Source File -SOURCE=.\apc_optimizer.h -# End Source File -# Begin Source File - SOURCE=.\apc_pair.h # End Source File # Begin Source File http://cvs.php.net/viewvc.cgi/pecl/apc/apc_compile.c?r1=3.70&r2=3.71&diff_format=u Index: pecl/apc/apc_compile.c diff -u pecl/apc/apc_compile.c:3.70 pecl/apc/apc_compile.c:3.71 --- pecl/apc/apc_compile.c:3.70 Thu Dec 7 16:27:39 2006 +++ pecl/apc/apc_compile.c Thu Dec 7 21:55:40 2006 @@ -28,12 +28,11 @@ */ -/* $Id: apc_compile.c,v 3.70 2006/12/07 16:27:39 gopalv Exp $ */ +/* $Id: apc_compile.c,v 3.71 2006/12/07 21:55:40 gopalv Exp $ */ #include "apc_compile.h" #include "apc_globals.h" #include "apc_zend.h" -#include "apc_optimizer.h" typedef void* (*ht_copy_fun_t)(void*, void*, apc_malloc_t, apc_free_t); typedef void (*ht_free_fun_t)(void*, apc_free_t); @@ -1118,9 +1117,6 @@ CHECK(dst = (zend_op_array*) allocate(sizeof(src[0]))); local_dst_alloc = 1; } - if(APCG(optimization)) { - apc_optimize_op_array(src TSRMLS_CC); - } /* start with a bitwise copy of the array */ memcpy(dst, src, sizeof(src[0])); http://cvs.php.net/viewvc.cgi/pecl/apc/apc_globals.h?r1=3.52&r2=3.53&diff_format=u Index: pecl/apc/apc_globals.h diff -u pecl/apc/apc_globals.h:3.52 pecl/apc/apc_globals.h:3.53 --- pecl/apc/apc_globals.h:3.52 Wed Oct 25 18:46:34 2006 +++ pecl/apc/apc_globals.h Thu Dec 7 21:55:40 2006 @@ -29,7 +29,7 @@ */ -/* $Id: apc_globals.h,v 3.52 2006/10/25 18:46:34 gopalv Exp $ */ +/* $Id: apc_globals.h,v 3.53 2006/12/07 21:55:40 gopalv Exp $ */ #ifndef APC_GLOBALS_H #define APC_GLOBALS_H @@ -45,7 +45,6 @@ zend_bool enabled; /* if true, apc is enabled (defaults to true) */ long shm_segments; /* number of shared memory segments to use */ long shm_size; /* size of each shared memory segment (in MB) */ - long optimization; /* optimizer level (higher = more aggressive) */ long num_files_hint; /* parameter to apc_cache_create */ long user_entries_hint; long gc_ttl; /* parameter to apc_cache_create */ http://cvs.php.net/viewvc.cgi/pecl/apc/config.m4?r1=3.17&r2=3.18&diff_format=u Index: pecl/apc/config.m4 diff -u pecl/apc/config.m4:3.17 pecl/apc/config.m4:3.18 --- pecl/apc/config.m4:3.17 Fri Sep 29 07:13:01 2006 +++ pecl/apc/config.m4 Thu Dec 7 21:55:40 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 3.17 2006/09/29 07:13:01 shire Exp $ +dnl $Id: config.m4,v 3.18 2006/12/07 21:55:40 gopalv Exp $ dnl AC_MSG_CHECKING(whether apc needs to get compiler flags from apxs) @@ -114,7 +114,6 @@ apc_fcntl.c \ apc_main.c \ apc_mmap.c \ - apc_optimizer.c \ apc_pair.c \ apc_sem.c \ apc_shm.c \ http://cvs.php.net/viewvc.cgi/pecl/apc/config.w32?r1=1.3&r2=1.4&diff_format=u Index: pecl/apc/config.w32 diff -u pecl/apc/config.w32:1.3 pecl/apc/config.w32:1.4 --- pecl/apc/config.w32:1.3 Sun Sep 24 17:27:32 2006 +++ pecl/apc/config.w32 Thu Dec 7 21:55:40 2006 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.3 2006/09/24 17:27:32 iliaa Exp $ +// $Id: config.w32,v 1.4 2006/12/07 21:55:40 gopalv Exp $ // vim:ft=javascript ARG_ENABLE("apc", "Alternative PHP Cache", "no"); @@ -10,7 +10,6 @@ apc_debug.c \ apc_fcntl_win32.c \ apc_main.c \ - apc_optimizer.c \ apc_pair.c \ apc_shm.c \ apc_sma.c \ http://cvs.php.net/viewvc.cgi/pecl/apc/package.xml?r1=1.58&r2=1.59&diff_format=u Index: pecl/apc/package.xml diff -u pecl/apc/package.xml:1.58 pecl/apc/package.xml:1.59 --- pecl/apc/package.xml:1.58 Sat Sep 9 23:51:15 2006 +++ pecl/apc/package.xml Thu Dec 7 21:55:40 2006 @@ -93,8 +93,6 @@ <file role="src" name="apc_main.c" /> <file role="src" name="apc_main.h" /> <file role="src" name="apc_mmap.c" /> - <file role="src" name="apc_optimizer.c" /> - <file role="src" name="apc_optimizer.h" /> <file role="src" name="apc_pair.c" /> <file role="src" name="apc_pair.h" /> <file role="src" name="apc_php.h" /> http://cvs.php.net/viewvc.cgi/pecl/apc/php_apc.c?r1=3.120&r2=3.121&diff_format=u Index: pecl/apc/php_apc.c diff -u pecl/apc/php_apc.c:3.120 pecl/apc/php_apc.c:3.121 --- pecl/apc/php_apc.c:3.120 Tue Dec 5 10:40:14 2006 +++ pecl/apc/php_apc.c Thu Dec 7 21:55:40 2006 @@ -26,7 +26,7 @@ */ -/* $Id: php_apc.c,v 3.120 2006/12/05 10:40:14 gopalv Exp $ */ +/* $Id: php_apc.c,v 3.121 2006/12/07 21:55:40 gopalv Exp $ */ #include "apc_zend.h" #include "apc_cache.h" @@ -125,7 +125,6 @@ STD_PHP_INI_BOOLEAN("apc.enabled", "1", PHP_INI_ALL, OnUpdateBool, enabled, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.shm_segments", "1", PHP_INI_SYSTEM, OnUpdateInt, shm_segments, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.shm_size", "30", PHP_INI_SYSTEM, OnUpdateInt, shm_size, zend_apc_globals, apc_globals) -STD_PHP_INI_BOOLEAN("apc.optimization", "0", PHP_INI_ALL, OnUpdateInt, optimization, zend_apc_globals, apc_globals) STD_PHP_INI_BOOLEAN("apc.include_once_override", "0", PHP_INI_SYSTEM, OnUpdateBool, include_once, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.num_files_hint", "1000", PHP_INI_SYSTEM, OnUpdateInt, num_files_hint, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.user_entries_hint", "100", PHP_INI_SYSTEM, OnUpdateInt, user_entries_hint, zend_apc_globals, apc_globals) @@ -170,7 +169,7 @@ #else php_info_print_table_row(2, "Locking type", "File Locks"); #endif - php_info_print_table_row(2, "Revision", "$Revision: 3.120 $"); + php_info_print_table_row(2, "Revision", "$Revision: 3.121 $"); php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); php_info_print_table_end(); DISPLAY_INI_ENTRIES();
http://cvs.php.net/viewvc.cgi/pecl/apc/INSTALL?r1=3.53&r2=3.54&diff_format=u Index: pecl/apc/INSTALL diff -u pecl/apc/INSTALL:3.53 pecl/apc/INSTALL:3.54 --- pecl/apc/INSTALL:3.53 Mon Sep 18 12:51:00 2006 +++ pecl/apc/INSTALL Thu Dec 7 21:55:40 2006 @@ -24,7 +24,6 @@ extension=apc.so apc.enabled=1 apc.shm_segments=1 - apc.optimization=0 apc.shm_size=128 apc.ttl=7200 apc.user_ttl=7200 @@ -240,10 +239,7 @@ shared memory segment. (Default: 30) - apc.optimization The optimization level. Zero disables the - optimizer, and higher values use more aggressive - optimizations. Expect very modest speed - improvements. This is experimental. + apc.optimization This option has been deprecated. (Default: 0) apc.num_files_hint A "hint" about the number of distinct source files http://cvs.php.net/viewvc.cgi/pecl/apc/TECHNOTES.txt?r1=1.2&r2=1.3&diff_format=u Index: pecl/apc/TECHNOTES.txt diff -u pecl/apc/TECHNOTES.txt:1.2 pecl/apc/TECHNOTES.txt:1.3 --- pecl/apc/TECHNOTES.txt:1.2 Thu Jun 30 19:36:48 2005 +++ pecl/apc/TECHNOTES.txt Thu Dec 7 21:55:40 2006 @@ -349,34 +349,8 @@ operations were described in the previous section. 8. The Optimizer - - We basically don't use the optimizer currently. It isn't very advanced and doesn't - help things much. The idea behind it is that in apc_copy_op_array() in apc_compile.c - we do: - - if(APCG(optimization)) { - apc_optimize_op_array(src); - } - - That is, we check to see if the user has turned on the optimizer by checking the global - optimization variable via the APCG macro. If it is on we call the optimizer function - which walks through the opcode array and tries to get rid of useless opcodes or - replace certain combinations of opcodes with more efficient versions. For example, imagine - the userspace code: - - $a = 1; - $a = 2; - - That first assignment is completely useless, but the 1-pass compiler doesn't know that. - It will blindly create the corresponding opcodes. The optimizer tries to find redundant - opcodes like that and get rid of them before we copy the opcode array into shared memory. - Without an opcode cache doing a second pass of the opcode array to get rid of these before - execution is much more expensive than just executing those redundant opcodes, so we don't - have such an optimization phase right in the compiler. With an opcode cache, of course, - we have the luxury of spending a bit more time in the compile phase since once the opcode - array has been created and stored in shared memory it will be re-used many times and any - slight performance increase we can get through opcode optimization is going to be noticable. - But, as I said, the current optimizer in APC is not very advanced. + + The optimizer has been deprecated. If you made it to the end of this, you should have a pretty good idea of where things are in the code. I skimmed over a lot of things, so plan on spending some time reading through the code. http://cvs.php.net/viewvc.cgi/pecl/apc/apc.dsp?r1=3.2&r2=3.3&diff_format=u Index: pecl/apc/apc.dsp diff -u pecl/apc/apc.dsp:3.2 pecl/apc/apc.dsp:3.3 --- pecl/apc/apc.dsp:3.2 Sat Sep 3 21:04:20 2005 +++ pecl/apc/apc.dsp Thu Dec 7 21:55:40 2006 @@ -116,7 +116,7 @@ # End Source File # Begin Source File -SOURCE=.\apc_optimizer.c +SOURCE=.\apc_rfc1867.c # End Source File # Begin Source File @@ -180,10 +180,6 @@ # End Source File # Begin Source File -SOURCE=.\apc_optimizer.h -# End Source File -# Begin Source File - SOURCE=.\apc_pair.h # End Source File # Begin Source File http://cvs.php.net/viewvc.cgi/pecl/apc/apc_compile.c?r1=3.70&r2=3.71&diff_format=u Index: pecl/apc/apc_compile.c diff -u pecl/apc/apc_compile.c:3.70 pecl/apc/apc_compile.c:3.71 --- pecl/apc/apc_compile.c:3.70 Thu Dec 7 16:27:39 2006 +++ pecl/apc/apc_compile.c Thu Dec 7 21:55:40 2006 @@ -28,12 +28,11 @@ */ -/* $Id: apc_compile.c,v 3.70 2006/12/07 16:27:39 gopalv Exp $ */ +/* $Id: apc_compile.c,v 3.71 2006/12/07 21:55:40 gopalv Exp $ */ #include "apc_compile.h" #include "apc_globals.h" #include "apc_zend.h" -#include "apc_optimizer.h" typedef void* (*ht_copy_fun_t)(void*, void*, apc_malloc_t, apc_free_t); typedef void (*ht_free_fun_t)(void*, apc_free_t); @@ -1118,9 +1117,6 @@ CHECK(dst = (zend_op_array*) allocate(sizeof(src[0]))); local_dst_alloc = 1; } - if(APCG(optimization)) { - apc_optimize_op_array(src TSRMLS_CC); - } /* start with a bitwise copy of the array */ memcpy(dst, src, sizeof(src[0])); http://cvs.php.net/viewvc.cgi/pecl/apc/apc_globals.h?r1=3.52&r2=3.53&diff_format=u Index: pecl/apc/apc_globals.h diff -u pecl/apc/apc_globals.h:3.52 pecl/apc/apc_globals.h:3.53 --- pecl/apc/apc_globals.h:3.52 Wed Oct 25 18:46:34 2006 +++ pecl/apc/apc_globals.h Thu Dec 7 21:55:40 2006 @@ -29,7 +29,7 @@ */ -/* $Id: apc_globals.h,v 3.52 2006/10/25 18:46:34 gopalv Exp $ */ +/* $Id: apc_globals.h,v 3.53 2006/12/07 21:55:40 gopalv Exp $ */ #ifndef APC_GLOBALS_H #define APC_GLOBALS_H @@ -45,7 +45,6 @@ zend_bool enabled; /* if true, apc is enabled (defaults to true) */ long shm_segments; /* number of shared memory segments to use */ long shm_size; /* size of each shared memory segment (in MB) */ - long optimization; /* optimizer level (higher = more aggressive) */ long num_files_hint; /* parameter to apc_cache_create */ long user_entries_hint; long gc_ttl; /* parameter to apc_cache_create */ http://cvs.php.net/viewvc.cgi/pecl/apc/config.m4?r1=3.17&r2=3.18&diff_format=u Index: pecl/apc/config.m4 diff -u pecl/apc/config.m4:3.17 pecl/apc/config.m4:3.18 --- pecl/apc/config.m4:3.17 Fri Sep 29 07:13:01 2006 +++ pecl/apc/config.m4 Thu Dec 7 21:55:40 2006 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 3.17 2006/09/29 07:13:01 shire Exp $ +dnl $Id: config.m4,v 3.18 2006/12/07 21:55:40 gopalv Exp $ dnl AC_MSG_CHECKING(whether apc needs to get compiler flags from apxs) @@ -114,7 +114,6 @@ apc_fcntl.c \ apc_main.c \ apc_mmap.c \ - apc_optimizer.c \ apc_pair.c \ apc_sem.c \ apc_shm.c \ http://cvs.php.net/viewvc.cgi/pecl/apc/config.w32?r1=1.3&r2=1.4&diff_format=u Index: pecl/apc/config.w32 diff -u pecl/apc/config.w32:1.3 pecl/apc/config.w32:1.4 --- pecl/apc/config.w32:1.3 Sun Sep 24 17:27:32 2006 +++ pecl/apc/config.w32 Thu Dec 7 21:55:40 2006 @@ -1,4 +1,4 @@ -// $Id: config.w32,v 1.3 2006/09/24 17:27:32 iliaa Exp $ +// $Id: config.w32,v 1.4 2006/12/07 21:55:40 gopalv Exp $ // vim:ft=javascript ARG_ENABLE("apc", "Alternative PHP Cache", "no"); @@ -10,7 +10,6 @@ apc_debug.c \ apc_fcntl_win32.c \ apc_main.c \ - apc_optimizer.c \ apc_pair.c \ apc_shm.c \ apc_sma.c \ http://cvs.php.net/viewvc.cgi/pecl/apc/package.xml?r1=1.58&r2=1.59&diff_format=u Index: pecl/apc/package.xml diff -u pecl/apc/package.xml:1.58 pecl/apc/package.xml:1.59 --- pecl/apc/package.xml:1.58 Sat Sep 9 23:51:15 2006 +++ pecl/apc/package.xml Thu Dec 7 21:55:40 2006 @@ -93,8 +93,6 @@ <file role="src" name="apc_main.c" /> <file role="src" name="apc_main.h" /> <file role="src" name="apc_mmap.c" /> - <file role="src" name="apc_optimizer.c" /> - <file role="src" name="apc_optimizer.h" /> <file role="src" name="apc_pair.c" /> <file role="src" name="apc_pair.h" /> <file role="src" name="apc_php.h" /> http://cvs.php.net/viewvc.cgi/pecl/apc/php_apc.c?r1=3.120&r2=3.121&diff_format=u Index: pecl/apc/php_apc.c diff -u pecl/apc/php_apc.c:3.120 pecl/apc/php_apc.c:3.121 --- pecl/apc/php_apc.c:3.120 Tue Dec 5 10:40:14 2006 +++ pecl/apc/php_apc.c Thu Dec 7 21:55:40 2006 @@ -26,7 +26,7 @@ */ -/* $Id: php_apc.c,v 3.120 2006/12/05 10:40:14 gopalv Exp $ */ +/* $Id: php_apc.c,v 3.121 2006/12/07 21:55:40 gopalv Exp $ */ #include "apc_zend.h" #include "apc_cache.h" @@ -125,7 +125,6 @@ STD_PHP_INI_BOOLEAN("apc.enabled", "1", PHP_INI_ALL, OnUpdateBool, enabled, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.shm_segments", "1", PHP_INI_SYSTEM, OnUpdateInt, shm_segments, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.shm_size", "30", PHP_INI_SYSTEM, OnUpdateInt, shm_size, zend_apc_globals, apc_globals) -STD_PHP_INI_BOOLEAN("apc.optimization", "0", PHP_INI_ALL, OnUpdateInt, optimization, zend_apc_globals, apc_globals) STD_PHP_INI_BOOLEAN("apc.include_once_override", "0", PHP_INI_SYSTEM, OnUpdateBool, include_once, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.num_files_hint", "1000", PHP_INI_SYSTEM, OnUpdateInt, num_files_hint, zend_apc_globals, apc_globals) STD_PHP_INI_ENTRY("apc.user_entries_hint", "100", PHP_INI_SYSTEM, OnUpdateInt, user_entries_hint, zend_apc_globals, apc_globals) @@ -170,7 +169,7 @@ #else php_info_print_table_row(2, "Locking type", "File Locks"); #endif - php_info_print_table_row(2, "Revision", "$Revision: 3.120 $"); + php_info_print_table_row(2, "Revision", "$Revision: 3.121 $"); php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__); php_info_print_table_end(); DISPLAY_INI_ENTRIES();