← Index
NYTProf Performance Profile   « line view »
For examples/Atom-timer.pl
  Run on Mon Aug 12 14:45:28 2013
Reported on Mon Aug 12 14:46:15 2013

Filename/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/B/Hooks/EndOfScope/XS.pm
StatementsExecuted 27 statements in 318µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
22216µs37µsB::Hooks::EndOfScope::XS::::on_scope_endB::Hooks::EndOfScope::XS::on_scope_end
22213µs1.68msB::Hooks::EndOfScope::XS::::__ANON__[:26]B::Hooks::EndOfScope::XS::__ANON__[:26]
1119µs76µsB::Hooks::EndOfScope::XS::::BEGIN@19B::Hooks::EndOfScope::XS::BEGIN@19
1118µs18µsB::Hooks::EndOfScope::XS::::BEGIN@10B::Hooks::EndOfScope::XS::BEGIN@10
1118µs8µsB::Hooks::EndOfScope::XS::::BEGIN@2B::Hooks::EndOfScope::XS::BEGIN@2
1116µs1.21msB::Hooks::EndOfScope::XS::::BEGIN@13B::Hooks::EndOfScope::XS::BEGIN@13
1116µs9µsB::Hooks::EndOfScope::XS::::BEGIN@11B::Hooks::EndOfScope::XS::BEGIN@11
2113µs3µsB::Hooks::EndOfScope::XS::::__ANON__[:25]B::Hooks::EndOfScope::XS::__ANON__[:25]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package B::Hooks::EndOfScope::XS;
2
# spent 8µs within B::Hooks::EndOfScope::XS::BEGIN@2 which was called: # once (8µs+0s) by Module::Runtime::require_module at line 4
BEGIN {
314µs $B::Hooks::EndOfScope::XS::AUTHORITY = 'cpan:FLORA';
4129µs18µs}
# spent 8µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@2
5{
62800ns $B::Hooks::EndOfScope::XS::VERSION = '0.12';
7}
8# ABSTRACT: Execute code after a scope finished compilation - XS implementation
9
10219µs228µs
# spent 18µs (8+10) within B::Hooks::EndOfScope::XS::BEGIN@10 which was called: # once (8µs+10µs) by Module::Runtime::require_module at line 10
use strict;
# spent 18µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@10 # spent 10µs making 1 call to strict::import
11230µs212µs
# spent 9µs (6+3) within B::Hooks::EndOfScope::XS::BEGIN@11 which was called: # once (6µs+3µs) by Module::Runtime::require_module at line 11
use warnings;
# spent 9µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@11 # spent 3µs making 1 call to warnings::import
12
13
# spent 1.21ms (6µs+1.20) within B::Hooks::EndOfScope::XS::BEGIN@13 which was called: # once (6µs+1.20ms) by Module::Runtime::require_module at line 17
BEGIN {
141200ns require Module::Runtime;
15 # Adjust the Makefile.PL if changing this minimum version
1613µs11.20ms Module::Runtime::use_module('Variable::Magic', '0.48');
# spent 1.20ms making 1 call to Module::Runtime::use_module
17131µs11.21ms}
# spent 1.21ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@13
18
191300ns
# spent 76µs (9+67) within B::Hooks::EndOfScope::XS::BEGIN@19 which was called: # once (9µs+67µs) by Module::Runtime::require_module at line 22
use Sub::Exporter::Progressive -setup => {
20 exports => ['on_scope_end'],
21 groups => { default => ['on_scope_end'] },
221139µs2144µs};
# spent 76µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@19 # spent 67µs making 1 call to Sub::Exporter::Progressive::import
23
24my $wiz = Variable::Magic::wizard
2526µs
# spent 3µs within B::Hooks::EndOfScope::XS::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/B/Hooks/EndOfScope/XS.pm:25] which was called 2 times, avg 1µs/call: # 2 times (3µs+0s) by Variable::Magic::cast at line 45, avg 1µs/call
data => sub { [$_[1]] },
26411µs21.67ms
# spent 1.68ms (13µs+1.67) within B::Hooks::EndOfScope::XS::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/B/Hooks/EndOfScope/XS.pm:26] which was called 2 times, avg 839µs/call: # once (7µs+1.57ms) by main::BEGIN@5 at line 131 of lib/HackaMol/Atom.pm # once (7µs+99µs) by Atom::BEGIN@3 at line 62 of namespace/autoclean.pm
free => sub { $_->() for @{ $_[1] }; () },
27 # When someone localise %^H, our magic doesn't want to be copied
28 # down. We want it to be around only for the scope we've initially
29 # attached ourselfs to. Merely having MGf_LOCAL and a noop svt_local
30 # callback achieves this. If anything wants to attach more magic of our
31 # kind to a localised %^H, things will continue to just work as we'll be
32 # attached with a new and empty callback list.
3314µs130µs local => \undef
# spent 30µs making 1 call to Variable::Magic::wizard
34;
35
36
# spent 37µs (16+22) within B::Hooks::EndOfScope::XS::on_scope_end which was called 2 times, avg 19µs/call: # once (10µs+17µs) by namespace::clean::import at line 316 of namespace/clean.pm # once (6µs+5µs) by namespace::autoclean::import at line 57 of namespace/autoclean.pm
sub on_scope_end (&) {
372400ns my $cb = shift;
38
3921µs $^H |= 0x020000;
40
41215µs21µs if (my $stack = Variable::Magic::getdata %^H, $wiz) {
# spent 1µs making 2 calls to Variable::Magic::getdata, avg 550ns/call
42 push @{ $stack }, $cb;
43 }
44 else {
45220µs423µs Variable::Magic::cast %^H, $wiz, $cb;
# spent 20µs making 2 calls to Variable::Magic::cast, avg 10µs/call # spent 3µs making 2 calls to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:25], avg 1µs/call
46 }
47}
48
- -
5114µs1;
52
53__END__