[xdebug-dev] svn: /xdebug/trunk/ xdebug_profiler.c xdebug_stack.c

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Wed, 03 Nov 2010 21:59:05 +0000

derick Wed, 03 Nov 2010 21:59:05 +0000

Revision: http://svn.xdebug.org/cgi-bin/viewvc.cgi?view=rev&revision=3366&root=xdebug

Log:
- An optimisation that defers profiler structure allocations til it is actually
  needed.

Changed paths:
    U xdebug/trunk/xdebug_profiler.c
    U xdebug/trunk/xdebug_stack.c

Modified: xdebug/trunk/xdebug_profiler.c
===================================================================
--- xdebug/trunk/xdebug_profiler.c 2010-11-03 21:55:34 UTC (rev 3365)
+++ xdebug/trunk/xdebug_profiler.c 2010-11-03 21:59:05 UTC (rev 3366)
@@ -132,6 +132,9 @@
         char *tmp_fname, *tmp_name;
         int default_lineno = 0;

+ if (!fse->profile.call_list) {
+ fse->profile.call_list = xdebug_llist_alloc(xdebug_profile_call_entry_dtor);
+ }
         xdebug_profiler_function_push(fse);
         tmp_name = xdebug_show_fname(fse->function, 0, 0 TSRMLS_CC);
         switch (fse->function.type) {

Modified: xdebug/trunk/xdebug_stack.c
===================================================================
--- xdebug/trunk/xdebug_stack.c 2010-11-03 21:55:34 UTC (rev 3365)
+++ xdebug/trunk/xdebug_stack.c 2010-11-03 21:59:05 UTC (rev 3366)
@@ -822,7 +822,7 @@
         tmp->user_defined = type;
         tmp->filename = NULL;
         tmp->include_filename = NULL;
- tmp->profile.call_list = xdebug_llist_alloc(xdebug_profile_call_entry_dtor);
+ tmp->profile.call_list = NULL;
         tmp->op_array = op_array;
         tmp->symbol_table = NULL;
         tmp->execute_data = NULL;
Received on Wed Nov 03 2010 - 21:59:05 GMT

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