← Index
NYTProf Performance Profile   « line view »
For fastest.pl
  Run on Fri Jan 31 20:48:16 2014
Reported on Fri Jan 31 20:49:40 2014

Filename/opt/perl-5.18.1/lib/site_perl/5.18.1/Devel/GlobalDestruction.pm
StatementsExecuted 12 statements in 456µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.15ms1.37msDevel::GlobalDestruction::::BEGIN@8Devel::GlobalDestruction::BEGIN@8
11114µs30µsDevel::GlobalDestruction::::BEGIN@3Devel::GlobalDestruction::BEGIN@3
11111µs28µsDevel::GlobalDestruction::::BEGIN@23Devel::GlobalDestruction::BEGIN@23
1119µs13µsDevel::GlobalDestruction::::BEGIN@4Devel::GlobalDestruction::BEGIN@4
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Devel::GlobalDestruction;
2
3231µs246µs
# spent 30µs (14+16) within Devel::GlobalDestruction::BEGIN@3 which was called: # once (14µs+16µs) by Class::MOP::Package::BEGIN@15 at line 3
use strict;
# spent 30µs making 1 call to Devel::GlobalDestruction::BEGIN@3 # spent 16µs making 1 call to strict::import
4269µs218µs
# spent 13µs (9+4) within Devel::GlobalDestruction::BEGIN@4 which was called: # once (9µs+4µs) by Class::MOP::Package::BEGIN@15 at line 4
use warnings;
# spent 13µs making 1 call to Devel::GlobalDestruction::BEGIN@4 # spent 4µs making 1 call to warnings::import
5
61800nsour $VERSION = '0.11';
7
81103µs
# spent 1.37ms (1.15+217µs) within Devel::GlobalDestruction::BEGIN@8 which was called: # once (1.15ms+217µs) by Class::MOP::Package::BEGIN@15 at line 11
use Sub::Exporter::Progressive -setup => {
9 exports => [ qw(in_global_destruction) ],
10 groups => { default => [ -all ] },
11183µs21.49ms};
# spent 1.37ms making 1 call to Devel::GlobalDestruction::BEGIN@8 # spent 116µs making 1 call to Sub::Exporter::Progressive::import
12
13# we run 5.14+ - everything is in core
14#
1511µsif (defined ${^GLOBAL_PHASE}) {
16136µs eval 'sub in_global_destruction () { ${^GLOBAL_PHASE} eq q[DESTRUCT] }; 1'
# spent 3µs executing statements in string eval
17 or die $@;
18}
19# try to load the xs version if it was compiled
20#
21elsif (eval {
22 require Devel::GlobalDestruction::XS;
232122µs245µs
# spent 28µs (11+17) within Devel::GlobalDestruction::BEGIN@23 which was called: # once (11µs+17µs) by Class::MOP::Package::BEGIN@15 at line 23
no warnings 'once';
# spent 28µs making 1 call to Devel::GlobalDestruction::BEGIN@23 # spent 17µs making 1 call to warnings::unimport
24 *in_global_destruction = \&Devel::GlobalDestruction::XS::in_global_destruction;
25 1;
26}) {
27 # the eval already installed everything, nothing to do
28}
29else {
30 # internally, PL_main_start is nulled immediately before entering global destruction
31 # and we can use B to detect that. It will also be null before the main runloop starts,
32 # so we check install a CHECK if needed to detect that.
33 require B;
34 my $started = !B::main_start()->isa(q[B::NULL]);
35 unless ($started) {
36 # work around 5.6 eval bug
37 eval '0 && $started; CHECK { $started = 1 }; 1'
38 or die $@;
39 }
40 eval '0 && $started; sub in_global_destruction () { $started && B::main_start()->isa(q[B::NULL]) }; 1'
41 or die $@;
42}
43
44110µs1; # keep require happy
45
46
47__END__