← Index
NYTProf Performance Profile   « line view »
For /usr/sbin/pkg_info
  Run on Mon Aug 7 09:39:31 2017
Reported on Mon Aug 7 09:40:20 2017

Filename/usr/libdata/perl5/strict.pm
StatementsExecuted 330 statements in 2.75ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111508µs560µsstrict::::BEGIN@7strict::BEGIN@7
202013417µs786µsstrict::::unimportstrict::unimport
2021384µs384µsstrict::::bitsstrict::bits
464645354µs369µsstrict::::importstrict::import
11152µs52µsstrict::::CORE:matchstrict::CORE:match (opcode)
0000s0sstrict::::__ANON__[:31]strict::__ANON__[:31]
0000s0sstrict::::__ANON__[:37]strict::__ANON__[:37]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package strict;
2
312µs$strict::VERSION = "1.11";
4
512µsmy ( %bitmask, %explicit_bitmask );
6
7
# spent 560µs (508+52) within strict::BEGIN@7 which was called: # once (508µs+52µs) by main::BEGIN@19 at line 38
BEGIN {
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.
111264µs152µs die sprintf "Incorrect use of pragma '%s' at %s line %d.\n", __PACKAGE__, +(caller)[1,2]
# spent 52µ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
1518µs %bitmask = (
16 refs => 0x00000002,
17 subs => 0x00000200,
18 vars => 0x00000400,
19 );
20
2114µs %explicit_bitmask = (
22 refs => 0x00000020,
23 subs => 0x00000040,
24 vars => 0x00000080,
25 );
26
2712µs my $bits = 0;
28175µs $bits |= $_ for values %bitmask;
29
3011µs my $inline_all_bits = $bits;
311113µs *all_bits = sub () { $inline_all_bits };
32
3311µs $bits = 0;
3419µs $bits |= $_ for values %explicit_bitmask;
35
3611µs my $inline_all_explicit_bits = $bits;
37130µs *all_explicit_bits = sub () { $inline_all_explicit_bits };
381691µs1560µs}
# spent 560µs making 1 call to strict::BEGIN@7
39
40
# spent 384µs within strict::bits which was called 20 times, avg 19µs/call: # 19 times (369µs+0s) by strict::unimport at line 69, avg 19µs/call # once (15µs+0s) by strict::import at line 62
sub bits {
412026µs my $bits = 0;
422020µs my @wrong;
432060µs foreach my $s (@_) {
442173µs if (exists $bitmask{$s}) {
452166µs $^H |= $explicit_bitmask{$s};
46
472128µs $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
532028µs if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
5720275µs $bits;
58}
59
60
# spent 369µs (354+15) within strict::import which was called 46 times, avg 8µs/call: # once (41µs+0s) by main::BEGIN@19 at line 19 of /usr/sbin/pkg_info # once (37µs+0s) by IO::Uncompress::Gunzip::BEGIN@8 at line 8 of IO/Uncompress/Gunzip.pm # once (8µs+15µs) by vars::BEGIN@8 at line 8 of vars.pm # once (12µs+0s) by OpenBSD::PackageInfo::BEGIN@18.6 at line 18 of OpenBSD/Paths.pm # once (11µs+0s) by OpenBSD::PkgInfo::State::BEGIN@18 at line 18 of OpenBSD/PackageInfo.pm # once (11µs+0s) by main::BEGIN@19.1 at line 19 of OpenBSD/PkgInfo.pm # once (11µs+0s) by OpenBSD::State::BEGIN@17 at line 17 of OpenBSD/Error.pm # once (11µs+0s) by OpenBSD::State::BEGIN@18 at line 18 of OpenBSD/Subst.pm # once (10µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (10µs+0s) by OpenBSD::PackageLocator::BEGIN@18.10 at line 18 of OpenBSD/PackageRepository.pm # once (10µs+0s) by OpenBSD::PackageInfo::BEGIN@18 at line 18 of OpenBSD/PackageName.pm # once (9µs+0s) by main::BEGIN@19.3 at line 19 of OpenBSD/State.pm # once (9µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (9µs+0s) by OpenBSD::PackageRepository::BEGIN@18 at line 18 of OpenBSD/PackageLocation.pm # once (8µs+0s) by OpenBSD::State::BEGIN@18.8 at line 18 of OpenBSD/PackageLocator.pm # once (7µs+0s) by IO::Compress::Base::Common::BEGIN@3 at line 3 of IO/Compress/Base/Common.pm # once (7µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (7µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (7µs+0s) by OpenBSD::PkgInfo::BEGIN@18 at line 18 of OpenBSD/Search.pm # once (6µs+0s) by OpenBSD::PkgInfo::BEGIN@21 at line 21 of OpenBSD/Getopt.pm # once (6µs+0s) by OpenBSD::PackageLocation::BEGIN@20 at line 20 of OpenBSD/Ustar.pm # once (6µs+0s) by File::Path::BEGIN@4 at line 4 of File/Path.pm # once (6µs+0s) by File::Glob::BEGIN@3 at line 3 of File/Glob.pm # once (6µs+0s) by OpenBSD::MkTemp::BEGIN@4 at line 4 of OpenBSD/MkTemp.pm # once (6µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (5µs+0s) by IO::Uncompress::RawInflate::BEGIN@4 at line 4 of IO/Uncompress/RawInflate.pm # once (5µs+0s) by File::GlobMapper::BEGIN@3 at line 3 of File/GlobMapper.pm # once (5µs+0s) by IO::Compress::Base::Common::BEGIN@520 at line 520 of IO/Compress/Base/Common.pm # once (5µs+0s) by Compress::Raw::Zlib::BEGIN@8 at line 8 of Compress/Raw/Zlib.pm # once (5µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (5µs+0s) by OpenBSD::PackageLocator::BEGIN@18.13 at line 18 of OpenBSD/PackageRepository/Installed.pm # once (4µs+0s) by IO::Uncompress::Base::BEGIN@4 at line 4 of IO/Uncompress/Base.pm # once (4µs+0s) by OpenBSD::PackageLocator::BEGIN@18 at line 18 of OpenBSD/PackageRepositoryList.pm # once (4µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@3 at line 3 of IO/Uncompress/Adapter/Inflate.pm # once (4µs+0s) by IO::File::BEGIN@128 at line 128 of IO/File.pm # once (4µs+0s) by OpenBSD::PackageLocation::BEGIN@18 at line 18 of OpenBSD/Temp.pm # once (4µs+0s) by IO::Handle::BEGIN@264 at line 264 of IO/Handle.pm # once (4µs+0s) by File::Basename::BEGIN@50 at line 50 of File/Basename.pm # once (4µs+0s) by OpenBSD::Ustar::BEGIN@17 at line 17 of OpenBSD/IdCache.pm # once (3µs+0s) by IO::Compress::Zlib::Extra::BEGIN@5 at line 5 of IO/Compress/Zlib/Extra.pm # once (3µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (3µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (3µs+0s) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm # once (3µs+0s) by IO::Compress::Gzip::Constants::BEGIN@3 at line 3 of IO/Compress/Gzip/Constants.pm # once (3µs+0s) by Cwd::BEGIN@2 at line 2 of Cwd.pm # once (3µs+0s) by IO::BEGIN@7 at line 7 of IO.pm
sub import {
614645µs shift;
6246559µs115µs $^H |= @_ ? &bits : all_bits | all_explicit_bits;
# spent 15µs making 1 call to strict::bits
63}
64
65
# spent 786µs (417+369) within strict::unimport which was called 20 times, avg 39µs/call: # once (123µs+28µs) by Carp::BEGIN@592 at line 592 of Carp.pm # once (48µs+28µs) by Carp::BEGIN@132 at line 132 of Carp.pm # once (14µs+48µs) by Compress::Raw::Zlib::BEGIN@113 at line 113 of Compress/Raw/Zlib.pm # once (26µs+28µs) by OpenBSD::State::BEGIN@300 at line 300 of OpenBSD/State.pm # once (23µs+28µs) by OpenBSD::Auto::BEGIN@29 at line 29 of OpenBSD/Error.pm # once (21µs+25µs) by Carp::BEGIN@612 at line 612 of Carp.pm # once (19µs+22µs) by OpenBSD::State::BEGIN@301 at line 301 of OpenBSD/State.pm # once (15µs+19µs) by constant::BEGIN@65 at line 65 of constant.pm # once (15µs+18µs) by OpenBSD::Getopt::BEGIN@37 at line 37 of OpenBSD/Getopt.pm # once (14µs+16µs) by constant::BEGIN@40 at line 40 of constant.pm # once (13µs+16µs) by List::Util::BEGIN@30 at line 30 of List/Util.pm # once (12µs+16µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (11µs+14µs) by IO::Handle::BEGIN@631 at line 631 of IO/Handle.pm # once (10µs+12µs) by constant::BEGIN@141 at line 141 of constant.pm # once (10µs+11µs) by constant::BEGIN@90 at line 90 of constant.pm # once (10µs+11µs) by Cwd::BEGIN@691 at line 691 of Cwd.pm # once (9µs+11µs) by OpenBSD::Getopt::BEGIN@38 at line 38 of OpenBSD/Getopt.pm # once (8µs+10µs) by File::Spec::Unix::BEGIN@182 at line 182 of File/Spec/Unix.pm # once (8µs+10µs) by File::Path::BEGIN@29 at line 29 of File/Path.pm # once (8µs+0s) by File::Glob::BEGIN@58 at line 58 of File/Glob.pm
sub unimport {
662020µs shift;
67
6820217µs if (@_) {
6919107µs19369µs $^H &= ~&bits;
# spent 369µs making 19 calls to strict::bits, avg 19µs/call
70 }
71 else {
7212µs $^H &= ~all_bits;
7311µs $^H |= all_explicit_bits;
74 }
75}
76
77115µs1;
78__END__
 
# spent 52µs within strict::CORE:match which was called: # once (52µs+0s) by strict::BEGIN@7 at line 11
sub strict::CORE:match; # opcode