[xdebug-dev] xdebug xdebug/php_xdebug.h xdebug/xdebug.c xdebug/xdebug_profiler.c - Added FR #148: Option to append to cachegrind files, instead of overwriting.

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Thu, 22 Sep 2005 20:36:51 +0200

Date: Thu Sep 22 20:36:51 CEST 2005
User: Derick Rethans
Directory: xdebug

Log Message:
[0.25]
- Added FR #148: Option to append to cachegrind files, instead of overwriting.

Modified files:
           xdebug/php_xdebug.h (version: 1.92)
           xdebug/xdebug.c (version: 1.275)
           xdebug/xdebug_profiler.c (version: 1.30)

[FILE: /xdebug/php_xdebug.h]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- xdebug/php_xdebug.h:1.91 Thu Jul 21 13:40:35 2005 GMT
+++ xdebug/php_xdebug.h Thu Sep 22 16:36:51 2005 GMT
@@ -163,6 +163,7 @@
         char *profiler_output_dir;
         char *profiler_output_name; /* "pid" or "crc32" */
         zend_bool profiler_enable_trigger;
+ zend_bool profiler_append;
 
         /* profiler globals */
         zend_bool profiler_enabled;

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.274
retrieving revision 1.275
diff -u -r1.274 -r1.275
--- xdebug/xdebug.c:1.274 Wed Sep 21 07:01:49 2005 GMT
+++ xdebug/xdebug.c Thu Sep 22 16:36:51 2005 GMT
@@ -309,6 +309,7 @@
         STD_PHP_INI_ENTRY("xdebug.profiler_output_dir", "/tmp", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, profiler_output_dir, zend_xdebug_globals, xdebug_globals)
         STD_PHP_INI_ENTRY("xdebug.profiler_output_name", "crc32", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, profiler_output_name, zend_xdebug_globals, xdebug_globals)
         STD_PHP_INI_BOOLEAN("xdebug.profiler_enable_trigger", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, profiler_enable_trigger, zend_xdebug_globals, xdebug_globals)
+ STD_PHP_INI_BOOLEAN("xdebug.profiler_append", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, profiler_append, zend_xdebug_globals, xdebug_globals)
 
         /* Remote debugger settings */
         STD_PHP_INI_BOOLEAN("xdebug.remote_enable", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, remote_enable, zend_xdebug_globals, xdebug_globals)

[FILE: /xdebug/xdebug_profiler.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- xdebug/xdebug_profiler.c:1.29 Thu Jul 21 14:33:57 2005 GMT
+++ xdebug/xdebug_profiler.c Thu Sep 22 16:36:51 2005 GMT
@@ -54,10 +54,17 @@
                 filename = xdebug_sprintf("%s/cachegrind.out.%ld", XG(profiler_output_dir), getpid());
         }
 
- XG(profile_file) = fopen(filename, "w");
+ if (XG(profiler_append)) {
+ XG(profile_file) = fopen(filename, "a");
+ } else {
+ XG(profile_file) = fopen(filename, "w");
+ }
         if (!XG(profile_file)) {
                 return FAILURE;
- }
+ }
+ if (XG(profiler_append)) {
+ fprintf(XG(profile_file), "\n==== NEW PROFILING FILE ==============================================\n");
+ }
         XG(profile_filename) = estrdup(filename);
         fprintf(XG(profile_file), "version: 0.9.6\ncmd: %s\npart: 1\n\nevents: Time Memory\n\n", script_name);
         fflush(XG(profile_file));
Received on Thu Sep 22 2005 - 20:37:07 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST