← Index
NYTProf Performance Profile   « line view »
For /usr/sbin/pkg_info
  Run on Fri Aug 4 10:15:59 2017
Reported on Fri Aug 4 10:16:18 2017

Filename/usr/libdata/perl5/strict.pm
StatementsExecuted 227 statements in 826µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1521163µs163µsstrict::::bitsstrict::bits
111142µs157µsstrict::::BEGIN@7strict::BEGIN@7
14147130µs274µsstrict::::unimportstrict::unimport
242424110µs129µsstrict::::importstrict::import
11115µs15µ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
31900ns$strict::VERSION = "1.11";
4
51600nsmy ( %bitmask, %explicit_bitmask );
6
7
# spent 157µs (142+15) within strict::BEGIN@7 which was called: # once (142µs+15µ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.
11176µs115µs die sprintf "Incorrect use of pragma '%s' at %s line %d.\n", __PACKAGE__, +(caller)[1,2]
# spent 15µ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
1513µs %bitmask = (
16 refs => 0x00000002,
17 subs => 0x00000200,
18 vars => 0x00000400,
19 );
20
2111µs %explicit_bitmask = (
22 refs => 0x00000020,
23 subs => 0x00000040,
24 vars => 0x00000080,
25 );
26
271800ns my $bits = 0;
28116µs $bits |= $_ for values %bitmask;
29
301600ns my $inline_all_bits = $bits;
31132µs *all_bits = sub () { $inline_all_bits };
32
331700ns $bits = 0;
3414µs $bits |= $_ for values %explicit_bitmask;
35
361700ns my $inline_all_explicit_bits = $bits;
3718µs *all_explicit_bits = sub () { $inline_all_explicit_bits };
381178µs1157µs}
# spent 157µs making 1 call to strict::BEGIN@7
39
40
# spent 163µs within strict::bits which was called 15 times, avg 11µs/call: # 14 times (144µs+0s) by strict::unimport at line 69, avg 10µs/call # once (19µs+0s) by strict::import at line 62
sub bits {
411512µs my $bits = 0;
421510µs my @wrong;
431525µs foreach my $s (@_) {
441636µs if (exists $bitmask{$s}) {
451622µs $^H |= $explicit_bitmask{$s};
46
471613µs $bits |= $bitmask{$s};
48 }
49 else {
50 push @wrong, $s;
51 }
52 }
531512µs if (@wrong) {
54 require Carp;
55 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
56 }
571567µs $bits;
58}
59
60
# spent 129µs (110+19) within strict::import which was called 24 times, avg 5µs/call: # once (8µs+19µs) by vars::BEGIN@8 at line 8 of vars.pm # once (12µs+0s) by main::BEGIN@19 at line 19 of /usr/sbin/pkg_info # once (10µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (5µs+0s) by OpenBSD::PackageLocator::BEGIN@18.13 at line 18 of OpenBSD/PackageRepository/Installed.pm # once (4µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (4µs+0s) by OpenBSD::State::BEGIN@18 at line 18 of OpenBSD/Subst.pm # once (4µs+0s) by OpenBSD::PackageInfo::BEGIN@18.6 at line 18 of OpenBSD/Paths.pm # once (4µs+0s) by OpenBSD::PackageRepository::BEGIN@18 at line 18 of OpenBSD/PackageLocation.pm # once (4µs+0s) by OpenBSD::State::BEGIN@18.8 at line 18 of OpenBSD/PackageLocator.pm # once (4µs+0s) by OpenBSD::State::BEGIN@17 at line 17 of OpenBSD/Error.pm # once (4µs+0s) by OpenBSD::PkgInfo::BEGIN@21 at line 21 of OpenBSD/Getopt.pm # once (4µs+0s) by main::BEGIN@19.1 at line 19 of OpenBSD/PkgInfo.pm # once (4µs+0s) by OpenBSD::PkgInfo::State::BEGIN@18 at line 18 of OpenBSD/PackageInfo.pm # once (4µs+0s) by Carp::BEGIN@4 at line 4 of Carp.pm # once (4µs+0s) by OpenBSD::PackageLocator::BEGIN@18.10 at line 18 of OpenBSD/PackageRepository.pm # once (4µs+0s) by OpenBSD::PkgInfo::BEGIN@18 at line 18 of OpenBSD/Search.pm # once (4µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (4µs+0s) by OpenBSD::PackageLocator::BEGIN@18 at line 18 of OpenBSD/PackageRepositoryList.pm # once (4µs+0s) by OpenBSD::PackageInfo::BEGIN@18 at line 18 of OpenBSD/PackageName.pm # once (4µs+0s) by OpenBSD::PackageLocation::BEGIN@18 at line 18 of OpenBSD/Temp.pm # once (4µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (4µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (4µs+0s) by OpenBSD::MkTemp::BEGIN@4 at line 4 of OpenBSD/MkTemp.pm # once (3µs+0s) by main::BEGIN@19.3 at line 19 of OpenBSD/State.pm
sub import {
612416µs shift;
6224164µs119µs $^H |= @_ ? &bits : all_bits | all_explicit_bits;
# spent 19µs making 1 call to strict::bits
63}
64
65
# spent 274µs (130+144) within strict::unimport which was called 14 times, avg 20µs/call: # once (16µs+11µs) by Carp::BEGIN@132 at line 132 of Carp.pm # once (16µs+10µs) by constant::BEGIN@90 at line 90 of constant.pm # once (11µs+10µs) by File::Spec::Unix::BEGIN@182 at line 182 of File/Spec/Unix.pm # once (9µs+11µs) by Carp::BEGIN@592 at line 592 of Carp.pm # once (9µs+11µs) by OpenBSD::State::BEGIN@300 at line 300 of OpenBSD/State.pm # once (8µs+11µs) by constant::BEGIN@40 at line 40 of constant.pm # once (8µs+11µs) by OpenBSD::Getopt::BEGIN@37 at line 37 of OpenBSD/Getopt.pm # once (8µs+11µs) by OpenBSD::Auto::BEGIN@29 at line 29 of OpenBSD/Error.pm # once (7µs+11µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (8µs+10µs) by Carp::BEGIN@612 at line 612 of Carp.pm # once (7µs+10µs) by constant::BEGIN@65 at line 65 of constant.pm # once (7µs+9µs) by constant::BEGIN@141 at line 141 of constant.pm # once (7µs+9µs) by OpenBSD::Getopt::BEGIN@38 at line 38 of OpenBSD/Getopt.pm # once (7µs+9µs) by OpenBSD::State::BEGIN@301 at line 301 of OpenBSD/State.pm
sub unimport {
66149µs shift;
67
681464µs if (@_) {
691449µs14144µs $^H &= ~&bits;
# spent 144µs making 14 calls to strict::bits, avg 10µs/call
70 }
71 else {
72 $^H &= ~all_bits;
73 $^H |= all_explicit_bits;
74 }
75}
76
7714µs1;
78__END__
 
# spent 15µs within strict::CORE:match which was called: # once (15µs+0s) by strict::BEGIN@7 at line 11
sub strict::CORE:match; # opcode