diff cbackend.rhope @ 116:60906f8803ef

Improved profiling
author Mike Pavone <pavone@retrodev.com>
date Wed, 13 Oct 2010 02:51:56 -0400
parents fd23ab2c1a73
children 72c648bca43b
line wrap: on
line diff
--- a/cbackend.rhope	Wed Oct 13 01:18:53 2010 +0000
+++ b/cbackend.rhope	Wed Oct 13 02:51:56 2010 -0400
@@ -1484,8 +1484,10 @@
 		]Append["\n
 #ifdef ENABLE_PROFILING
 uint64_t profile_counts[END];
+uint64_t profile_nestedcounts[END];
 uint64_t profile_totals[END];
 uint64_t profile_selftotals[END];
+uint64_t profile_activationlevel[END];
 #endif
 
 int32_t rhope(uint32_t func, object ** params, uint16_t numparams, uint16_t callspace)
@@ -1613,7 +1615,7 @@
 	for (idx = 0; idx < END; ++idx)
 	{
 		if(profile_counts[idx])
-			printf(\"Func: %d\tCount: %llu\tTime: %llu\tAvg: %f\tSelf: %llu\tAvg: %f\\n\", idx, profile_counts[idx], profile_totals[idx], ((double)profile_totals[idx])/((double)profile_counts[idx]), profile_selftotals[idx], ((double)profile_selftotals[idx])/((double)profile_counts[idx]));
+			printf(\"Func: %d\tCount: %llu\tTime: %llu\tAvg: %f\tSelf: %llu\tAvg: %f\tNested Count: %llu\\n\", idx, profile_counts[idx], profile_totals[idx], ((double)profile_totals[idx])/((double)profile_counts[idx]), profile_selftotals[idx], ((double)profile_selftotals[idx])/((double)profile_counts[idx]), profile_nestedcounts[idx]);
 	}
 #endif
 	if (!numret)