Date: Mon Feb 19 23:16:08 CET 2007
User: Derick Rethans
Directory: xdebug
Log Message:
[0.25]
- Removed support for Memory profiling as that didn't work properly.
Modified files:
xdebug/xdebug.c (version: 1.372)
xdebug/xdebug_private.h (version: 1.24)
xdebug/xdebug_profiler.c (version: 1.47)
[FILE: /xdebug/xdebug.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -r1.371 -r1.372
--- xdebug/xdebug.c:1.371 Sat Feb 17 21:23:38 2007 GMT
+++ xdebug/xdebug.c Mon Feb 19 21:16:08 2007 GMT
@@ -1140,9 +1140,6 @@
xae.call_count = 0;
xae.time_own = 0;
xae.time_inclusive = 0;
-#if HAVE_PHP_MEMORY_USAGE
- xae.mem_used = 0;
-#endif
xae.call_list = NULL;
zend_hash_add(&XG(aggr_calls), aggr_key, aggr_key_len+1, (void*)&xae, sizeof(xdebug_aggregate_entry), (void**)&tmp->aggr_entry);
[FILE: /xdebug/xdebug_private.h]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- xdebug/xdebug_private.h:1.23 Sun Jan 14 16:00:59 2007 GMT
+++ xdebug/xdebug_private.h Mon Feb 19 21:16:08 2007 GMT
@@ -125,7 +125,6 @@
char *function;
int lineno;
double time_taken;
- long mem_used;
} xdebug_call_entry;
typedef struct xdebug_aggregate_entry {
@@ -136,7 +135,6 @@
int call_count;
double time_own;
double time_inclusive;
- long mem_used;
HashTable *call_list;
} xdebug_aggregate_entry;
[FILE: /xdebug/xdebug_profiler.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- xdebug/xdebug_profiler.c:1.46 Tue Jan 02 15:02:37 2007 GMT
+++ xdebug/xdebug_profiler.c Mon Feb 19 21:16:08 2007 GMT
@@ -96,11 +96,7 @@
if (XG(profiler_append)) {
fprintf(XG(profile_file), "\n==== NEW PROFILING FILE ==============================================\n");
}
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(XG(profile_file), "version: 0.9.6\ncmd: %s\npart: 1\n\nevents: Time Memory\n\n", script_name);
-#else
fprintf(XG(profile_file), "version: 0.9.6\ncmd: %s\npart: 1\n\nevents: Time\n\n", script_name);
-#endif
fflush(XG(profile_file));
return SUCCESS;
}
@@ -141,9 +137,6 @@
{
fse->profile.time = 0;
fse->profile.mark = xdebug_get_utime();
-#if HAVE_PHP_MEMORY_USAGE
- fse->profile.memory = XG_MEMORY_USAGE();
-#endif
}
@@ -178,9 +171,6 @@
ce->time_taken = fse->profile.time;
ce->lineno = fse->lineno;
ce->user_defined = fse->user_defined;
-#if HAVE_PHP_MEMORY_USAGE
- ce->mem_used = fse->profile.memory - XG_MEMORY_USAGE();
-#endif
xdebug_llist_insert_next(fse->prev->profile.call_list, NULL, ce);
}
@@ -198,11 +188,7 @@
xdfree(tmp_name);
if (fse->function.function && strcmp(fse->function.function, "{main}") == 0) {
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(XG(profile_file), "\nsummary: %lu %u\n\n", (unsigned long) (fse->profile.time * 10000000), XG_MEMORY_USAGE());
-#else
fprintf(XG(profile_file), "\nsummary: %lu\n\n", (unsigned long) (fse->profile.time * 10000000));
-#endif
}
fflush(XG(profile_file));
@@ -217,22 +203,12 @@
{
xdebug_call_entry *call_entry = XDEBUG_LLIST_VALP(le);
fse->profile.time -= call_entry->time_taken;
-#if HAVE_PHP_MEMORY_USAGE
- fse->memory -= call_entry->mem_used;
-#endif
- }
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(XG(profile_file), "%d %lu %ld\n", default_lineno, (unsigned long) (fse->profile.time * 10000000), (XG_MEMORY_USAGE() - fse->profile.memory) < 0 ? 0 : (XG_MEMORY_USAGE() - fse->profile.memory));
-#else
+ }
fprintf(XG(profile_file), "%d %lu\n", default_lineno, (unsigned long) (fse->profile.time * 10000000));
-#endif
/* update aggregate data */
if (XG(profiler_aggregate)) {
fse->aggr_entry->time_own += fse->profile.time;
-#if HAVE_PHP_MEMORY_USAGE
- fse->aggr_entry->mem_used += fse->memory;
-#endif
}
/* dump call list */
@@ -247,11 +223,7 @@
}
fprintf(XG(profile_file), "calls=1 0 0\n");
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(XG(profile_file), "%d %lu %ld\n", call_entry->lineno, (unsigned long) (call_entry->time_taken * 10000000), call_entry->mem_used < 0 ? 0 : call_entry->mem_used);
-#else
fprintf(XG(profile_file), "%d %lu\n", call_entry->lineno, (unsigned long) (call_entry->time_taken * 10000000));
-#endif
}
fprintf(XG(profile_file), "\n");
fflush(XG(profile_file));
@@ -276,17 +248,9 @@
fprintf(fp, "fl=%s\n", xae->filename);
fprintf(fp, "fn=%s\n", xae->function);
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(fp, "%d %lu %ld\n", 0, (unsigned long) (xae->time_own * 10000000), (xae->mem_used < 0) ? 0 : xae->mem_used);
-#else
fprintf(fp, "%d %lu\n", 0, (unsigned long) (xae->time_own * 10000000));
-#endif
if (strcmp(xae->function, "{main}") == 0) {
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(fp, "\nsummary: %lu %lu\n\n", (unsigned long) (xae->time_inclusive * 10000000), (xae->mem_used));
-#else
- fprintf(fp, "\nsummary: %lu\n\n", (unsigned long) (xae->time_inclusive * 10000000), (xae->mem_used));
-#endif
+ fprintf(fp, "\nsummary: %lu\n\n", (unsigned long) (xae->time_inclusive * 10000000));
}
if (xae->call_list) {
xdebug_aggregate_entry **xae_call;
@@ -295,11 +259,7 @@
while (zend_hash_get_current_data(xae->call_list, (void**)&xae_call) == SUCCESS) {
fprintf(fp, "cfn=%s\n", (*xae_call)->function);
fprintf(fp, "calls=%d 0 0\n", (*xae_call)->call_count);
-#if HAVE_PHP_MEMORY_USAGE
- fprintf(fp, "%d %lu %ld\n", (*xae_call)->lineno, (unsigned long) ((*xae_call)->time_inclusive * 10000000), (*xae_call)->mem_used < 0 ? 0 : (*xae_call)->mem_used);
-#else
fprintf(fp, "%d %lu\n", (*xae_call)->lineno, (unsigned long) ((*xae_call)->time_inclusive * 10000000));
-#endif
zend_hash_move_forward(xae->call_list);
}
}
Received on Mon Feb 19 2007 - 23:16:11 GMT
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST