← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/pan_genome_post_analysis
  Run on Fri Mar 27 11:43:32 2015
Reported on Fri Mar 27 11:45:33 2015

Filename/Users/ap13/perl5/lib/perl5/darwin-2level/Sub/Identify.pm
StatementsExecuted 19 statements in 774µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11132µs313µsSub::Identify::::BEGIN@6Sub::Identify::BEGIN@6
11113µs27µsSub::Identify::::BEGIN@3Sub::Identify::BEGIN@3
11110µs30µ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_fullnameSub::Identify::sub_fullname
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
3224µs241µs
# spent 27µs (13+14) within Sub::Identify::BEGIN@3 which was called: # once (13µs+14µs) by Devel::OverloadInfo::BEGIN@18 at line 3
use strict;
# spent 27µs making 1 call to Sub::Identify::BEGIN@3 # spent 14µs making 1 call to strict::import
42290µs250µs
# spent 30µs (10+20) within Sub::Identify::BEGIN@4 which was called: # once (10µs+20µs) by Devel::OverloadInfo::BEGIN@18 at line 4
use Exporter;
# spent 30µs making 1 call to Sub::Identify::BEGIN@4 # spent 20µs making 1 call to Exporter::import
5
6
# spent 313µs (32+280) within Sub::Identify::BEGIN@6 which was called: # once (32µs+280µs) by Devel::OverloadInfo::BEGIN@18 at line 46
BEGIN {
7719µ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;
1243µs unless ($ENV{PERL_SUB_IDENTIFY_PP}) {
13 local $@;
1412µs eval {
152286µs if ($] >= 5.006) {
16 require XSLoader;
171280µs XSLoader::load(__PACKAGE__, $VERSION);
# spent 280µs 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 }
461146µs1313µs}
# spent 313µs 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] }
50sub sub_fullname ($) { join '::', get_code_info($_[0]) }
51
5214µs1;
53
54__END__