Filename | /usr/share/perl/5.28/strict.pm |
Statements | Executed 455 statements in 1.02ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
66 | 66 | 65 | 190µs | 205µs | import | strict::
28 | 2 | 1 | 167µs | 167µs | bits | strict::
27 | 27 | 17 | 144µs | 296µs | unimport | strict::
1 | 1 | 1 | 33µs | 37µs | BEGIN@7 | strict::
1 | 1 | 1 | 4µs | 4µs | CORE:match (opcode) | strict::
0 | 0 | 0 | 0s | 0s | __ANON__[:31] | strict::
0 | 0 | 0 | 0s | 0s | __ANON__[:37] | strict::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package strict; | ||||
2 | |||||
3 | 1 | 300ns | $strict::VERSION = "1.11"; | ||
4 | |||||
5 | 1 | 200ns | my ( %bitmask, %explicit_bitmask ); | ||
6 | |||||
7 | # spent 37µs (33+4) within strict::BEGIN@7 which was called:
# once (33µs+4µs) by main::BEGIN@3 at line 38 | ||||
8 | # Verify that we're called correctly so that strictures will work. | ||||
9 | # Can't use Carp, since Carp uses us! | ||||
10 | # see also warnings.pm. | ||||
11 | 1 | 14µs | 1 | 4µs | die sprintf "Incorrect use of pragma '%s' at %s line %d.\n", __PACKAGE__, +(caller)[1,2] # spent 4µs making 1 call to strict::CORE:match |
12 | if __FILE__ !~ ( '(?x) \b '.__PACKAGE__.' \.pmc? \z' ) | ||||
13 | && __FILE__ =~ ( '(?x) \b (?i:'.__PACKAGE__.') \.pmc? \z' ); | ||||
14 | |||||
15 | 1 | 1µs | %bitmask = ( | ||
16 | refs => 0x00000002, | ||||
17 | subs => 0x00000200, | ||||
18 | vars => 0x00000400, | ||||
19 | ); | ||||
20 | |||||
21 | 1 | 700ns | %explicit_bitmask = ( | ||
22 | refs => 0x00000020, | ||||
23 | subs => 0x00000040, | ||||
24 | vars => 0x00000080, | ||||
25 | ); | ||||
26 | |||||
27 | 1 | 300ns | my $bits = 0; | ||
28 | 1 | 3µs | $bits |= $_ for values %bitmask; | ||
29 | |||||
30 | 1 | 100ns | my $inline_all_bits = $bits; | ||
31 | 1 | 6µs | *all_bits = sub () { $inline_all_bits }; | ||
32 | |||||
33 | 1 | 200ns | $bits = 0; | ||
34 | 1 | 1µs | $bits |= $_ for values %explicit_bitmask; | ||
35 | |||||
36 | 1 | 100ns | my $inline_all_explicit_bits = $bits; | ||
37 | 1 | 5µs | *all_explicit_bits = sub () { $inline_all_explicit_bits }; | ||
38 | 1 | 179µs | 1 | 37µs | } # spent 37µs making 1 call to strict::BEGIN@7 |
39 | |||||
40 | sub bits { | ||||
41 | 28 | 13µs | my $bits = 0; | ||
42 | 28 | 8µs | my @wrong; | ||
43 | 28 | 24µs | foreach my $s (@_) { | ||
44 | 29 | 27µs | if (exists $bitmask{$s}) { | ||
45 | 29 | 35µs | $^H |= $explicit_bitmask{$s}; | ||
46 | |||||
47 | 29 | 12µs | $bits |= $bitmask{$s}; | ||
48 | } | ||||
49 | else { | ||||
50 | push @wrong, $s; | ||||
51 | } | ||||
52 | } | ||||
53 | 28 | 13µs | if (@wrong) { | ||
54 | require Carp; | ||||
55 | Carp::croak("Unknown 'strict' tag(s) '@wrong'"); | ||||
56 | } | ||||
57 | 28 | 93µs | $bits; | ||
58 | } | ||||
59 | |||||
60 | # spent 205µs (190+15) within strict::import which was called 66 times, avg 3µs/call:
# once (4µs+8µs) by vars::BEGIN@8 at line 8 of vars.pm
# once (4µs+7µs) by base::BEGIN@4 at line 4 of base.pm
# once (7µs+0s) by Template::Iterator::BEGIN@24 at line 24 of Template/Iterator.pm
# once (6µs+0s) by Unicode::UTF8::BEGIN@3 at line 3 of Unicode/UTF8.pm
# once (6µs+0s) by File::Copy::BEGIN@11 at line 11 of File/Copy.pm
# once (5µs+0s) by String::ShellQuote::BEGIN@28 at line 28 of String/ShellQuote.pm
# once (5µs+0s) by File::Copy::Recursive::BEGIN@3 at line 3 of File/Copy/Recursive.pm
# once (5µs+0s) by Template::Context::BEGIN@23 at line 23 of Template/Context.pm
# once (5µs+0s) by Sort::Versions::BEGIN@8 at line 8 of Sort/Versions.pm
# once (4µs+0s) by Template::Parser::BEGIN@35 at line 35 of Template/Parser.pm
# once (4µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl
# once (4µs+0s) by File::Temp::Dir::BEGIN@1542 at line 1542 of File/Temp.pm
# once (4µs+0s) by Template::Plugins::BEGIN@26 at line 26 of Template/Plugins.pm
# once (4µs+0s) by RBM::BEGIN@1.2 at line 1 of YAML/XS.pm
# once (4µs+0s) by main::BEGIN@15 at line 15 of Getopt/Long.pm
# once (4µs+0s) by Template::Service::BEGIN@23 at line 23 of Template/Service.pm
# once (3µs+0s) by parent::BEGIN@2 at line 2 of parent.pm
# once (3µs+0s) by Config::BEGIN@9 at line 9 of Config.pm
# once (3µs+0s) by Template::Document::BEGIN@24 at line 24 of Template/Document.pm
# once (3µs+0s) by Digest::SHA::BEGIN@5 at line 5 of Digest/SHA.pm
# once (3µs+0s) by Encode::BEGIN@5 at line 5 of Encode.pm
# once (3µs+0s) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm
# once (3µs+0s) by Template::BEGIN@22 at line 22 of Template.pm
# once (3µs+0s) by Template::Grammar::BEGIN@30 at line 30 of Template/Grammar.pm
# once (3µs+0s) by Template::Stash::XS::BEGIN@14 at line 14 of Template/Stash/XS.pm
# once (3µs+0s) by main::BEGIN@3 at line 3 of /root/tor-browser-build/rbm/rbm
# once (3µs+0s) by Template::Directive::BEGIN@29 at line 29 of Template/Directive.pm
# once (3µs+0s) by Template::Provider::BEGIN@41 at line 41 of Template/Provider.pm
# once (3µs+0s) by RBM::BEGIN@2 at line 2 of Path/Tiny.pm
# once (3µs+0s) by Template::Config::BEGIN@21 at line 21 of Template/Config.pm
# once (3µs+0s) by File::Glob::BEGIN@3 at line 3 of File/Glob.pm
# once (3µs+0s) by IO::Handle::BEGIN@4 at line 4 of IO/Handle.pm
# once (2µs+0s) by YAML::XS::LibYAML::BEGIN@3 at line 3 of YAML/XS/LibYAML.pm
# once (2µs+0s) by File::Path::BEGIN@4 at line 4 of File/Path.pm
# once (2µs+0s) by Template::Base::BEGIN@22 at line 22 of Template/Base.pm
# once (2µs+0s) by Digest::base::BEGIN@3 at line 3 of Digest/base.pm
# once (2µs+0s) by Template::VMethods::BEGIN@24 at line 24 of Template/VMethods.pm
# once (2µs+0s) by RBM::DefaultConfig::BEGIN@3 at line 3 of /root/tor-browser-build/rbm/lib/RBM/DefaultConfig.pm
# once (2µs+0s) by constant::BEGIN@3 at line 3 of constant.pm
# once (2µs+0s) by RBM::BEGIN@1.4 at line 1 of IO/CaptureOutput.pm
# once (2µs+0s) by Encode::Alias::BEGIN@2 at line 2 of Encode/Alias.pm
# once (2µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm
# once (2µs+0s) by Data::Dump::BEGIN@3 at line 3 of Data/Dump.pm
# once (2µs+0s) by Encode::Config::BEGIN@7 at line 7 of Encode/Config.pm
# once (2µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm
# once (2µs+0s) by Data::UUID::BEGIN@3 at line 3 of Data/UUID.pm
# once (2µs+0s) by Fcntl::BEGIN@3 at line 3 of Fcntl.pm
# once (2µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm
# once (2µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm
# once (2µs+0s) by Digest::MD5::BEGIN@3 at line 3 of Digest/MD5.pm
# once (2µs+0s) by Template::Constants::BEGIN@22 at line 22 of Template/Constants.pm
# once (2µs+0s) by Template::Filters::BEGIN@22 at line 22 of Template/Filters.pm
# once (2µs+0s) by Errno::BEGIN@9 at line 9 of Errno.pm
# once (2µs+0s) by Template::Exception::BEGIN@22 at line 22 of Template/Exception.pm
# once (2µs+0s) by Template::Stash::BEGIN@22 at line 22 of Template/Stash.pm
# once (2µs+0s) by lib::BEGIN@8 at line 8 of lib.pm
# once (2µs+0s) by IO::BEGIN@7 at line 7 of IO.pm
# once (2µs+0s) by File::Temp::BEGIN@9 at line 9 of File/Temp.pm
# once (2µs+0s) by Encode::MIME::Name::BEGIN@2 at line 2 of Encode/MIME/Name.pm
# once (2µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm
# once (2µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm
# once (2µs+0s) by Encode::Encoding::BEGIN@4 at line 4 of Encode/Encoding.pm
# once (2µs+0s) by RBM::BEGIN@4 at line 4 of /root/tor-browser-build/rbm/lib/RBM.pm
# once (2µs+0s) by Cwd::BEGIN@2 at line 2 of Cwd.pm
# once (2µs+0s) by IO::Seekable::BEGIN@7 at line 7 of IO/Seekable.pm
# once (2µs+0s) by File::Basename::BEGIN@12 at line 12 of File/Basename.pm | ||||
61 | 66 | 15µs | shift; | ||
62 | 66 | 415µs | 2 | 15µs | $^H |= @_ ? &bits : all_bits | all_explicit_bits; # spent 15µs making 2 calls to strict::bits, avg 7µs/call |
63 | } | ||||
64 | |||||
65 | # spent 296µs (144+152) within strict::unimport which was called 27 times, avg 11µs/call:
# once (10µs+9µs) by Path::Tiny::BEGIN@1415 at line 1415 of Path/Tiny.pm
# once (8µs+10µs) by Sort::Versions::BEGIN@55 at line 55 of Sort/Versions.pm
# once (8µs+8µs) by IO::Handle::BEGIN@368 at line 368 of IO/Handle.pm
# once (6µs+10µs) by Template::Base::BEGIN@44 at line 44 of Template/Base.pm
# once (8µs+8µs) by Cwd::BEGIN@648 at line 648 of Cwd.pm
# once (7µs+8µs) by File::Temp::BEGIN@107 at line 107 of File/Temp.pm
# once (6µs+8µs) by IO::CaptureOutput::_proxy::BEGIN@154 at line 154 of IO/CaptureOutput.pm
# once (6µs+8µs) by Time::HiRes::BEGIN@70 at line 70 of Time/HiRes.pm
# once (8µs+6µs) by Config::BEGIN@47 at line 47 of Config.pm
# once (5µs+9µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
# once (5µs+8µs) by File::Path::BEGIN@29 at line 29 of File/Path.pm
# once (6µs+6µs) by List::Util::BEGIN@31 at line 31 of List/Util.pm
# once (6µs+4µs) by parent::BEGIN@21 at line 21 of parent.pm
# once (4µs+5µs) by constant::BEGIN@40 at line 40 of constant.pm
# once (5µs+5µs) by Carp::BEGIN@728 at line 728 of Carp.pm
# once (4µs+4µs) by Template::Base::BEGIN@85 at line 85 of Template/Base.pm
# once (4µs+4µs) by Carp::BEGIN@187 at line 187 of Carp.pm
# once (4µs+4µs) by Carp::BEGIN@254 at line 254 of Carp.pm
# once (4µs+4µs) by File::Spec::Unix::BEGIN@83 at line 83 of File/Spec/Unix.pm
# once (4µs+4µs) by Template::Base::BEGIN@137 at line 137 of Template/Base.pm
# once (4µs+4µs) by constant::BEGIN@141 at line 141 of constant.pm
# once (4µs+4µs) by File::Temp::BEGIN@137 at line 137 of File/Temp.pm
# once (4µs+4µs) by constant::BEGIN@90 at line 90 of constant.pm
# once (4µs+4µs) by constant::BEGIN@65 at line 65 of constant.pm
# once (4µs+4µs) by IO::CaptureOutput::_proxy::BEGIN@178 at line 178 of IO/CaptureOutput.pm
# once (3µs+3µs) by Carp::BEGIN@749 at line 749 of Carp.pm
# once (4µs+0s) by File::Glob::BEGIN@58 at line 58 of File/Glob.pm | ||||
66 | 27 | 6µs | shift; | ||
67 | |||||
68 | 27 | 93µs | if (@_) { | ||
69 | 26 | 45µs | 26 | 152µs | $^H &= ~&bits; # spent 152µs making 26 calls to strict::bits, avg 6µs/call |
70 | } | ||||
71 | else { | ||||
72 | 1 | 1µs | $^H &= ~all_bits; | ||
73 | 1 | 1µs | $^H |= all_explicit_bits; | ||
74 | } | ||||
75 | } | ||||
76 | |||||
77 | 1 | 3µs | 1; | ||
78 | __END__ | ||||
# spent 4µs within strict::CORE:match which was called:
# once (4µs+0s) by strict::BEGIN@7 at line 11 |