← Index
NYTProf Performance Profile   « line view »
For /usr/sbin/pkg_info
  Run on Fri Aug 4 10:12:01 2017
Reported on Fri Aug 4 10:12:17 2017

Filename/usr/libdata/perl5/strict.pm
StatementsExecuted 330 statements in 2.14ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2021726µs726µsstrict::::bitsstrict::bits
464645284µs303µsstrict::::importstrict::import
202013253µs961µsstrict::::unimportstrict::unimport
111236µs264µsstrict::::BEGIN@7strict::BEGIN@7
11127µs27µ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
311µs$strict::VERSION = "1.11";
4
511µsmy ( %bitmask, %explicit_bitmask );
6
7
# spent 264µs (236+27) within strict::BEGIN@7 which was called: # once (236µs+27µ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.
111123µs127µs die sprintf "Incorrect use of pragma '%s' at %s line %d.\n", __PACKAGE__, +(caller)[1,2]
# spent 27µ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
1515µs %bitmask = (
16 refs => 0x00000002,
17 subs => 0x00000200,
18 vars => 0x00000400,
19 );
20
2112µs %explicit_bitmask = (
22 refs => 0x00000020,
23 subs => 0x00000040,
24 vars => 0x00000080,
25 );
26
271900ns my $bits = 0;
28131µs $bits |= $_ for values %bitmask;
29
301900ns my $inline_all_bits = $bits;
31154µs *all_bits = sub () { $inline_all_bits };
32
331900ns $bits = 0;
3416µs $bits |= $_ for values %explicit_bitmask;
35
3611µs my $inline_all_explicit_bits = $bits;
37115µs *all_explicit_bits = sub () { $inline_all_explicit_bits };
381323µs1264µs}
# spent 264µs making 1 call to strict::BEGIN@7
39
40
# spent 726µs within strict::bits which was called 20 times, avg 36µs/call: # 19 times (708µs+0s) by strict::unimport at line 69, avg 37µs/call # once (18µs+0s) by strict::import at line 62
sub bits {
412021µs my $bits = 0;
422016µs my @wrong;
432051µs foreach my $s (@_) {
442157µs if (exists $bitmask{$s}) {
452144µs $^H |= $explicit_bitmask{$s};
46
472121µs $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
532021µs if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
5720131µs $bits;
58}
59
60
# spent 303µs (284+18) within strict::import which was called 46 times, avg 7µs/call: # once (44µs+0s) by IO::Uncompress::Gunzip::BEGIN@8 at line 8 of IO/Uncompress/Gunzip.pm # once (8µs+18µs) by vars::BEGIN@8 at line 8 of vars.pm # once (22µs+0s) by main::BEGIN@19 at line 19 of /usr/sbin/pkg_info # once (9µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (8µs+0s) by IO::Compress::Base::Common::BEGIN@3 at line 3 of IO/Compress/Base/Common.pm # once (8µs+0s) by OpenBSD::State::BEGIN@18 at line 18 of OpenBSD/Subst.pm # once (8µs+0s) by main::BEGIN@19.1 at line 19 of OpenBSD/PkgInfo.pm # once (8µs+0s) by OpenBSD::State::BEGIN@17 at line 17 of OpenBSD/Error.pm # once (7µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (7µs+0s) by main::BEGIN@19.3 at line 19 of OpenBSD/State.pm # once (6µs+0s) by IO::Uncompress::RawInflate::BEGIN@4 at line 4 of IO/Uncompress/RawInflate.pm # once (6µs+0s) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (6µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (6µs+0s) by Compress::Raw::Zlib::BEGIN@8 at line 8 of Compress/Raw/Zlib.pm # once (6µs+0s) by IO::Compress::Base::Common::BEGIN@520 at line 520 of IO/Compress/Base/Common.pm # once (6µs+0s) by OpenBSD::PackageLocation::BEGIN@20 at line 20 of OpenBSD/Ustar.pm # once (6µs+0s) by File::Glob::BEGIN@3 at line 3 of File/Glob.pm # once (6µs+0s) by File::GlobMapper::BEGIN@3 at line 3 of File/GlobMapper.pm # once (5µs+0s) by File::Path::BEGIN@4 at line 4 of File/Path.pm # once (5µs+0s) by IO::Uncompress::Base::BEGIN@4 at line 4 of IO/Uncompress/Base.pm # once (5µs+0s) by OpenBSD::PkgInfo::State::BEGIN@18 at line 18 of OpenBSD/PackageInfo.pm # once (5µs+0s) by IO::Compress::Zlib::Extra::BEGIN@5 at line 5 of IO/Compress/Zlib/Extra.pm # once (4µs+0s) by IO::File::BEGIN@128 at line 128 of IO/File.pm # once (4µs+0s) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm # once (4µs+0s) by OpenBSD::PackageLocator::BEGIN@18.10 at line 18 of OpenBSD/PackageRepository.pm # once (4µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (4µs+0s) by OpenBSD::PackageRepository::BEGIN@18 at line 18 of OpenBSD/PackageLocation.pm # once (4µs+0s) by OpenBSD::PackageInfo::BEGIN@18.6 at line 18 of OpenBSD/Paths.pm # once (4µs+0s) by OpenBSD::PackageLocation::BEGIN@18 at line 18 of OpenBSD/Temp.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::Handle::BEGIN@264 at line 264 of IO/Handle.pm # once (4µs+0s) by OpenBSD::PkgInfo::BEGIN@21 at line 21 of OpenBSD/Getopt.pm # once (4µs+0s) by OpenBSD::PkgInfo::BEGIN@18 at line 18 of OpenBSD/Search.pm # once (4µs+0s) by OpenBSD::Ustar::BEGIN@17 at line 17 of OpenBSD/IdCache.pm # once (4µs+0s) by OpenBSD::PackageLocator::BEGIN@18.13 at line 18 of OpenBSD/PackageRepository/Installed.pm # once (4µs+0s) by OpenBSD::PackageInfo::BEGIN@18 at line 18 of OpenBSD/PackageName.pm # once (4µs+0s) by OpenBSD::State::BEGIN@18.8 at line 18 of OpenBSD/PackageLocator.pm # once (4µs+0s) by OpenBSD::MkTemp::BEGIN@4 at line 4 of OpenBSD/MkTemp.pm # once (4µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (4µs+0s) by IO::Compress::Gzip::Constants::BEGIN@3 at line 3 of IO/Compress/Gzip/Constants.pm # once (4µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (4µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (4µs+0s) by Cwd::BEGIN@2 at line 2 of Cwd.pm # once (4µs+0s) by OpenBSD::PackageLocator::BEGIN@18 at line 18 of OpenBSD/PackageRepositoryList.pm # once (3µs+0s) by File::Basename::BEGIN@50 at line 50 of File/Basename.pm # once (3µs+0s) by IO::BEGIN@7 at line 7 of IO.pm
sub import {
614637µs shift;
6246483µs118µs $^H |= @_ ? &bits : all_bits | all_explicit_bits;
# spent 18µs making 1 call to strict::bits
63}
64
65
# spent 961µs (253+708) within strict::unimport which was called 20 times, avg 48µs/call: # once (14µs+463µs) by Compress::Raw::Zlib::BEGIN@113 at line 113 of Compress/Raw/Zlib.pm # once (34µs+20µs) by Carp::BEGIN@132 at line 132 of Carp.pm # once (25µs+18µs) by OpenBSD::State::BEGIN@300 at line 300 of OpenBSD/State.pm # once (20µs+23µs) by Carp::BEGIN@592 at line 592 of Carp.pm # once (15µs+20µs) by OpenBSD::Auto::BEGIN@29 at line 29 of OpenBSD/Error.pm # once (15µs+17µs) by List::Util::BEGIN@30 at line 30 of List/Util.pm # once (14µs+17µs) by Carp::BEGIN@612 at line 612 of Carp.pm # once (13µs+14µs) by Cwd::BEGIN@691 at line 691 of Cwd.pm # once (11µs+14µs) by IO::Handle::BEGIN@631 at line 631 of IO/Handle.pm # once (12µs+10µs) by File::Spec::Unix::BEGIN@182 at line 182 of File/Spec/Unix.pm # once (9µs+11µs) by constant::BEGIN@40 at line 40 of constant.pm # once (8µs+11µs) by OpenBSD::State::BEGIN@301 at line 301 of OpenBSD/State.pm # once (8µs+11µs) by OpenBSD::Getopt::BEGIN@37 at line 37 of OpenBSD/Getopt.pm # once (8µs+10µs) by constant::BEGIN@65 at line 65 of constant.pm # once (8µs+10µs) by constant::BEGIN@141 at line 141 of constant.pm # once (8µs+10µs) by File::Path::BEGIN@29 at line 29 of File/Path.pm # once (8µs+10µs) by constant::BEGIN@90 at line 90 of constant.pm # once (7µs+10µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (7µs+9µs) by OpenBSD::Getopt::BEGIN@38 at line 38 of OpenBSD/Getopt.pm # once (9µs+0s) by File::Glob::BEGIN@58 at line 58 of File/Glob.pm
sub unimport {
662018µs shift;
67
6820146µs if (@_) {
6919512µs19708µs $^H &= ~&bits;
# spent 708µs making 19 calls to strict::bits, avg 37µs/call
70 }
71 else {
7212µs $^H &= ~all_bits;
7311µs $^H |= all_explicit_bits;
74 }
75}
76
7717µs1;
78__END__
 
# spent 27µs within strict::CORE:match which was called: # once (27µs+0s) by strict::BEGIN@7 at line 11
sub strict::CORE:match; # opcode