Filename | /usr/share/perl5/B/Hooks/EndOfScope/XS.pm |
Statements | Executed 20 statements in 1.10ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.59ms | 1.76ms | BEGIN@19 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 12µs | 24µs | on_scope_end | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 10µs | 10µs | BEGIN@5 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 7µs | 11µs | BEGIN@11 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 6µs | 1.92ms | BEGIN@13 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 6µs | 246µs | __ANON__[:26] | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 6µs | 16µs | BEGIN@10 | B::Hooks::EndOfScope::XS::
1 | 1 | 1 | 2µs | 2µ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 | { | ||||
3 | 2 | 800ns | $B::Hooks::EndOfScope::XS::VERSION = '0.13'; | ||
4 | } | ||||
5 | # spent 10µs within B::Hooks::EndOfScope::XS::BEGIN@5 which was called:
# once (10µs+0s) by Module::Runtime::require_module at line 7 | ||||
6 | 1 | 5µs | $B::Hooks::EndOfScope::XS::AUTHORITY = 'cpan:FLORA'; | ||
7 | 1 | 20µs | 1 | 10µs | } # spent 10µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@5 |
8 | # ABSTRACT: Execute code after a scope finished compilation - XS implementation | ||||
9 | |||||
10 | 2 | 20µs | 2 | 26µs | # spent 16µs (6+10) within B::Hooks::EndOfScope::XS::BEGIN@10 which was called:
# once (6µs+10µs) by Module::Runtime::require_module at line 10 # spent 16µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@10
# spent 10µs making 1 call to strict::import |
11 | 2 | 33µs | 2 | 15µs | # spent 11µs (7+4) within B::Hooks::EndOfScope::XS::BEGIN@11 which was called:
# once (7µs+4µs) by Module::Runtime::require_module at line 11 # spent 11µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@11
# spent 4µs making 1 call to warnings::import |
12 | |||||
13 | # spent 1.92ms (6µs+1.91) within B::Hooks::EndOfScope::XS::BEGIN@13 which was called:
# once (6µs+1.91ms) by Module::Runtime::require_module at line 17 | ||||
14 | 1 | 300ns | require Module::Runtime; | ||
15 | # Adjust the Makefile.PL if changing this minimum version | ||||
16 | 1 | 3µs | 1 | 1.91ms | Module::Runtime::use_module('Variable::Magic', '0.48'); # spent 1.91ms making 1 call to Module::Runtime::use_module |
17 | 1 | 36µs | 1 | 1.92ms | } # spent 1.92ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@13 |
18 | |||||
19 | 1 | 8µs | 1 | 72µs | # spent 1.76ms (1.59+170µs) within B::Hooks::EndOfScope::XS::BEGIN@19 which was called:
# once (1.59ms+170µs) by Module::Runtime::require_module at line 22 # spent 72µs making 1 call to Sub::Exporter::Progressive::import |
20 | exports => ['on_scope_end'], | ||||
21 | groups => { default => ['on_scope_end'] }, | ||||
22 | 1 | 937µs | 1 | 1.76ms | }; # spent 1.76ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@19 |
23 | |||||
24 | my $wiz = Variable::Magic::wizard | ||||
25 | 1 | 4µs | # spent 2µs within B::Hooks::EndOfScope::XS::__ANON__[/usr/share/perl5/B/Hooks/EndOfScope/XS.pm:25] which was called:
# once (2µs+0s) by Variable::Magic::cast at line 45 | ||
26 | 2 | 5µs | 1 | 239µs | # spent 246µs (6+239) within B::Hooks::EndOfScope::XS::__ANON__[/usr/share/perl5/B/Hooks/EndOfScope/XS.pm:26] which was called:
# once (6µs+239µs) by DateTime::TimeZone::Local::BEGIN@6 at line 208 of Class/Load.pm # spent 239µ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 | 26µs | local => \undef # spent 26µs making 1 call to Variable::Magic::wizard |
34 | ; | ||||
35 | |||||
36 | # spent 24µs (12+12) within B::Hooks::EndOfScope::XS::on_scope_end which was called:
# once (12µs+12µs) by namespace::clean::import at line 316 of namespace/clean.pm | ||||
37 | 1 | 200ns | my $cb = shift; | ||
38 | |||||
39 | 1 | 900ns | $^H |= 0x020000; | ||
40 | |||||
41 | 1 | 10µs | 1 | 1µs | if (my $stack = Variable::Magic::getdata %^H, $wiz) { # spent 1µs making 1 call to Variable::Magic::getdata |
42 | push @{ $stack }, $cb; | ||||
43 | } | ||||
44 | else { | ||||
45 | 1 | 10µs | 2 | 12µs | Variable::Magic::cast %^H, $wiz, $cb; # spent 10µs making 1 call to Variable::Magic::cast
# spent 2µs making 1 call to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:25] |
46 | } | ||||
47 | } | ||||
48 | |||||
- - | |||||
51 | 1 | 3µs | 1; | ||
52 | |||||
53 | __END__ |