| Filename | /Users/ether/.perlbrew/libs/36.0@std/lib/perl5/B/Hooks/EndOfScope/XS.pm |
| Statements | Executed 123 statements in 2.09ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 1.39ms | 2.45ms | B::Hooks::EndOfScope::XS::BEGIN@18 |
| 1 | 1 | 1 | 1.18ms | 1.34ms | B::Hooks::EndOfScope::XS::BEGIN@19 |
| 18 | 18 | 18 | 193µs | 9.44ms | B::Hooks::EndOfScope::XS::__ANON__[:26] |
| 18 | 1 | 1 | 188µs | 521µs | B::Hooks::EndOfScope::XS::on_scope_end |
| 18 | 1 | 1 | 70µs | 70µs | B::Hooks::EndOfScope::XS::__ANON__[:25] |
| 1 | 1 | 1 | 29µs | 32µs | B::Hooks::EndOfScope::XS::BEGIN@4 |
| 1 | 1 | 1 | 7µs | 7µs | B::Hooks::EndOfScope::XS::BEGIN@16 |
| 1 | 1 | 1 | 4µs | 25µs | B::Hooks::EndOfScope::XS::BEGIN@5 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package B::Hooks::EndOfScope::XS; | ||||
| 2 | # ABSTRACT: Execute code after a scope finished compilation - XS implementation | ||||
| 3 | |||||
| 4 | 2 | 29µs | 2 | 35µs | # spent 32µs (29+3) within B::Hooks::EndOfScope::XS::BEGIN@4 which was called:
# once (29µs+3µs) by Module::Runtime::require_module at line 4 # spent 32µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@4
# spent 3µs making 1 call to strict::import |
| 5 | 2 | 29µs | 2 | 46µs | # spent 25µs (4+21) within B::Hooks::EndOfScope::XS::BEGIN@5 which was called:
# once (4µs+21µs) by Module::Runtime::require_module at line 5 # spent 25µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@5
# spent 21µs making 1 call to warnings::import |
| 6 | |||||
| 7 | 1 | 0s | our $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 | # | ||||
| 16 | 2 | 27µs | 1 | 7µ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 # spent 7µs making 1 call to B::Hooks::EndOfScope::XS::BEGIN@16 |
| 17 | |||||
| 18 | 3 | 496µs | 2 | 2.46ms | # spent 2.45ms (1.39+1.06) within B::Hooks::EndOfScope::XS::BEGIN@18 which was called:
# once (1.39ms+1.06ms) by Module::Runtime::require_module at line 18 # spent 2.45ms making 1 call to B::Hooks::EndOfScope::XS::BEGIN@18
# spent 7µs making 1 call to UNIVERSAL::VERSION |
| 19 | 1 | 587µs | # spent 1.34ms (1.18+163µs) within B::Hooks::EndOfScope::XS::BEGIN@19 which was called:
# once (1.18ms+163µs) by Module::Runtime::require_module at line 22 | ||
| 20 | exports => ['on_scope_end'], | ||||
| 21 | groups => { default => ['on_scope_end'] }, | ||||
| 22 | 2 | 146µs | 3 | 1.40ms | }; # spent 1.34ms 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 | |||||
| 24 | my $wiz = Variable::Magic::wizard | ||||
| 25 | 18 | 169µs | # spent 70µ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 4µs/call:
# 18 times (70µs+0s) by Variable::Magic::cast at line 43, avg 4µs/call | ||
| 26 | 36 | 273µs | 18 | 9.24ms | # spent 9.44ms (193µs+9.24) 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 524µs/call:
# once (33µs+1.80ms) by OpenAPI::Modern::BEGIN@26 at line 977 of JSON/Schema/Modern.pm
# once (15µs+1.14ms) by main::BEGIN@2 at line 675 of OpenAPI/Modern.pm
# once (13µs+655µs) by Module::Runtime::require_module at line 326 of JSON/Schema/Modern/Vocabulary/Validation.pm
# once (9µs+596µs) by Module::Runtime::require_module at line 347 of JSON/Schema/Modern/Vocabulary/Core.pm
# once (9µs+525µs) by JSON::Schema::Modern::BEGIN@34 at line 201 of JSON/Schema/Modern/Result.pm
# once (16µs+511µs) by JSON::Schema::Modern::BEGIN@33 at line 84 of JSON/Schema/Modern/Error.pm
# once (10µs+492µs) by JSON::Schema::Modern::Vocabulary::Applicator::BEGIN@21 at line 154 of JSON/Schema/Modern/Vocabulary/Unevaluated.pm
# once (8µs+459µs) by JSON::Schema::Modern::BEGIN@35 at line 205 of JSON/Schema/Modern/Document.pm
# once (7µs+403µs) by OpenAPI::Modern::BEGIN@28 at line 229 of JSON/Schema/Modern/Document/OpenAPI.pm
# once (12µs+381µs) by Module::Runtime::require_module at line 188 of JSON/Schema/Modern/Vocabulary/FormatAssertion.pm
# once (10µs+373µs) by Module::Runtime::require_module at line 496 of JSON/Schema/Modern/Vocabulary/Applicator.pm
# once (5µs+374µs) by Module::Runtime::require_module at line 108 of JSON/Schema/Modern/Vocabulary/OpenAPI.pm
# once (9µs+315µs) by JSON::Schema::Modern::BEGIN@36 at line 355 of JSON/Schema/Modern/Utilities.pm
# once (9µs+312µs) by JSON::Schema::Modern::Result::BEGIN@20 at line 69 of JSON/Schema/Modern/Annotation.pm
# once (10µs+289µs) by Moo::_Utils::_require at line 94 of JSON/Schema/Modern/Vocabulary.pm
# once (6µs+258µs) by Module::Runtime::require_module at line 102 of JSON/Schema/Modern/Vocabulary/Content.pm
# once (6µs+190µs) by Module::Runtime::require_module at line 45 of JSON/Schema/Modern/Vocabulary/FormatAnnotation.pm
# once (6µs+172µs) by Module::Runtime::require_module at line 78 of JSON/Schema/Modern/Vocabulary/MetaData.pm # spent 9.24ms making 18 calls to namespace::clean::__ANON__[namespace/clean.pm:185], avg 514µ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. | ||||
| 33 | 1 | 4µs | 1 | 30µs | local => \undef # spent 30µs making 1 call to Variable::Magic::wizard |
| 34 | ; | ||||
| 35 | |||||
| 36 | # spent 521µs (188+333) within B::Hooks::EndOfScope::XS::on_scope_end which was called 18 times, avg 29µs/call:
# 18 times (188µs+333µs) by namespace::clean::import at line 185 of namespace/clean.pm, avg 29µs/call | ||||
| 37 | 18 | 39µs | $^H |= 0x020000; | ||
| 38 | |||||
| 39 | 18 | 132µs | 18 | 43µs | if (my $stack = Variable::Magic::getdata %^H, $wiz) { # spent 43µs making 18 calls to Variable::Magic::getdata, avg 2µs/call |
| 40 | push @{ $stack }, $_[0]; | ||||
| 41 | } | ||||
| 42 | else { | ||||
| 43 | 18 | 159µs | 36 | 360µs | Variable::Magic::cast %^H, $wiz, $_[0]; # spent 290µs making 18 calls to Variable::Magic::cast, avg 16µs/call
# spent 70µs making 18 calls to B::Hooks::EndOfScope::XS::__ANON__[B/Hooks/EndOfScope/XS.pm:25], avg 4µs/call |
| 44 | } | ||||
| 45 | } | ||||
| 46 | |||||
| 47 | 1 | 4µs | 1; | ||
| 48 | |||||
| 49 | __END__ |