← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:57 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Sub/Identify.pm
StatementsExecuted 166 statements in 22.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
14511516µs713µsSub::Identify::::sub_fullnameSub::Identify::sub_fullname
14511198µs198µsSub::Identify::::get_code_infoSub::Identify::get_code_info (xsub)
11194µs20.5msSub::Identify::::BEGIN@6Sub::Identify::BEGIN@6
11190µs106µsSub::Identify::::BEGIN@3Sub::Identify::BEGIN@3
11127µs95µsSub::Identify::::BEGIN@4Sub::Identify::BEGIN@4
0000s0sSub::Identify::::__ANON__[:44]Sub::Identify::__ANON__[:44]
0000s0sSub::Identify::::stash_nameSub::Identify::stash_name
0000s0sSub::Identify::::sub_nameSub::Identify::sub_name
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Sub::Identify;
2
3376µs2122µs
# spent 106µs (90+16) within Sub::Identify::BEGIN@3 which was called: # once (90µs+16µs) by namespace::clean::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/namespace/clean.pm:221] at line 3
use strict;
# spent 106µs making 1 call to Sub::Identify::BEGIN@3 # spent 16µs making 1 call to strict::import
43856µs2162µs
# spent 95µs (27+67) within Sub::Identify::BEGIN@4 which was called: # once (27µs+67µs) by namespace::clean::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/namespace/clean.pm:221] at line 4
use Exporter;
# spent 95µs making 1 call to Sub::Identify::BEGIN@4 # spent 67µs making 1 call to Exporter::import
5
6
# spent 20.5ms (94µs+20.4) within Sub::Identify::BEGIN@6 which was called: # once (94µs+20.4ms) by namespace::clean::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/namespace/clean.pm:221] at line 46
BEGIN {
7756µs our $VERSION = '0.04';
8 our @ISA = ('Exporter');
9 our %EXPORT_TAGS = (all => [ our @EXPORT_OK = qw(sub_name stash_name sub_fullname get_code_info) ]);
10
11 my $loaded = 0;
1247µs unless ($ENV{PERL_SUB_IDENTIFY_PP}) {
13 local $@;
1416µs eval {
15220.5ms if ($] >= 5.006) {
16 require XSLoader;
17120.4ms XSLoader::load(__PACKAGE__, $VERSION);
# spent 20.4ms making 1 call to XSLoader::load
18 }
19 else {
20 require DynaLoader;
21 push @ISA, 'DynaLoader';
22 __PACKAGE__->bootstrap($VERSION);
23 }
24 };
25
26 die $@ if $@ && $@ !~ /object version|loadable object/;
27
28 $loaded = 1 unless $@;
29 }
30
31 our $IsPurePerl = !$loaded;
32
33 if ($IsPurePerl) {
34 require B;
35 *get_code_info = sub ($) {
36 my ($coderef) = @_;
37 ref $coderef or return;
38 my $cv = B::svref_2object($coderef);
39 $cv->isa('B::CV') or return;
40 # bail out if GV is undefined
41 $cv->GV->isa('B::SPECIAL') and return;
42
43 return ($cv->GV->STASH->NAME, $cv->GV->NAME);
44 };
45 }
461340µs120.5ms}
# spent 20.5ms making 1 call to Sub::Identify::BEGIN@6
47
48sub stash_name ($) { (get_code_info($_[0]))[0] }
49sub sub_name ($) { (get_code_info($_[0]))[1] }
50145865µs145198µs
# spent 713µs (516+198) within Sub::Identify::sub_fullname which was called 145 times, avg 5µs/call: # 145 times (516µs+198µs) by namespace::clean::__ANON__[/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/namespace/clean.pm:221] at line 212 of namespace/clean.pm, avg 5µs/call
sub sub_fullname ($) { join '::', get_code_info($_[0]) }
# spent 198µs making 145 calls to Sub::Identify::get_code_info, avg 1µs/call
51
5219µs1;
53
54__END__
 
# spent 198µs within Sub::Identify::get_code_info which was called 145 times, avg 1µs/call: # 145 times (198µs+0s) by Sub::Identify::sub_fullname at line 50, avg 1µs/call
sub Sub::Identify::get_code_info; # xsub