← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:33:55 2022
Reported on Wed Dec 14 15:40:03 2022

Filename/Users/ether/.perlbrew/libs/36.0@std/lib/perl5/B/Hooks/EndOfScope/XS.pm
StatementsExecuted 123 statements in 2.87ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1112.00ms2.19msB::Hooks::EndOfScope::XS::::BEGIN@19B::Hooks::EndOfScope::XS::BEGIN@19
1111.97ms3.88msB::Hooks::EndOfScope::XS::::BEGIN@18B::Hooks::EndOfScope::XS::BEGIN@18
181818158µs8.69msB::Hooks::EndOfScope::XS::::__ANON__[:26]B::Hooks::EndOfScope::XS::__ANON__[:26]
1811148µs332µsB::Hooks::EndOfScope::XS::::on_scope_endB::Hooks::EndOfScope::XS::on_scope_end
181130µs30µsB::Hooks::EndOfScope::XS::::__ANON__[:25]B::Hooks::EndOfScope::XS::__ANON__[:25]
11128µs31µsB::Hooks::EndOfScope::XS::::BEGIN@4B::Hooks::EndOfScope::XS::BEGIN@4
11111µs11µsB::Hooks::EndOfScope::XS::::BEGIN@16B::Hooks::EndOfScope::XS::BEGIN@16
1115µs37µ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
4232µs234µs
# spent 31µs (28+3) within B::Hooks::EndOfScope::XS::BEGIN@4 which was called: # once (28µs+3µs) by Module::Runtime::require_module at line 4
use strict;
# spent 31µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@4 # spent 3µs making 1 call to strict::import
5236µs269µs
# spent 37µs (5+32) within B::Hooks::EndOfScope::XS::BEGIN@5 which was called: # once (5µs+32µs) by Module::Runtime::require_module at line 5
use warnings;
# spent 37µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@5 # spent 32µs making 1 call to warnings::import
6
711µsour $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#
16231µs111µs
# spent 11µs within B::Hooks::EndOfScope::XS::BEGIN@16 which was called: # once (11µs+0s) by Module::Runtime::require_module at line 16
use 5.008004;
# spent 11µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@16
17
183840µs23.90ms
# spent 3.88ms (1.97+1.91) within B::Hooks::EndOfScope::XS::BEGIN@18 which was called: # once (1.97ms+1.91ms) by Module::Runtime::require_module at line 18
use Variable::Magic 0.48 ();
# spent 3.88ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@18 # spent 11µs making 1 call to UNIVERSAL::VERSION
1911.19ms
# spent 2.19ms (2.00+191µs) within B::Hooks::EndOfScope::XS::BEGIN@19 which was called: # once (2.00ms+191µ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'] },
222237µs32.28ms};
# spent 2.19ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@19 # spent 75µs making 1 call to Sub::Exporter::Progressive::import # spent 10µs making 1 call to UNIVERSAL::VERSION
23
24my $wiz = Variable::Magic::wizard
251840µs
# spent 30µ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 (30µs+0s) by Variable::Magic::cast at line 43, avg 2µs/call
data => sub { [$_[1]] },
2636158µs188.53ms
# spent 8.69ms (158µs+8.53) 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 483µs/call: # once (11µs+1.54ms) by OpenAPI::Modern::BEGIN@26 at line 951 of JSON/Schema/Modern.pm # once (14µs+685µs) by OpenAPI::Modern::BEGIN@28 at line 229 of JSON/Schema/Modern/Document/OpenAPI.pm # once (12µs+652µs) by JSON::Schema::Modern::BEGIN@33 at line 84 of JSON/Schema/Modern/Error.pm # once (8µs+637µs) by main::BEGIN@2 at line 685 of OpenAPI/Modern.pm # once (12µs+583µs) by Module::Runtime::require_module at line 338 of JSON/Schema/Modern/Vocabulary/Core.pm # once (9µs+449µs) by JSON::Schema::Modern::BEGIN@34 at line 192 of JSON/Schema/Modern/Result.pm # once (9µs+447µs) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@21 at line 165 of JSON/Schema/Modern/Vocabulary/Unevaluated.pm # once (8µs+383µs) by Module::Runtime::require_module at line 327 of JSON/Schema/Modern/Vocabulary/Validation.pm # once (13µs+378µs) by Module::Runtime::require_module at line 188 of JSON/Schema/Modern/Vocabulary/FormatAssertion.pm # once (5µs+370µs) by Module::Runtime::require_module at line 102 of JSON/Schema/Modern/Vocabulary/Content.pm # once (9µs+351µs) by Module::Runtime::require_module at line 108 of JSON/Schema/Modern/Vocabulary/OpenAPI.pm # once (5µs+353µs) by JSON::Schema::Modern::BEGIN@35 at line 205 of JSON/Schema/Modern/Document.pm # once (6µs+337µs) by Module::Runtime::require_module at line 45 of JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm # once (8µs+334µs) by Moo::_Utils::_require at line 94 of JSON/Schema/Modern/Vocabulary.pm # once (8µs+326µs) by Module::Runtime::require_module at line 556 of JSON/Schema/Modern/Vocabulary/Applicator.pm # once (6µs+293µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 69 of JSON/Schema/Modern/Annotation.pm # once (9µs+251µs) by JSON::Schema::Modern::BEGIN@36 at line 350 of JSON/Schema/Modern/Utilities.pm # once (6µs+162µs) by Module::Runtime::require_module at line 78 of JSON/Schema/Modern/Vocabulary/MetaData.pm
free => sub { $_->() for @{ $_[1] }; () },
# spent 8.53ms making 18 calls to namespace::clean::__ANON__[namespace/clean.pm:185], avg 474µ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.
3316µs139µs local => \undef
# spent 39µs making 1 call to Variable::Magic::wizard
34;
35
36
# spent 332µs (148+184) within B::Hooks::EndOfScope::XS::on_scope_end which was called 18 times, avg 18µs/call: # 18 times (148µs+184µs) by namespace::clean::import at line 185 of namespace/clean.pm, avg 18µs/call
sub on_scope_end (&) {
371825µs $^H |= 0x020000;
38
3918114µs1832µs if (my $stack = Variable::Magic::getdata %^H, $wiz) {
# spent 32µs making 18 calls to Variable::Magic::getdata, avg 2µs/call
40 push @{ $stack }, $_[0];
41 }
42 else {
4318152µs36182µs Variable::Magic::cast %^H, $wiz, $_[0];
# spent 152µs making 18 calls to Variable::Magic::cast, avg 8µs/call # spent 30µs making 18 calls to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:25], avg 2µs/call
44 }
45}
46
4716µs1;
48
49__END__