Revision: 1190
Author: [email protected]
Date: Wed Apr 21 04:38:30 2010
Log: More work on merging of string evals, including editing of sub
called-by data
(which we have to do else limited merging wouldn't be viable due to calls
to slowops etc).
http://code.google.com/p/perl-devel-nytprof/source/detail?r=1190
Modified:
/trunk/bin/nytprofhtml
/trunk/lib/Devel/NYTProf/Data.pm
/trunk/lib/Devel/NYTProf/FileInfo.pm
/trunk/lib/Devel/NYTProf/SubInfo.pm
/trunk/t/test09.rdt
/trunk/t/test20-streval.rdt
/trunk/t/test21-streval3.p
/trunk/t/test21-streval3.x
=======================================
--- /trunk/bin/nytprofhtml Mon Apr 19 04:08:57 2010
+++ /trunk/bin/nytprofhtml Wed Apr 21 04:38:30 2010
@@ -426,7 +426,7 @@
for my $caller (@callers) {
my ($fid, $line, $count, $incl_time, $excl_time, undef, undef,
undef, undef, $calling_subs) = @$caller;
- my $fi = $profile->fileinfo_of($fid);
+ my $caller_fi = $profile->fileinfo_of($fid);
my @subnames = sort keys %$calling_subs;
ref $_ and $_ = sprintf "%s (merge of %d subs)", $_->[0],
scalar @$_
@@ -439,20 +439,13 @@
my $times = sprintf " (%s+%s)", fmt_time($excl_time),
fmt_time($incl_time - $excl_time);
- my $filename = $fi->filename($fid);
+ my $filename = $caller_fi->filename($fid);
my $line_desc = "line $line of $filename";
- # chase string eval chain back to a real file
- while (0 and my ($outer_fileinfo, $outer_line) = $fi->outer ) {
- ($filename, $line) = ($outer_fileinfo->filename,
$outer_line);
- $line_desc .= sprintf " at line %s of %s", $line,
$filename;
- $fi = $outer_fileinfo;
- }
-
- my $href = $reporter->href_for_file($fi, $line) || 'unknown';
$line_desc =~ s/ of \Q$filename\E$//g if $filename eq
$fi->filename;
# remove @INC prefix from paths
$line_desc =~ s/$inc_path_regex//g;
+ my $href = $reporter->href_for_file($caller_fi, $line) |
| 'unknown';
push @prologue,
sprintf q{# %*s times%s%s at <a href="%s">%s</a>%s},
length($max_calls), $count, $times, $subname, $href,
=======================================
--- /trunk/lib/Devel/NYTProf/Data.pm Mon Apr 19 03:06:11 2010
+++ /trunk/lib/Devel/NYTProf/Data.pm Wed Apr 21 04:38:30 2010
@@ -102,15 +102,31 @@
(my $sub_class = $class) =~ s/\w+$/SubInfo/;
$_ and bless $_ => $sub_class for values %$sub_subinfo;
- $profile->_clear_caches;
-
# Where a given eval() has been invoked more than once
# rollup the corresponding fids if they're "uninteresting".
- # Currently uninteresting means:
- # - defines no subs, and
- # - has no evals
+ for my $fi ($profile->noneval_fileinfos) {
+ $profile->collapse_evals_in($fi);
+ }
+
+ $profile->_clear_caches;
+
+ # a hack for testing/debugging
+ if (my $env = $ENV{NYTPROF_ONLOAD}) {
+ my %onload = map { split /=/, $_, 2 } split /:/, $env, -1;
+ warn _dumper($profile) if $onload{dump};
+ exit $onload{exit} if defined $onload{exit};
+ }
+
+ return $profile;
+}
+
+
+sub collapse_evals_in {
+ my ($profile, $parent_fi) = @_;
+
my %eval_places;
- for my $fi ($profile->eval_fileinfos) {
+ for my $fi ($parent_fi->has_evals) {
+ $profile->collapse_evals_in($fi); # recurse first
push @{ $eval_places{$fi->eval_fid}->{$fi->eval_line} }, $fi;
}
while ( my ($fid, $line2fis) = each %eval_places) {
@@ -128,24 +144,12 @@
next if @subs; # ignore if the eval defines subs
next if @evals; # ignore if the eval has nested evals
- next if @calls; # ignore if the eval calls subs XXX temp due
to opcodes
warn "$msg COLLAPSING\n" if $trace >= 0;
my $parent = $siblings->[0]->eval_fi;
$parent->collapse_sibling_evals(@$siblings);
}
}
-
- $profile->_clear_caches;
-
- # a hack for testing/debugging
- if (my $env = $ENV{NYTPROF_ONLOAD}) {
- my %onload = map { split /=/, $_, 2 } split /:/, $env, -1;
- warn _dumper($profile) if $onload{dump};
- exit $onload{exit} if defined $onload{exit};
- }
-
- return $profile;
}
sub _caches { return shift->{caches} ||= {} }
@@ -306,6 +310,21 @@
return undef unless defined $fi->fid; # nullified?
return $fi;
}
+
+
+sub subinfo_of {
+ my ($self, $subname) = @_;
+
+ if (not defined $subname) {
+ carp "Can't resolve subinfo of undef value";
+ return undef;
+ }
+
+ my $si = $self->{sub_subinfo}{$subname}
+ or warn carp "Can't resolve subinfo of '$subname'";
+
+ return $si;
+}
sub inc {
@@ -387,6 +406,7 @@
_dump_elements($startnode, $separator, $filehandle, [], $callback);
}
+
sub _dump_elements {
my ($r, $separator, $fh, $path, $callback) = @_;
=======================================
--- /trunk/lib/Devel/NYTProf/FileInfo.pm Mon Apr 19 04:08:57 2010
+++ /trunk/lib/Devel/NYTProf/FileInfo.pm Wed Apr 21 04:38:30 2010
@@ -2,7 +2,7 @@
use strict;
-use List::Util qw(sum);
+use List::Util qw(sum max);
use Devel::NYTProf::Util qw(strip_prefix_from_paths);
@@ -15,7 +15,7 @@
NYTP_FIDi_elements
NYTP_SCi_CALL_COUNT NYTP_SCi_INCL_RTIME NYTP_SCi_EXCL_RTIME
NYTP_SCi_RECI_RTIME
- NYTP_SCi_CALLING_SUB
+ NYTP_SCi_REC_DEPTH NYTP_SCi_CALLING_SUB
);
# extra constants for private elements
@@ -39,8 +39,8 @@
sub flags { shift->[NYTP_FIDi_FLAGS()] }
sub is_fake { shift->flags & NYTP_FIDf_IS_FAKE }
sub is_file {
- my $self = shift;
- return not ($self->is_fake or $self->is_eval);
+ my $self = shift;
+ return not ($self->is_fake or $self->is_eval);
}
# general purpose hash - mainly a hack to help kill off Reader.pm
@@ -94,10 +94,10 @@
# return subs defined as list of SubInfo objects
# XXX add $include_evals arg?
sub subs_defined {
- return values %{ shift->[NYTP_FIDi_SUBS_DEFINED()] };
+ return values %{ shift->[NYTP_FIDi_SUBS_DEFINED()] };
}
sub subs_defined_sorted {
- return sort { $a->subname cmp $b->subname } shift->subs_defined;
+ return sort { $a->subname cmp $b->subname } shift->subs_defined;
}
@@ -124,8 +124,8 @@
{
42 => {
- 'pkg1::foo' => [ 1, 0.02093 ],
- 'pkg1::bar' => [ 1, 0.00154 ],
+ 'pkg1::foo' => [ 1, 0.02093 ],
+ 'pkg1::bar' => [ 1, 0.00154 ],
},
}
@@ -246,41 +246,72 @@
sub collapse_sibling_evals {
- my ($self, $survivor, @donors) = @_;
-
- die "Can't collapse_sibling_evals of non-sibling evals"
- if grep { $_->eval_fid != $survivor->eval_fid or
- $_->eval_line != $survivor->eval_line
- } @donors;
-
- my $s_ltd = $survivor->line_time_data; # XXX line only
+ my ($self, $survivor, @donors) = @_;
+ my $profile = $self->profile;
+
+ die "Can't collapse_sibling_evals of non-sibling evals"
+ if grep { $_->eval_fid != $survivor->eval_fid or
+ $_->eval_line != $survivor->eval_line
+ } @donors;
+
+ my $s_ltd = $survivor->line_time_data; # XXX line only
+ my $s_scl = $survivor->sub_call_lines;
for my $donor_fi (@donors) {
- # copy data from donor to survivor then delete donor
-
- # XXX nested evals not handled yet
- warn "collapse_sibling_evals: nested evals not handled"
- if $donor_fi->has_evals;
-
- # XXX subs defined not handled yet
- warn "collapse_sibling_evals: subs defined not handled"
- if $donor_fi->subs_defined;
-
- if (my $sub_call_lines = $donor_fi->sub_call_lines) {
- warn "collapse_sibling_evals: subs called not handled
yet"
- }
-
- # copy line time data
- my $d_ltd = $donor_fi->line_time_data; # XXX line only
- for my $line (0...@$d_ltd-1) {
- my $d_tld_l = $d_ltd->[$line] or next;
- my $s_tld_l = $s_ltd->[$line] ||= [];
- $s_tld_l->[$_] += $d_tld_l->[$_] for (0...@$d_tld_l-1);
- warn sprintf "%d:%d: @$s_tld_l from @$d_tld_l fid:%d\n",
- $survivor->fid, $line, $donor_fi->fid if 0;
- }
-
- push @{ $survivor->meta->{merged_fids} }, $donor_fi->fid;
+ # copy data from donor to survivor then delete donor
+
+ # XXX nested evals not handled yet
+ warn "collapse_sibling_evals: nested evals not handled"
+ if $donor_fi->has_evals;
+
+ # XXX subs defined not handled yet
+ warn "collapse_sibling_evals: subs defined not handled"
+ if $donor_fi->subs_defined;
+
+ # '1' => { 'main::foo' => [ 1, '1.38e-05', '1.24e-05', ...,
{ 'main::RUNTIME' => undef } ] }
+ if (my $sub_call_lines = $donor_fi->sub_call_lines) {
+
+ my %subnames_called;
+
+ # merge details of subs called from $donor_fi
+ while ( my ($line, $sc_hash) = each %$sub_call_lines ) {
+ my $s_sc_hash = $s_scl->{$line} ||= {};
+ while ( my ($subname, $sc_info) = each %$sc_hash ) {
+ my $s_sc_info = $s_sc_hash->{$subname} ||= [];
+ $subnames_called{$subname}++;
+
+ if (@$s_sc_info) { # need to merge
+ $s_sc_info->[$_] += $sc_info->[$_]
+ for 0..5; # XXX
+ $s_sc_info->[$_] = max($s_sc_info->[$_],
$sc_info->[$_])
+ for (NYTP_SCi_REC_DEPTH);
+ $s_sc_info->[NYTP_SCi_CALLING_SUB]->{$_} = undef
+ for keys %{ $sc_info->[NYTP_SCi_CALLING_SUB] };
+ }
+ else {
+ @$s_sc_info = @$sc_info;
+ }
+ }
+ }
+ %$sub_call_lines = (); # zap
+
+ # update subinfo
+ $profile->subinfo_of($_)->alter_fileinfo($donor_fi, $survivor)
+ for keys %subnames_called;
+
+ }
+
+ # copy line time data
+ my $d_ltd = $donor_fi->line_time_data; # XXX line only
+ for my $line (0...@$d_ltd-1) {
+ my $d_tld_l = $d_ltd->[$line] or next;
+ my $s_tld_l = $s_ltd->[$line] ||= [];
+ $s_tld_l->[$_] += $d_tld_l->[$_] for (0...@$d_tld_l-1);
+ warn sprintf "%d:%d: @$s_tld_l from @$d_tld_l fid:%d\n",
+ $survivor->fid, $line, $donor_fi->fid if 0;
+ }
+
+ push @{ $survivor->meta->{merged_fids} }, $donor_fi->fid;
$self->_delete_eval($donor_fi);
$donor_fi->_nullify;
}
@@ -422,16 +453,20 @@
my $eval_fis = $eval_lines{$line};
my @has_evals = map { $_->has_evals(1) } @$eval_fis;
-
+ my @merged_fids = map { @{ $_->meta->{merged_fids}||[]} }
@$eval_fis;
+
+ #printf $fh "%s%s%s%d%s[ count %d nested %d merged %d ]\n",
printf $fh "%s%s%s%d%s[ %s %s ]\n",
$prefix, 'eval', $separator,
$eval_fis->[0]->eval_line, $separator,
scalar @$eval_fis, # count of evals executed on this line
scalar @has_evals, # count of nested evals they executed
+ #scalar @merged_fids, # count of evals merged (collapsed)
away
}
}
}
+# vim: ts=8:sw=4:et
1;
=======================================
--- /trunk/lib/Devel/NYTProf/SubInfo.pm Sun Apr 18 09:17:15 2010
+++ /trunk/lib/Devel/NYTProf/SubInfo.pm Wed Apr 21 04:38:30 2010
@@ -4,6 +4,8 @@
use warnings;
use Carp;
+use List::Util qw(sum min max);
+
use Devel::NYTProf::Constants qw(
NYTP_SIi_FID NYTP_SIi_FIRST_LINE NYTP_SIi_LAST_LINE
NYTP_SIi_CALL_COUNT NYTP_SIi_INCL_RTIME NYTP_SIi_EXCL_RTIME
@@ -14,8 +16,6 @@
NYTP_SCi_CALLING_SUB
);
-use List::Util qw(sum min max);
-
sub fid { $_[0]->[NYTP_SIi_FID] || croak "No fid for $_[0][6]" }
sub first_line { shift->[NYTP_SIi_FIRST_LINE] }
@@ -116,6 +116,33 @@
return undef unless defined $a;
return max($a, $b);
}
+
+
+sub alter_fileinfo {
+ my ($self, $remove_fi, $new_fi) = @_;
+ my $remove_fid = $remove_fi->fid;
+ my $new_fid = $new_fi->fid;
+
+ # remove mentions of $remove_fid from called-by details
+ # { fid => { line => [ count, incl, excl, ... ] } }
+ if (my $called_by = $self->[NYTP_SIi_CALLED_BY]) {
+ my $cb = delete $called_by->{$remove_fid};
+
+ if ($cb && $new_fid) {
+ if (my $new_cb = $called_by->{$new_fid}) {
+ # need to merge $cb into $new_cb
+ while ( my ($line, $cb_li) = each %$cb ) {
+ my $dst_line_info = $new_cb->{$line} ||= [];
+ _merge_in_caller_info($dst_line_info, $cb->{$line});
+ }
+ }
+ else {
+ $called_by->{$new_fid} = $cb;
+ }
+ }
+ }
+}
+
# merge details of another sub into this one
# there are very few cases where this is sane thing to do
@@ -159,30 +186,37 @@
# merge lines in %$src_line_hash into %$dst_line_hash
while (my ($line, $src_line_info) = each %$src_line_hash) {
- my $dst_line_info = $dst_line_hash->{$line};
- if (!$dst_line_info) {
- $dst_line_hash->{$line} = $src_line_info;
- next;
- }
-
- # merge @$src_line_info into @$dst_line_info
- $dst_line_info->[$_] += $src_line_info->[$_] for (
- NYTP_SCi_INCL_RTIME, NYTP_SCi_EXCL_RTIME,
- );
- # ug, we can't really combine recursive incl_time, but this is
better than undef
- $dst_line_info->[NYTP_SCi_RECI_RTIME] =
max($dst_line_info->[NYTP_SCi_RECI_RTIME],
-
$src_line_info->[NYTP_SCi_RECI_RTIME]);
-
- my $src_cs = $src_line_info->[NYTP_SCi_CALLING_SUB]||={};
- my $dst_cs = $dst_line_info->[NYTP_SCi_CALLING_SUB]||={};
- $dst_cs->{$_} = $src_cs->{$_} for keys %$src_cs;
-
- #push @{$src_line_info}, "merged"; # flag hack, for debug
- }
- }
-
+ my $dst_line_info = $dst_line_hash->{$line} ||= [];
+ _merge_in_caller_info($dst_line_info, $src_line_info);
+ }
+ }
+ return;
+}
+
+
+sub _merge_in_caller_info {
+ my ($dst_line_info, $src_line_info) = @_;
+
+ if (!...@$dst_line_info) {
+ @$dst_line_info = @$src_line_info;
+ }
+ else {
+
+ # merge @$src_line_info into @$dst_line_info
+ $dst_line_info->[$_] += $src_line_info->[$_] for (
+ NYTP_SCi_INCL_RTIME, NYTP_SCi_EXCL_RTIME,
+ );
+ # ug, we can't really combine recursive incl_time, but this is
better than undef
+ $dst_line_info->[NYTP_SCi_RECI_RTIME] =
max($dst_line_info->[NYTP_SCi_RECI_RTIME],
+
$src_line_info->[NYTP_SCi_RECI_RTIME]);
+
+ my $src_cs = $src_line_info->[NYTP_SCi_CALLING_SUB]||={};
+ my $dst_cs = $dst_line_info->[NYTP_SCi_CALLING_SUB]||={};
+ $dst_cs->{$_} = $src_cs->{$_} for keys %$src_cs;
+ }
return;
}
+
sub caller_fids {
my ($self, $merge_evals) = @_;
@@ -218,7 +252,7 @@
$self->[NYTP_SIi_EXCL_RTIME] = 0;
$self->[NYTP_SIi_RECI_RTIME] = 0;
- # { fid => { line => [ count, incl, excl, spare3, spare4, reci,
recdepth ] } }
+ # { fid => { line => [ count, incl, excl, ... ] } }
my $callers = $self->[NYTP_SIi_CALLED_BY] || {};
# calls from modules shipped with perl cause problems for tests
@@ -268,4 +302,5 @@
}
}
+# vim:ts=8:sw=4:et
1;
=======================================
--- /trunk/t/test09.rdt Mon Apr 19 04:08:57 2010
+++ /trunk/t/test09.rdt Wed Apr 21 04:38:30 2010
@@ -22,9 +22,6 @@
fid_block_time 2 2 [ 0 1 ]
fid_block_time 2 3 [ 0 1 ]
fid_block_time 3 1 [ 0 10002 ]
-fid_block_time 4 1 [ 0 1 ]
-fid_block_time 4 2 [ 0 1 ]
-fid_block_time 4 3 [ 0 1 ]
fid_fileinfo 1 [ test09.p 1 2 0 0 ]
fid_fileinfo 1 sub main::BEGIN 0-0
fid_fileinfo 1 sub main::RUNTIME 1-1
@@ -33,25 +30,20 @@
fid_fileinfo 1 call 11 main::foo [ 1 0 0 0 0 0 0
main::RUNTIME ]
fid_fileinfo 1 call 12 main::foo [ 1 0 0 0 0 0 0
main::RUNTIME ]
fid_fileinfo 1 call 13 main::bar [ 1 0 0 0 0 0 0
main::RUNTIME ]
-fid_fileinfo 1 eval 2 [ 2 0 ]
+fid_fileinfo 1 eval 2 [ 1 0 ]
fid_fileinfo 1 eval 8 [ 1 0 ]
fid_fileinfo 2 [ (eval 0)[test09.p:2] 1 2 2 2 0 0 ]
-fid_fileinfo 2 call 3 main::bar [ 1 0 0 0 0 0 0
main::foo ]
+fid_fileinfo 2 call 3 main::bar [ 2 0 0 0 0 0 0
main::foo ]
fid_fileinfo 3 [ (eval 0)[test09.p:8] 1 8 3 2 0 0 ]
-fid_fileinfo 4 [ (eval 0)[test09.p:2] 1 2 4 2 0 0 ]
-fid_fileinfo 4 call 3 main::bar [ 1 0 0 0 0 0 0
main::foo ]
fid_line_time 1 2 [ 0 2 ]
fid_line_time 1 8 [ 0 3 ]
fid_line_time 1 11 [ 0 1 ]
fid_line_time 1 12 [ 0 1 ]
fid_line_time 1 13 [ 0 1 ]
-fid_line_time 2 1 [ 0 1 ]
-fid_line_time 2 2 [ 0 1 ]
-fid_line_time 2 3 [ 0 1 ]
+fid_line_time 2 1 [ 0 2 ]
+fid_line_time 2 2 [ 0 2 ]
+fid_line_time 2 3 [ 0 2 ]
fid_line_time 3 1 [ 0 30006 ]
-fid_line_time 4 1 [ 0 1 ]
-fid_line_time 4 2 [ 0 1 ]
-fid_line_time 4 3 [ 0 1 ]
fid_sub_time 1 2 [ 0 2 ]
fid_sub_time 1 8 [ 0 3 ]
fid_sub_time 1 11 [ 0 1 ]
@@ -61,9 +53,6 @@
fid_sub_time 2 2 [ 0 1 ]
fid_sub_time 2 3 [ 0 1 ]
fid_sub_time 3 1 [ 0 10002 ]
-fid_sub_time 4 1 [ 0 1 ]
-fid_sub_time 4 2 [ 0 1 ]
-fid_sub_time 4 3 [ 0 1 ]
profile_modes fid_block_time block
profile_modes fid_line_time line
profile_modes fid_sub_time sub
@@ -71,8 +60,7 @@
sub_subinfo main::RUNTIME [ 1 1 1 0 0 0 0 0 ]
sub_subinfo main::bar [ 1 7 9 3 0 0 0 0 ]
sub_subinfo main::bar called_by 1 13 [ 1 0 0 0 0 0 0
main::RUNTIME ]
-sub_subinfo main::bar called_by 2 3 [ 1 0 0 0 0 0 0
main::foo ]
-sub_subinfo main::bar called_by 4 3 [ 1 0 0 0 0 0 0
main::foo ]
+sub_subinfo main::bar called_by 2 3 [ 2 0 0 0 0 0 0
main::foo ]
sub_subinfo main::foo [ 1 1 5 2 0 0 0 0 ]
sub_subinfo main::foo called_by 1 11 [ 1 0 0 0 0 0 0
main::RUNTIME ]
sub_subinfo main::foo called_by 1 12 [ 1 0 0 0 0 0 0
main::RUNTIME ]
=======================================
--- /trunk/t/test20-streval.rdt Mon Apr 5 16:22:16 2010
+++ /trunk/t/test20-streval.rdt Wed Apr 21 04:38:30 2010
@@ -20,7 +20,6 @@
fid_block_time 1 14 [ 0 1 ]
fid_block_time 2 1 [ 0 1 ]
fid_block_time 3 1 [ 0 1 ]
-fid_block_time 4 1 [ 0 1 ]
fid_block_time 5 1 [ 0 1 ]
fid_block_time 6 1 [ 0 1 ]
fid_fileinfo 1 [ test20-streval.p 1 2 0 0 ]
@@ -30,14 +29,12 @@
fid_fileinfo 1 sub main::foo 3-3
fid_fileinfo 1 call 3 main::CORE:print [ 4 0 0 0 0 0 0
main::foo ]
fid_fileinfo 1 eval 8 [ 1 0 ]
-fid_fileinfo 1 eval 11 [ 2 0 ]
+fid_fileinfo 1 eval 11 [ 1 0 ]
fid_fileinfo 1 eval 14 [ 1 1 ]
fid_fileinfo 2 [ (eval 0)[test20-streval.p:8] 1 8 2 2 0 0 ]
fid_fileinfo 2 call 1 main::foo [ 1 0 0 0 0 0 0
main::RUNTIME ]
fid_fileinfo 3 [ (eval 0)[test20-streval.p:11] 1 11 3 2 0 0 ]
-fid_fileinfo 3 call 1 main::foo [ 1 0 0 0 0 0 0
main::RUNTIME ]
-fid_fileinfo 4 [ (eval 0)[test20-streval.p:11] 1 11 4 2 0 0 ]
-fid_fileinfo 4 call 1 main::foo [ 1 0 0 0 0 0 0
main::RUNTIME ]
+fid_fileinfo 3 call 1 main::foo [ 2 0 0 0 0 0 0
main::RUNTIME ]
fid_fileinfo 5 [ (eval 0)[test20-streval.p:14] 1 14 5 2 0 0 ]
fid_fileinfo 5 eval 1 [ 1 0 ]
fid_fileinfo 6 [ (eval 0)[(eval 0)[test20-streval.p:14]:1] 5 1 6 2 0 0
]
@@ -48,8 +45,7 @@
fid_line_time 1 11 [ 0 2 ]
fid_line_time 1 14 [ 0 1 ]
fid_line_time 2 1 [ 0 1 ]
-fid_line_time 3 1 [ 0 1 ]
-fid_line_time 4 1 [ 0 1 ]
+fid_line_time 3 1 [ 0 2 ]
fid_line_time 5 1 [ 0 1 ]
fid_line_time 6 1 [ 0 1 ]
fid_sub_time 1 3 [ 0 4 ]
@@ -59,7 +55,6 @@
fid_sub_time 1 14 [ 0 1 ]
fid_sub_time 2 1 [ 0 1 ]
fid_sub_time 3 1 [ 0 1 ]
-fid_sub_time 4 1 [ 0 1 ]
fid_sub_time 5 1 [ 0 1 ]
fid_sub_time 6 1 [ 0 1 ]
profile_modes fid_block_time block
@@ -71,6 +66,5 @@
sub_subinfo main::RUNTIME [ 1 1 1 0 0 0 0 0 ]
sub_subinfo main::foo [ 1 3 3 4 0 0 0 0 ]
sub_subinfo main::foo called_by 2 1 [ 1 0 0 0 0 0 0
main::RUNTIME ]
-sub_subinfo main::foo called_by 3 1 [ 1 0 0 0 0 0 0
main::RUNTIME ]
-sub_subinfo main::foo called_by 4 1 [ 1 0 0 0 0 0 0
main::RUNTIME ]
+sub_subinfo main::foo called_by 3 1 [ 2 0 0 0 0 0 0
main::RUNTIME ]
sub_subinfo main::foo called_by 6 1 [ 1 0 0 0 0 0 0
main::RUNTIME ]
=======================================
--- /trunk/t/test21-streval3.p Wed Nov 19 05:23:52 2008
+++ /trunk/t/test21-streval3.p Wed Apr 21 04:38:30 2010
@@ -1,6 +1,6 @@
# test nested string evals
-# inner time should propagate to outermost eval
-# statement counts currently don't - debatable value
+
+
sub foo { 1 }
my $code = q{
select(undef,undef,undef,0.2);
=======================================
--- /trunk/t/test21-streval3.x Wed Nov 19 05:33:40 2008
+++ /trunk/t/test21-streval3.x Wed Apr 21 04:38:30 2010
@@ -2,8 +2,8 @@
# More information at http://search.cpan.org/dist/Devel-NYTProf/
# Format: time,calls,time/call,code
0,0,0,# test nested string evals
-0,0,0,# inner time should propagate to outermost eval
-0,0,0,# statement counts currently don't - debatable value
+0,0,0,
+0,0,0,
0,3,0,sub foo { 1 }
0,1,0,my $code = q{
0,0,0,select(undef,undef,undef,0.2);
@@ -17,4 +17,4 @@
0,0,0,}
0,0,0,}
0,0,0,};
-~0.6,1,0,eval $code;
+0,1,0,eval $code;
--
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]