[svn:parrot] r42901 - trunk/src/runcore
cotto at svn.parrot.org
cotto at svn.parrot.org
Sat Dec 5 22:36:24 UTC 2009
Author: cotto
Date: Sat Dec 5 22:36:21 2009
New Revision: 42901
URL: https://trac.parrot.org/parrot/changeset/42901
Log:
[profiling] fix filename reporting in profiling output
Modified:
trunk/src/runcore/profiling.c
Modified: trunk/src/runcore/profiling.c
==============================================================================
--- trunk/src/runcore/profiling.c Sat Dec 5 13:51:11 2009 (r42900)
+++ trunk/src/runcore/profiling.c Sat Dec 5 22:36:21 2009 (r42901)
@@ -259,7 +259,7 @@
}
while (pc) {
- STRING *postop_filename;
+ STRING *preop_filename;
Parrot_Context *preop_ctx;
INTVAL preop_line;
@@ -271,6 +271,9 @@
parrot_hash_get(interp, runcore->line_cache,
CONTEXT(interp)->current_pc));
+ preop_filename = Parrot_Sub_get_filename_from_pc(interp,
+ Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp)), pc);
+
if (preop_line == 0) {
preop_line = Parrot_Sub_get_line_from_pc(interp,
Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp)),
@@ -300,8 +303,6 @@
op_time = runcore->op_finish - runcore->op_start;
runcore->level--;
- postop_filename = Parrot_Sub_get_filename_from_pc(interp,
- Parrot_pcc_get_sub(interp, CURRENT_CONTEXT(interp)), pc);
/* if current context changed since the last printing of a CS line... */
/* Occasionally the ctx stays the same while the sub changes, possible
@@ -316,7 +317,7 @@
GETATTR_Sub_name(interp, preop_ctx->current_sub, sub_name);
sub_cstr = Parrot_str_to_cstring(interp, sub_name);
- filename_cstr = Parrot_str_to_cstring(interp, postop_filename);
+ filename_cstr = Parrot_str_to_cstring(interp, preop_filename);
ns_cstr = Parrot_str_to_cstring(interp,
VTABLE_get_string(interp,
preop_ctx->current_namespace));
More information about the parrot-commits
mailing list