← Index
NYTProf Performance Profile   « line view »
For runner.pl
  Run on Thu Jul 3 15:14:19 2014
Reported on Thu Jul 3 15:16:35 2014

Filename/usr/share/perl5/core_perl/strict.pm
StatementsExecuted 279 statements in 1.13ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2121447µs447µsstrict::::bitsstrict::bits
111111158µs432µsstrict::::importstrict::import
10104152µs325µsstrict::::unimportstrict::unimport
11147µs47µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
11111µs11µsstrict::::CORE:matchstrict::CORE:match (opcode)
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.07";
4
5# Verify that we're called correctly so that strictures will work.
6190µs258µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 47µs making 1 call to strict::CORE:regcomp # spent 11µs making 1 call to strict::CORE:match
7 # Can't use Carp, since Carp uses us!
8 my (undef, $f, $l) = caller;
9 die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
10}
11
1216µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
1713µsmy %explicit_bitmask = (
18refs => 0x00000020,
19subs => 0x00000040,
20vars => 0x00000080
21);
22
23
# spent 447µs within strict::bits which was called 21 times, avg 21µs/call: # 11 times (274µs+0s) by strict::import at line 44, avg 25µs/call # 10 times (173µs+0s) by strict::unimport at line 49, avg 17µs/call
sub bits {
242120µs my $bits = 0;
25219µs my @wrong;
262170µs foreach my $s (@_) {
274254µs if (exists $bitmask{$s}) {
2842108µs $^H |= $explicit_bitmask{$s};
29 }
30 else { push @wrong, $s };
314294µs $bits |= $bitmask{$s} || 0;
32 }
332120µs if (@wrong) {
34 require Carp;
35 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
36 }
3721205µs $bits;
38}
39
4013µsmy @default_bits = qw(refs subs vars);
41
42
# spent 432µs (158+274) within strict::import which was called 11 times, avg 39µs/call: # once (20µs+40µs) by Runner::BEGIN@9 at line 9 of runner.pl # once (18µs+30µs) by attributes::BEGIN@9 at line 9 of attributes.pm # once (17µs+30µs) by constant::BEGIN@3 at line 3 of constant.pm # once (14µs+27µs) by Carp::BEGIN@4 at line 4 of Carp.pm # once (15µs+24µs) by Runner::Job::BEGIN@3 at line 3 of Runner/Job.pm # once (14µs+22µs) by List::Util::BEGIN@9 at line 9 of List/Util.pm # once (13µs+20µs) by vars::BEGIN@8 at line 8 of vars.pm # once (13µs+21µs) by Runner::IO::BEGIN@3 at line 3 of Runner/IO.pm # once (12µs+20µs) by Runner::Stats::BEGIN@3 at line 3 of Runner/Stats.pm # once (12µs+19µs) by Config::BEGIN@9 at line 9 of Config.pm # once (11µs+19µs) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm
sub import {
43116µs shift;
4411269µs11274µs $^H |= bits(@_ ? @_ : @default_bits);
# spent 274µs making 11 calls to strict::bits, avg 25µs/call
45}
46
47
# spent 325µs (152+173) within strict::unimport which was called 10 times, avg 33µs/call: # once (18µs+21µs) by Carp::BEGIN@433 at line 433 of Carp.pm # once (17µs+20µs) by constant::BEGIN@28 at line 28 of constant.pm # once (16µs+20µs) by constant::BEGIN@116 at line 116 of constant.pm # once (19µs+16µs) by Carp::BEGIN@8 at line 8 of Carp.pm # once (15µs+18µs) by Carp::BEGIN@67 at line 67 of Carp.pm # once (14µs+17µs) by constant::BEGIN@54 at line 54 of constant.pm # once (14µs+16µs) by Carp::BEGIN@18 at line 18 of Carp.pm # once (13µs+16µs) by Carp::BEGIN@448 at line 448 of Carp.pm # once (14µs+14µs) by List::Util::BEGIN@30 at line 30 of List/Util.pm # once (13µs+14µs) by Config::BEGIN@47 at line 47 of Config.pm
sub unimport {
48105µs shift;
4910138µs10173µs $^H &= ~ bits(@_ ? @_ : @default_bits);
# spent 173µs making 10 calls to strict::bits, avg 17µs/call
50}
51
52129µs1;
53__END__
 
# spent 11µs within strict::CORE:match which was called: # once (11µs+0s) by Runner::BEGIN@9 at line 6
sub strict::CORE:match; # opcode
# spent 47µs within strict::CORE:regcomp which was called: # once (47µs+0s) by Runner::BEGIN@9 at line 6
sub strict::CORE:regcomp; # opcode