[svn:parrot] r49450 - trunk/src/runcore

cotto at svn.parrot.org cotto at svn.parrot.org
Tue Oct 5 18:54:40 UTC 2010


Author: cotto
Date: Tue Oct  5 18:54:39 2010
New Revision: 49450
URL: https://trac.parrot.org/parrot/changeset/49450

Log:
[profiling] move stat collection back, after op execution
I'm not sure the previous change was correct and it didn't end up fixing a bug
I thought it would.

Modified:
   trunk/src/runcore/profiling.c

Modified: trunk/src/runcore/profiling.c
==============================================================================
--- trunk/src/runcore/profiling.c	Tue Oct  5 18:01:20 2010	(r49449)
+++ trunk/src/runcore/profiling.c	Tue Oct  5 18:54:39 2010	(r49450)
@@ -403,14 +403,6 @@
         preop_opname          = interp->code->op_info_table[*pc]->name;
         preop_line_num        = get_line_num_from_cache(interp, runcore, preop_ctx_pmc);
 
-        /* Occasionally the ctx stays the same while the sub changes, e.g.
-         * with a call to a subclass' method. */
-        if ((runcore->prev_ctx != preop_ctx) || runcore->prev_sub != preop_ctx->current_sub)
-            update_ctx_info(interp, runcore, (PPROF_DATA *) &pprof_data, preop_ctx_pmc, preop_pc);
-
-        if (Profiling_report_annotations_TEST(runcore) && interp->code->annotations)
-            record_annotations(interp, runcore, (PPROF_DATA *) &pprof_data, pc);
-
         ++runcore->level;
         Profiling_exit_check_CLEAR(runcore);
 
@@ -428,6 +420,14 @@
 
         --runcore->level;
 
+        /* Occasionally the ctx stays the same while the sub changes, e.g.
+         * with a call to a subclass' method. */
+        if ((runcore->prev_ctx != preop_ctx) || runcore->prev_sub != preop_ctx->current_sub)
+            update_ctx_info(interp, runcore, (PPROF_DATA *) &pprof_data, preop_ctx_pmc, preop_pc);
+
+        if (Profiling_report_annotations_TEST(runcore) && interp->code->annotations)
+            record_annotations(interp, runcore, (PPROF_DATA *) &pprof_data, pc);
+
         if (Profiling_canonical_output_TEST(runcore))
             pprof_data[PPROF_DATA_TIME] = 1;
         else


More information about the parrot-commits mailing list