diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-11-01 14:51:05 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-11-01 14:51:05 +0000 |
commit | b8fcbefe6253f6cbcf6817158c0e99c8018b2d46 (patch) | |
tree | 54f2d06bd6970ced9649e18b6eb5567309a4277b /pp_ctl.c | |
parent | 9480d411d9d7bc0dcccfa1b8e1bdced1cdc21c51 (diff) | |
download | perl-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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); |