← Index
NYTProf Performance Profile   « line view »
For rbm/rbm
  Run on Wed Feb 12 03:38:15 2020
Reported on Wed Feb 12 04:56:35 2020

Filename/usr/share/perl/5.28/Exporter.pm
StatementsExecuted 1272 statements in 3.76ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
8484353.15ms5.31msExporter::::importExporter::import
8311.59ms1.68msExporter::::as_heavyExporter::as_heavy
20821106µs106µsExporter::::CORE:matchExporter::CORE:match (opcode)
3692183µs83µsExporter::::CORE:substExporter::CORE:subst (opcode)
62233µs1.67msExporter::::exportExporter::export
1117µs27µsExporter::::export_to_levelExporter::export_to_level
1116µs29µsExporter::::export_tagsExporter::export_tags
0000s0sExporter::::__ANON__[:64]Exporter::__ANON__[:64]
0000s0sExporter::::export_failExporter::export_fail
0000s0sExporter::::export_ok_tagsExporter::export_ok_tags
0000s0sExporter::::require_versionExporter::require_version
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Exporter;
2
319µsrequire 5.006;
4
5# Be lean.
6#use strict;
7#no strict 'refs';
8
91200nsour $Debug = 0;
101100nsour $ExportLevel = 0;
111200nsour $Verbose ||= 0;
121200nsour $VERSION = '5.73';
13our (%Cache);
14
15
# spent 1.68ms (1.59+90µs) within Exporter::as_heavy which was called 8 times, avg 210µs/call: # 6 times (1.56ms+80µs) by Exporter::export at line 25, avg 273µs/call # once (17µs+6µs) by Exporter::export_tags at line 85 # once (17µs+3µs) by Exporter::export_to_level at line 81
sub as_heavy {
168113µs require Exporter::Heavy;
17 # Unfortunately, this does not work if the caller is aliased as *name = \&foo
18 # Thus the need to create a lot of identical subroutines
19825µs my $c = (caller(1))[3];
20858µs828µs $c =~ s/.*:://;
# spent 28µs making 8 calls to Exporter::CORE:subst, avg 4µs/call
21848µs \&{"Exporter::Heavy::heavy_$c"};
22}
23
24
# spent 1.67ms (33µs+1.64) within Exporter::export which was called 6 times, avg 278µs/call: # 5 times (29µs+1.63ms) by Exporter::import at line 62, avg 332µs/call # once (4µs+6µs) by Exporter::Heavy::heavy_export_to_level at line 205 of Exporter/Heavy.pm
sub export {
25642µs122.15ms goto &{as_heavy()};
# spent 1.64ms making 6 calls to Exporter::as_heavy, avg 273µs/call # spent 517µs making 6 calls to Exporter::Heavy::heavy_export, avg 86µs/call
26}
27
28
# spent 5.31ms (3.15+2.17) within Exporter::import which was called 84 times, avg 63µs/call: # once (235µs+1.65ms) by Storable::BEGIN@72 at line 73 of Storable.pm # once (260µs+12µs) by File::Temp::BEGIN@14 at line 14 of File/Temp.pm # once (88µs+149µs) by Template::Parser::BEGIN@39 at line 39 of Template/Parser.pm # once (30µs+98µs) by Getopt::Long::import at line 119 of Getopt/Long.pm # once (29µs+92µs) by RBM::BEGIN@19 at line 19 of /root/tor-browser-build/rbm/lib/RBM.pm # once (109µs+6µs) by RBM::BEGIN@6 at line 6 of /root/tor-browser-build/rbm/lib/RBM.pm # once (88µs+6µs) by RBM::BEGIN@21 at line 21 of /root/tor-browser-build/rbm/lib/RBM.pm # once (82µs+700ns) by File::Copy::Recursive::BEGIN@12 at line 12 of File/Copy/Recursive.pm # once (19µs+49µs) by RBM::BEGIN@20 at line 20 of /root/tor-browser-build/rbm/lib/RBM.pm # once (64µs+3µs) by RBM::BEGIN@23 at line 23 of /root/tor-browser-build/rbm/lib/RBM.pm # once (60µs+4µs) by IO::CaptureOutput::_proxy::BEGIN@138 at line 138 of IO/CaptureOutput.pm # once (56µs+3µs) by File::Temp::Dir::BEGIN@1541 at line 1541 of File/Temp.pm # once (50µs+2µs) by RBM::DefaultConfig::BEGIN@16 at line 16 of /root/tor-browser-build/rbm/lib/RBM/DefaultConfig.pm # once (48µs+3µs) by RBM::BEGIN@15 at line 15 of /root/tor-browser-build/rbm/lib/RBM.pm # once (47µs+2µs) by main::BEGIN@7 at line 7 of /root/tor-browser-build/rbm/rbm # once (48µs+2µs) by RBM::BEGIN@14 at line 14 of /root/tor-browser-build/rbm/lib/RBM.pm # once (45µs+2µs) by Template::VMethods::BEGIN@26 at line 26 of Template/VMethods.pm # once (44µs+2µs) by RBM::BEGIN@13 at line 13 of /root/tor-browser-build/rbm/lib/RBM.pm # once (44µs+2µs) by YAML::XS::BEGIN@20 at line 20 of YAML/XS.pm # once (41µs+4µs) by Template::Provider::BEGIN@47 at line 47 of Template/Provider.pm # once (42µs+2µs) by YAML::XS::BEGIN@21 at line 21 of YAML/XS.pm # once (44µs+0s) by Template::Iterator::BEGIN@27 at line 27 of Template/Iterator.pm # once (39µs+3µs) by IO::CaptureOutput::BEGIN@11 at line 11 of IO/CaptureOutput.pm # once (38µs+2µs) by RBM::BEGIN@2.7 at line 2 of (eval 14)[rbm/lib/RBM.pm:39] # once (38µs+3µs) by RBM::BEGIN@22 at line 22 of /root/tor-browser-build/rbm/lib/RBM.pm # once (38µs+2µs) by File::Copy::Recursive::BEGIN@11 at line 11 of File/Copy/Recursive.pm # once (37µs+2µs) by Template::BEGIN@31 at line 31 of Template.pm # once (39µs+0s) by Getopt::Long::BEGIN@26 at line 26 of Getopt/Long.pm # once (37µs+2µs) by Template::BEGIN@32 at line 32 of Template.pm # once (37µs+2µs) by RBM::BEGIN@18 at line 18 of /root/tor-browser-build/rbm/lib/RBM.pm # once (36µs+2µs) by RBM::DefaultConfig::BEGIN@12 at line 12 of /root/tor-browser-build/rbm/lib/RBM/DefaultConfig.pm # once (36µs+2µs) by RBM::BEGIN@5 at line 5 of /root/tor-browser-build/rbm/lib/RBM.pm # once (33µs+4µs) by IO::CaptureOutput::_proxy::BEGIN@140 at line 140 of IO/CaptureOutput.pm # once (35µs+1µs) by Encode::BEGIN@55 at line 55 of Encode.pm # once (34µs+1µs) by IO::Handle::BEGIN@5 at line 5 of IO/Handle.pm # once (32µs+3µs) by Template::Iterator::BEGIN@29 at line 29 of Template/Iterator.pm # once (33µs+2µs) by RBM::BEGIN@7 at line 7 of /root/tor-browser-build/rbm/lib/RBM.pm # once (32µs+1µs) by Template::Stash::BEGIN@26 at line 26 of Template/Stash.pm # once (32µs+2µs) by RBM::BEGIN@10 at line 10 of /root/tor-browser-build/rbm/lib/RBM.pm # once (32µs+2µs) by IO::Handle::BEGIN@6 at line 6 of IO/Handle.pm # once (32µs+2µs) by main::BEGIN@4 at line 4 of /root/tor-browser-build/rbm/rbm # once (31µs+1µs) by Data::UUID::BEGIN@5 at line 5 of Data/UUID.pm # once (31µs+2µs) by RBM::BEGIN@8 at line 8 of /root/tor-browser-build/rbm/lib/RBM.pm # once (31µs+800ns) by Digest::SHA::BEGIN@8 at line 8 of Digest/SHA.pm # once (29µs+2µs) by File::Temp::BEGIN@13 at line 13 of File/Temp.pm # once (28µs+2µs) by RBM::BEGIN@12 at line 12 of /root/tor-browser-build/rbm/lib/RBM.pm # once (28µs+2µs) by Template::Context::BEGIN@31 at line 31 of Template/Context.pm # once (28µs+900ns) by IO::CaptureOutput::_proxy::BEGIN@141 at line 141 of IO/CaptureOutput.pm # once (27µs+2µs) by IO::CaptureOutput::_proxy::BEGIN@139 at line 139 of IO/CaptureOutput.pm # once (27µs+2µs) by Template::Filters::BEGIN@27 at line 27 of Template/Filters.pm # once (28µs+0s) by Template::Service::BEGIN@28 at line 28 of Template/Service.pm # once (26µs+1µs) by Template::Service::BEGIN@29 at line 29 of Template/Service.pm # once (27µs+0s) by Template::Context::BEGIN@29 at line 29 of Template/Context.pm # once (25µs+1µs) by SelectSaver::BEGIN@6 at line 6 of SelectSaver.pm # once (25µs+1µs) by RBM::BEGIN@17 at line 17 of /root/tor-browser-build/rbm/lib/RBM.pm # once (25µs+1µs) by IO::BEGIN@6 at line 6 of IO.pm # once (25µs+1µs) by File::Temp::BEGIN@10 at line 10 of File/Temp.pm # once (25µs+1µs) by IO::Seekable::BEGIN@6 at line 6 of IO/Seekable.pm # once (25µs+0s) by Template::Base::BEGIN@24 at line 24 of Template/Base.pm # once (22µs+1µs) by RBM::BEGIN@28 at line 28 of (eval 14)[rbm/lib/RBM.pm:39] # once (23µs+0s) by Template::Plugins::BEGIN@29 at line 29 of Template/Plugins.pm # once (22µs+700ns) by Template::BEGIN@33 at line 33 of Template.pm # once (22µs+1µs) by File::Temp::BEGIN@15 at line 15 of File/Temp.pm # once (23µs+0s) by Cwd::BEGIN@3 at line 3 of Cwd.pm # once (21µs+1µs) by SelectSaver::BEGIN@7 at line 7 of SelectSaver.pm # once (21µs+1µs) by IO::Seekable::BEGIN@11 at line 11 of IO/Seekable.pm # once (21µs+1µs) by File::Path::BEGIN@6 at line 6 of File/Path.pm # once (21µs+800ns) by RBM::DefaultConfig::BEGIN@14 at line 14 of /root/tor-browser-build/rbm/lib/RBM/DefaultConfig.pm # once (20µs+0s) by Template::Constants::BEGIN@24 at line 24 of Template/Constants.pm # once (19µs+0s) by Template::BEGIN@28 at line 28 of Template.pm # once (18µs+1µs) by File::Temp::BEGIN@17 at line 17 of File/Temp.pm # once (18µs+700ns) by RBM::BEGIN@16 at line 16 of /root/tor-browser-build/rbm/lib/RBM.pm # once (18µs+0s) by Template::Filters::BEGIN@26 at line 26 of Template/Filters.pm # once (18µs+0s) by RBM::BEGIN@11 at line 11 of /root/tor-browser-build/rbm/lib/RBM.pm # once (16µs+500ns) by RBM::DefaultConfig::BEGIN@15 at line 15 of /root/tor-browser-build/rbm/lib/RBM/DefaultConfig.pm # once (16µs+0s) by Template::Directive::BEGIN@32 at line 32 of Template/Directive.pm # once (14µs+0s) by File::Temp::BEGIN@16 at line 16 of File/Temp.pm # once (13µs+0s) by Template::Provider::BEGIN@45 at line 45 of Template/Provider.pm # once (13µs+0s) by Template::Document::BEGIN@27 at line 27 of Template/Document.pm # once (12µs+0s) by IO::CaptureOutput::BEGIN@10 at line 10 of IO/CaptureOutput.pm # once (7µs+0s) by Path::Tiny::BEGIN@12 at line 12 of Path/Tiny.pm # once (6µs+0s) by Encode::BEGIN@15 at line 15 of Encode.pm # once (5µs+0s) by File::Temp::BEGIN@43 at line 43 of File/Temp.pm # once (5µs+0s) by Encode::Alias::BEGIN@7 at line 7 of Encode/Alias.pm
sub import {
298433µs my $pkg = shift;
308457µs my $callpkg = caller($ExportLevel);
31
328433µs if ($pkg eq "Exporter" and @_ and $_[0] eq "import") {
33410µs *{$callpkg."::import"} = \&import;
34410µs return;
35 }
36
37 # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
3880167µs my $exports = \@{"$pkg\::EXPORT"};
39 # But, avoid creating things if they don't exist, which saves a couple of
40 # hundred bytes per package processed.
4180126µs my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"};
428053µs return export $pkg, $callpkg, @_
43 if $Verbose or $Debug or $fail && @$fail > 1;
448087µs my $export_cache = ($Cache{$pkg} ||= {});
4580110µs my $args = @_ or @_ = @$exports;
46
478031µs if ($args and not %$export_cache) {
48 s/^&//, $export_cache->{$_} = 1
4916609µs36155µs foreach (@$exports, @{"$pkg\::EXPORT_OK"});
# spent 55µs making 361 calls to Exporter::CORE:subst, avg 152ns/call
50 }
518014µs my $heavy;
52 # Try very hard not to use {} and hence have to enter scope on the foreach
53 # We bomb out of the loop with last as soon as heavy is set.
548044µs if ($args or $fail) {
55 ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
56 or $fail and @$fail and $_ eq $fail->[0])) and last
5743430µs13363µs foreach (@_);
# spent 63µs making 133 calls to Exporter::CORE:match, avg 474ns/call
58 } else {
59 ($heavy = /\W/) and last
6037204µs7543µs foreach (@_);
# spent 43µs making 75 calls to Exporter::CORE:match, avg 568ns/call
61 }
628054µs51.66ms return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
# spent 1.66ms making 5 calls to Exporter::export, avg 332µs/call
63 local $SIG{__WARN__} =
6475278µs sub {require Carp; &Carp::carp} if not $SIG{__WARN__};
65 # shortcut for the common case of no type character
66751.09ms *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
67}
68
69# Default methods
70
71sub export_fail {
72 my $self = shift;
73 @_;
74}
75
76# Unfortunately, caller(1)[3] "does not work" if the caller is aliased as
77# *name = \&foo. Thus the need to create a lot of identical subroutines
78# Otherwise we could have aliased them to export().
79
80
# spent 27µs (7+20) within Exporter::export_to_level which was called: # once (7µs+20µs) by Time::HiRes::import at line 91 of Time/HiRes.pm
sub export_to_level {
8118µs2216µs goto &{as_heavy()};
# spent 195µs making 1 call to Exporter::Heavy::heavy_export_to_level # spent 20µs making 1 call to Exporter::as_heavy
82}
83
84
# spent 29µs (6+23) within Exporter::export_tags which was called: # once (6µs+23µs) by IO::CaptureOutput::_proxy::BEGIN@138 at line 72 of File/Temp.pm
sub export_tags {
8518µs246µs goto &{as_heavy()};
# spent 23µs making 1 call to Exporter::as_heavy # spent 22µs making 1 call to Exporter::Heavy::heavy_export_tags
86}
87
88sub export_ok_tags {
89 goto &{as_heavy()};
90}
91
92sub require_version {
93 goto &{as_heavy()};
94}
95
9614µs1;
97__END__
 
# spent 106µs within Exporter::CORE:match which was called 208 times, avg 508ns/call: # 133 times (63µs+0s) by Exporter::import at line 57, avg 474ns/call # 75 times (43µs+0s) by Exporter::import at line 60, avg 568ns/call
sub Exporter::CORE:match; # opcode
# spent 83µs within Exporter::CORE:subst which was called 369 times, avg 224ns/call: # 361 times (55µs+0s) by Exporter::import at line 49, avg 152ns/call # 8 times (28µs+0s) by Exporter::as_heavy at line 20, avg 4µs/call
sub Exporter::CORE:subst; # opcode