← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Thu Dec 15 15:23:56 2022
Reported on Thu Dec 15 15:27:03 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/B/Hooks/EndOfScope/XS.pm
StatementsExecuted 123 statements in 2.75ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.84ms5.30msB::Hooks::EndOfScope::XS::::BEGIN@18B::Hooks::EndOfScope::XS::BEGIN@18
1111.68ms1.82msB::Hooks::EndOfScope::XS::::BEGIN@19B::Hooks::EndOfScope::XS::BEGIN@19
181818132µs7.23msB::Hooks::EndOfScope::XS::::__ANON__[:26]B::Hooks::EndOfScope::XS::__ANON__[:26]
1811121µs268µsB::Hooks::EndOfScope::XS::::on_scope_endB::Hooks::EndOfScope::XS::on_scope_end
181136µs36µsB::Hooks::EndOfScope::XS::::__ANON__[:25]B::Hooks::EndOfScope::XS::__ANON__[:25]
11115µs17µsB::Hooks::EndOfScope::XS::::BEGIN@4B::Hooks::EndOfScope::XS::BEGIN@4
1117µs7µsB::Hooks::EndOfScope::XS::::BEGIN@16B::Hooks::EndOfScope::XS::BEGIN@16
1112µs21µsB::Hooks::EndOfScope::XS::::BEGIN@5B::Hooks::EndOfScope::XS::BEGIN@5
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# ABSTRACT: Execute code after a scope finished compilation - XS implementation
3
4220µs219µs
# spent 17µs (15+2) within B::Hooks::EndOfScope::XS::BEGIN@4 which was called: # once (15µs+2µs) by Module::Runtime::require_module at line 4
use strict;
# spent 17µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@4 # spent 2µs making 1 call to strict::import
5227µs240µs
# spent 21µs (2+19) within B::Hooks::EndOfScope::XS::BEGIN@5 which was called: # once (2µs+19µs) by Module::Runtime::require_module at line 5
use warnings;
# spent 21µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@5 # spent 19µs making 1 call to warnings::import
6
710sour $VERSION = '0.26';
8
9# Limit the V::M-based (XS) version to perl 5.8.4+
10#
11# Given the unorthodox stuff we do to work around the hinthash double-free
12# might as well play it safe and only implement it in the PP version
13# and leave it at that
14# https://rt.perl.org/Public/Bug/Display.html?id=27040#txn-82797
15#
16228µs17µs
# spent 7µs within B::Hooks::EndOfScope::XS::BEGIN@16 which was called: # once (7µs+0s) by Module::Runtime::require_module at line 16
use 5.008004;
# spent 7µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@16
17
1831.03ms25.31ms
# spent 5.30ms (1.84+3.46) within B::Hooks::EndOfScope::XS::BEGIN@18 which was called: # once (1.84ms+3.46ms) by Module::Runtime::require_module at line 18
use Variable::Magic 0.48 ();
# spent 5.30ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@18 # spent 8µs making 1 call to UNIVERSAL::VERSION
1911.07ms
# spent 1.82ms (1.68+143µs) within B::Hooks::EndOfScope::XS::BEGIN@19 which was called: # once (1.68ms+143µs) by Module::Runtime::require_module at line 22
use Sub::Exporter::Progressive 0.001006 -setup => {
20 exports => ['on_scope_end'],
21 groups => { default => ['on_scope_end'] },
222156µs31.87ms};
# spent 1.82ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@19 # spent 44µs making 1 call to Sub::Exporter::Progressive::import # spent 7µs making 1 call to UNIVERSAL::VERSION
23
24my $wiz = Variable::Magic::wizard
251836µs
# spent 36µs within B::Hooks::EndOfScope::XS::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/B/Hooks/EndOfScope/XS.pm:25] which was called 18 times, avg 2µs/call: # 18 times (36µs+0s) by Variable::Magic::cast at line 43, avg 2µs/call
data => sub { [$_[1]] },
2636146µs187.09ms
# spent 7.23ms (132µs+7.09) within B::Hooks::EndOfScope::XS::__ANON__[/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/B/Hooks/EndOfScope/XS.pm:26] which was called 18 times, avg 402µs/call: # once (7µs+1.34ms) by OpenAPI::Modern::BEGIN@26 at line 990 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern.pm # once (6µs+634µs) by main::BEGIN@2 at line 681 of OpenAPI/Modern.pm # once (13µs+552µs) by Module::Runtime::require_module at line 325 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Validation.pm # once (7µs+448µs) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@21 at line 145 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Unevaluated.pm # once (8µs+445µs) by JSON::Schema::Modern::BEGIN@35 at line 204 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Document.pm # once (7µs+380µs) by OpenAPI::Modern::BEGIN@28 at line 229 of JSON/Schema/Modern/Document/OpenAPI.pm # once (11µs+362µs) by Module::Runtime::require_module at line 504 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Applicator.pm # once (8µs+358µs) by JSON::Schema::Modern::BEGIN@34 at line 207 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Result.pm # once (8µs+335µs) by JSON::Schema::Modern::BEGIN@36 at line 355 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Utilities.pm # once (8µs+327µs) by Module::Runtime::require_module at line 352 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Core.pm # once (10µs+309µs) by Module::Runtime::require_module at line 188 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/FormatAssertion.pm # once (5µs+296µs) by Module::Runtime::require_module at line 108 of JSON/Schema/Modern/Vocabulary/OpenAPI.pm # once (5µs+264µs) by JSON::Schema::Modern::BEGIN@33 at line 83 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Error.pm # once (6µs+247µs) by Module::Runtime::require_module at line 117 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/Content.pm # once (7µs+211µs) by Module::Runtime::require_module at line 44 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm # once (5µs+211µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 82 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Annotation.pm # once (6µs+209µs) by Moo::_Utils::_require at line 101 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary.pm # once (5µs+164µs) by Module::Runtime::require_module at line 77 of /Users/ether/git/JSON-Schema-Modern/lib/JSON/Schema/Modern/Vocabulary/MetaData.pm
free => sub { $_->() for @{ $_[1] }; () },
# spent 7.09ms making 18 calls to namespace::clean::__ANON__[namespace/clean.pm:185], avg 394µs/call
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 ourselves 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.
3315µs129µs local => \undef
# spent 29µs making 1 call to Variable::Magic::wizard
34;
35
36
# spent 268µs (121+147) within B::Hooks::EndOfScope::XS::on_scope_end which was called 18 times, avg 15µs/call: # 18 times (121µs+147µs) by namespace::clean::import at line 185 of namespace/clean.pm, avg 15µs/call
sub on_scope_end (&) {
371820µs $^H |= 0x020000;
38
391898µs1831µs if (my $stack = Variable::Magic::getdata %^H, $wiz) {
# spent 31µs making 18 calls to Variable::Magic::getdata, avg 2µs/call
40 push @{ $stack }, $_[0];
41 }
42 else {
4318109µs36152µs Variable::Magic::cast %^H, $wiz, $_[0];
# spent 116µs making 18 calls to Variable::Magic::cast, avg 6µs/call # spent 36µs making 18 calls to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:25], avg 2µs/call
44 }
45}
46
4714µs1;
48
49__END__