summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-11-01 14:51:05 +0000
committerNicholas Clark <nick@ccl4.org>2008-11-01 14:51:05 +0000
commitb8fcbefe6253f6cbcf6817158c0e99c8018b2d46 (patch)
tree54f2d06bd6970ced9649e18b6eb5567309a4277b /pp_ctl.c
parent9480d411d9d7bc0dcccfa1b8e1bdced1cdc21c51 (diff)
downloadperl-b8fcbefe6253f6cbcf6817158c0e99c8018b2d46.tar.gz
Add a flag PERLDBf_SAVESRC, which enables the saved lines part of
PERLDBf_LINE, so that profilers (such as NYTProf) have access to the lines of the eval, without the speed impact of other parts of the debugger infrastructure. PERLDBf_LINE is unchanged. Based largely on a patch by Tim Bunce in <20081028152749.GA12500@timac.local> p4raw-id: //depot/perl@34693
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 8351d53055..2067495277 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -3725,11 +3725,12 @@ PP(pp_entereval)
/* prepare to compile string */
- if (PERLDB_LINE && PL_curstash != PL_debstash)
+ if (PERLDB_SAVESRC && PL_curstash != PL_debstash)
save_lines(CopFILEAV(&PL_compiling), PL_parser->linestr);
PUTBACK;
ok = doeval(gimme, NULL, runcv, seq);
- if (PERLDB_INTER && was != (I32)PL_sub_generation /* Some subs defined here. */
+ if ((PERLDB_LINE || PERLDB_SAVESRC)
+ && was != (I32)PL_sub_generation /* Some subs defined here. */
&& ok) {
/* Copy in anything fake and short. */
my_strlcpy(safestr, fakestr, fakelen);