← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Sun Aug 5 15:24:32 2012
Reported on Sun Aug 5 15:24:57 2012

Filename/usr/lib/perl5/5.12.4/strict.pm
StatementsExecuted 259 statements in 3.94ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
20311.01ms1.01msstrict::::bitsstrict::bits
3636361.01ms1.13msstrict::::importstrict::import
181811828µs1.63msstrict::::unimportstrict::unimport
11178µs78µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
11148µs48µ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
316µs$strict::VERSION = "1.04";
4
5# Verify that we're called correctly so that strictures will work.
61207µs2126µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 78µs making 1 call to strict::CORE:regcomp # spent 48µ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
12117µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
17
18
# spent 1.01ms within strict::bits which was called 20 times, avg 50µs/call: # 17 times (801µs+0s) by strict::unimport at line 41, avg 47µs/call # 2 times (122µs+0s) by strict::import at line 36, avg 61µs/call # once (83µs+0s) by DateTime::BEGIN@8 at line 32
sub bits {
192075µs my $bits = 0;
202051µs my @wrong;
2120193µs foreach my $s (@_) {
222389µs push @wrong, $s unless exists $bitmask{$s};
2323248µs $bits |= $bitmask{$s} || 0;
24 }
252065µs if (@wrong) {
26 require Carp;
27 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
28 }
2920440µs $bits;
30}
31
32122µs183µsmy $default_bits = bits(qw(refs subs vars));
# spent 83µs making 1 call to strict::bits
33
34
# spent 1.13ms (1.01+122µs) within strict::import which was called 36 times, avg 31µs/call: # once (46µs+75µs) by vars::BEGIN@8 at line 8 of vars.pm # once (45µs+47µs) by base::BEGIN@3 at line 3 of base.pm # once (40µs+0s) by DateTime::TimeZone::Catalog::BEGIN@10 at line 10 of DateTime/TimeZone/Catalog.pm # once (36µs+0s) by DateTime::TimeZone::BEGIN@5 at line 5 of DateTime/TimeZone.pm # once (35µs+0s) by DateTime::BEGIN@8 at line 8 of DateTime.pm # once (35µs+0s) by DateTime::TimeZone::Floating::BEGIN@3 at line 3 of DateTime/TimeZone/Floating.pm # once (29µs+0s) by DateTime::Locale::root::BEGIN@21 at line 21 of DateTime/Locale/root.pm # once (29µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm # once (28µs+0s) by DateTime::Infinite::BEGIN@6 at line 6 of DateTime/Infinite.pm # once (28µs+0s) by DateTime::Locale::Catalog::BEGIN@17 at line 17 of DateTime/Locale/Catalog.pm # once (28µs+0s) by Math::Round::BEGIN@3 at line 3 of Math/Round.pm # once (27µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (26µs+0s) by DateTime::Locale::BEGIN@3 at line 3 of DateTime/Locale.pm # once (26µs+0s) by List::Util::BEGIN@11 at line 11 of List/Util.pm # once (26µs+0s) by Params::Validate::BEGIN@8 at line 8 of Params/Validate.pm # once (26µs+0s) by Params::Validate::XS::BEGIN@3 at line 3 of Params/Validate/XS.pm # once (26µs+0s) by DateTime::TimeZone::Local::BEGIN@3 at line 3 of DateTime/TimeZone/Local.pm # once (26µs+0s) by DateTime::Locale::en_US::BEGIN@21 at line 21 of DateTime/Locale/en_US.pm # once (26µs+0s) by Try::Tiny::BEGIN@3 at line 3 of Try/Tiny.pm # once (26µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (26µs+0s) by DateTime::TimeZone::UTC::BEGIN@3 at line 3 of DateTime/TimeZone/UTC.pm # once (26µs+0s) by DateTime::Duration::BEGIN@6 at line 6 of DateTime/Duration.pm # once (25µs+0s) by DateTime::TimeZone::OffsetOnly::BEGIN@3 at line 3 of DateTime/TimeZone/OffsetOnly.pm # once (25µs+0s) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (25µs+0s) by Params::Validate::Constants::BEGIN@3 at line 3 of Params/Validate/Constants.pm # once (25µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (25µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl # once (25µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (25µs+0s) by DateTime::Locale::en::BEGIN@21 at line 21 of DateTime/Locale/en.pm # once (24µs+0s) by Module::Implementation::BEGIN@6 at line 6 of Module/Implementation.pm # once (24µs+0s) by DateTime::Locale::Base::BEGIN@3 at line 3 of DateTime/Locale/Base.pm # once (24µs+0s) by Config::BEGIN@9 at line 9 of Config.pm # once (24µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (24µs+0s) by DateTime::Helpers::BEGIN@6 at line 6 of DateTime/Helpers.pm # once (24µs+0s) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (23µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm
sub import {
3536140µs shift;
36361.46ms2122µs $^H |= @_ ? bits(@_) : $default_bits;
# spent 122µs making 2 calls to strict::bits, avg 61µs/call
37}
38
39
# spent 1.63ms (828µs+801µs) within strict::unimport which was called 18 times, avg 91µs/call: # once (66µs+48µs) by Carp::BEGIN@303 at line 303 of Carp.pm # once (46µs+64µs) by DateTime::Locale::Base::BEGIN@25 at line 25 of DateTime/Locale/Base.pm # once (50µs+53µs) by Fcntl::BEGIN@239 at line 239 of Fcntl.pm # once (50µs+48µs) by DateTime::Locale::Base::BEGIN@363 at line 363 of DateTime/Locale/Base.pm # once (50µs+47µs) by Module::Implementation::BEGIN@113 at line 113 of Module/Implementation.pm # once (48µs+47µs) by File::Spec::Unix::BEGIN@149 at line 149 of File/Spec/Unix.pm # once (49µs+46µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm # once (47µs+45µs) by DateTime::Locale::Base::BEGIN@176 at line 176 of DateTime/Locale/Base.pm # once (40µs+51µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (43µs+47µs) by Config::BEGIN@35 at line 35 of Config.pm # once (47µs+43µs) by DateTime::Locale::Base::BEGIN@119 at line 119 of DateTime/Locale/Base.pm # once (44µs+46µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm # once (45µs+45µs) by constant::BEGIN@29 at line 29 of constant.pm # once (44µs+43µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm # once (46µs+41µs) by constant::BEGIN@52 at line 52 of constant.pm # once (43µs+43µs) by constant::BEGIN@114 at line 114 of constant.pm # once (42µs+43µs) by DateTime::Infinite::BEGIN@15 at line 15 of DateTime/Infinite.pm # once (28µs+0s) by POSIX::BEGIN@39 at line 39 of POSIX.pm
sub unimport {
401870µs shift;
4118811µs17801µs $^H &= ~ (@_ ? bits(@_) : $default_bits);
# spent 801µs making 17 calls to strict::bits, avg 47µs/call
42}
43
44146µs1;
45__END__
 
# spent 48µs within strict::CORE:match which was called: # once (48µs+0s) by DateTime::BEGIN@8 at line 6
sub strict::CORE:match; # opcode
# spent 78µs within strict::CORE:regcomp which was called: # once (78µs+0s) by DateTime::BEGIN@8 at line 6
sub strict::CORE:regcomp; # opcode