Filename | /Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/B/Hooks/EndOfScope/XS.pm |
Statements | Executed 27 statements in 318µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 2 | 16µs | 37µs | on_scope_end | B::Hooks::EndOfScope::XS::
2 | 2 | 2 | 13µs | 1.68ms | __ANON__[:26] | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 9µs | 76µs | BEGIN@19 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 8µs | 18µs | BEGIN@10 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 8µs | 8µs | BEGIN@2 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 6µs | 1.21ms | BEGIN@13 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 6µs | 9µs | BEGIN@11 | B::Hooks::EndOfScope::XS::
2 | 1 | 1 | 3µs | 3µs | __ANON__[:25] | B::Hooks::EndOfScope::XS::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package 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 | ||||
3 | 1 | 4µs | $B::Hooks::EndOfScope::XS::AUTHORITY = 'cpan:FLORA'; | ||
4 | 1 | 29µs | 1 | 8µs | } # spent 8µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@2 |
5 | { | ||||
6 | 2 | 800ns | $B::Hooks::EndOfScope::XS::VERSION = '0.12'; | ||
7 | } | ||||
8 | # ABSTRACT: Execute code after a scope finished compilation - XS implementation | ||||
9 | |||||
10 | 2 | 19µs | 2 | 28µ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 # spent 18µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@10
# spent 10µs making 1 call to strict::import |
11 | 2 | 30µs | 2 | 12µ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 # 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 | ||||
14 | 1 | 200ns | require Module::Runtime; | ||
15 | # Adjust the Makefile.PL if changing this minimum version | ||||
16 | 1 | 3µs | 1 | 1.20ms | Module::Runtime::use_module('Variable::Magic', '0.48'); # spent 1.20ms making 1 call to Module::Runtime::use_module |
17 | 1 | 31µs | 1 | 1.21ms | } # spent 1.21ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@13 |
18 | |||||
19 | 1 | 300ns | # 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 | ||
20 | exports => ['on_scope_end'], | ||||
21 | groups => { default => ['on_scope_end'] }, | ||||
22 | 1 | 139µs | 2 | 144µ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 | |||||
24 | my $wiz = Variable::Magic::wizard | ||||
25 | 2 | 6µ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 | ||
26 | 4 | 11µs | 2 | 1.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 # spent 1.57ms making 1 call to namespace::autoclean::__ANON__[namespace/autoclean.pm:57]
# spent 99µs making 1 call to namespace::clean::__ANON__[namespace/clean.pm:316] |
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. | ||||
33 | 1 | 4µs | 1 | 30µ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 | ||||
37 | 2 | 400ns | my $cb = shift; | ||
38 | |||||
39 | 2 | 1µs | $^H |= 0x020000; | ||
40 | |||||
41 | 2 | 15µs | 2 | 1µ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 { | ||||
45 | 2 | 20µs | 4 | 23µ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 | |||||
- - | |||||
51 | 1 | 4µs | 1; | ||
52 | |||||
53 | __END__ |