[svn:parrot] r40848 - branches/pluggable_runcore/src/runcore
cotto at svn.parrot.org
cotto at svn.parrot.org
Sat Aug 29 00:33:02 UTC 2009
Author: cotto
Date: Sat Aug 29 00:33:01 2009
New Revision: 40848
URL: https://trac.parrot.org/parrot/changeset/40848
Log:
[profiling] a few further cleanups and explanatory comments
Modified:
branches/pluggable_runcore/src/runcore/cores.c
Modified: branches/pluggable_runcore/src/runcore/cores.c
==============================================================================
--- branches/pluggable_runcore/src/runcore/cores.c Sat Aug 29 00:12:23 2009 (r40847)
+++ branches/pluggable_runcore/src/runcore/cores.c Sat Aug 29 00:33:01 2009 (r40848)
@@ -1083,7 +1083,7 @@
Parrot_Context_info preop_info, postop_info;
PMC *preop_sub;
opcode_t *preop_pc;
- HUGEINTVAL op_time;
+ UHUGEINTVAL op_time;
char unknown_file[] = "<unknown file>";
runcore->runcore_start = Parrot_hires_get_time();
@@ -1161,10 +1161,11 @@
postop_info.line, op_time,
(interp->op_info_table)[*preop_pc].name);
+ /* if the active sub changed while the previous op was executed... */
if (preop_sub != CONTEXT(interp)->current_sub) {
+ /* if the current_sub is null, Parrot's probably done executing */
if (CONTEXT(interp)->current_sub) {
-
STRING *sub_name;
GETATTR_Sub_name(interp, CONTEXT(interp)->current_sub, sub_name);
fprintf(runcore->prof_fd, "CS:%s;%s at 0x%X,0x%X\n",
@@ -1173,12 +1174,6 @@
(unsigned int) CONTEXT(interp)->current_sub,
(unsigned int) CONTEXT(interp));
}
- else {
- fprintf(runcore->prof_fd, "CS:%s;<unknown sub>@0x%X,0X%X\n",
- VTABLE_get_string(interp, CONTEXT(interp)->current_namespace)->strstart,
- (unsigned int) CONTEXT(interp)->current_sub,
- (unsigned int) CONTEXT(interp));
- }
}
} /* while (pc) */
More information about the parrot-commits
mailing list