← Index
NYTProf Performance Profile   « block view • line view • sub view »
For conv.pl
  Run on Sun Nov 14 22:50:31 2010
Reported on Sun Nov 14 22:51:19 2010

Filename/usr/share/perl/5.10/strict.pm
StatementsExecuted 268 statements in 1.06ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1931294µs294µsstrict::::bitsstrict::bits
444444289µs315µsstrict::::importstrict::import
181814211µs455µsstrict::::unimportstrict::unimport
11118µs18µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1115µs5µ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
311µs$strict::VERSION = "1.04";
4
5# Verify that we're called correctly so that strictures will work.
6136µs223µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 18µs making 1 call to strict::CORE:regcomp # spent 5µ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
1213µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
17
18
# spent 294µs within strict::bits which was called 19 times, avg 15µs/call: # 16 times (244µs+0s) by strict::unimport at line 41, avg 15µs/call # 2 times (26µs+0s) by strict::import at line 36, avg 13µs/call # once (24µs+0s) by MARC::File::XML::BEGIN@4 at line 32
sub bits {
19139337µs my $bits = 0;
20 my @wrong;
21 foreach my $s (@_) {
22 push @wrong, $s unless exists $bitmask{$s};
23 $bits |= $bitmask{$s} || 0;
24 }
25 if (@wrong) {
26 require Carp;
27 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
28 }
29 $bits;
30}
31
3215µs124µsmy $default_bits = bits(qw(refs subs vars));
# spent 24µs making 1 call to strict::bits
33
34
# spent 315µs (289+26) within strict::import which was called 44 times, avg 7µs/call: # once (13µs+13µs) by vars::BEGIN@8 at line 8 of vars.pm # once (11µs+13µs) by base::BEGIN@3 at line 3 of base.pm # once (9µs+0s) by SDBM_File::BEGIN@3 at line 3 of SDBM_File.pm # once (8µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (7µs+0s) by XML::LibXML::XPathContext::BEGIN@12 at line 12 of XML/LibXML/XPathContext.pm # once (7µs+0s) by XML::LibXML::BEGIN@13 at line 13 of XML/LibXML.pm # once (7µs+0s) by XML::LibXML::Error::BEGIN@11 at line 11 of XML/LibXML/Error.pm # once (7µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (7µs+0s) by Encode::Config::BEGIN@7 at line 7 of Encode/Config.pm # once (7µs+0s) by Unicode::Normalize::BEGIN@10 at line 10 of Unicode/Normalize.pm # once (7µs+0s) by MARC::Charset::Code::BEGIN@3 at line 3 of MARC/Charset/Code.pm # once (7µs+0s) by MARC::Batch::BEGIN@26 at line 26 of MARC/Batch.pm # once (7µs+0s) by File::Spec::Unix::BEGIN@3 at line 3 of File/Spec/Unix.pm # once (7µs+0s) by XML::LibXML::Boolean::BEGIN@14 at line 14 of XML/LibXML/Boolean.pm # once (7µs+0s) by IO::File::BEGIN@6 at line 6 of IO/File.pm # once (7µs+0s) by MARC::Charset::Table::BEGIN@34 at line 34 of MARC/Charset/Table.pm # once (7µs+0s) by Encode::BEGIN@5 at line 5 of Encode.pm # once (7µs+0s) by MARC::File::USMARC::BEGIN@9 at line 9 of MARC/File/USMARC.pm # once (6µs+0s) by Config::BEGIN@9 at line 9 of Config.pm # once (6µs+0s) by FileHandle::BEGIN@4 at line 4 of FileHandle.pm # once (6µs+0s) by MARC::File::XML::BEGIN@4 at line 4 of lib/MARC/File/XML.pm # once (6µs+0s) by utf8::BEGIN@2 at line 2 of utf8_heavy.pl # once (6µs+0s) by XML::LibXML::Literal::BEGIN@13 at line 13 of XML/LibXML/Literal.pm # once (6µs+0s) by Class::Accessor::BEGIN@3 at line 3 of Class/Accessor.pm # once (6µs+0s) by XML::LibXML::Number::BEGIN@13 at line 13 of XML/LibXML/Number.pm # once (6µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl # once (6µs+0s) by Encode::Alias::BEGIN@2 at line 2 of Encode/Alias.pm # once (6µs+0s) by XML::LibXML::NodeList::BEGIN@11 at line 11 of XML/LibXML/NodeList.pm # once (6µs+0s) by MARC::File::Encode::BEGIN@19 at line 19 of MARC/File/Encode.pm # once (6µs+0s) by charnames::BEGIN@2 at line 2 of charnames.pm # once (6µs+0s) by MARC::Field::BEGIN@3 at line 3 of MARC/Field.pm # once (6µs+0s) by MARC::Charset::BEGIN@4 at line 4 of MARC/Charset.pm # once (6µs+0s) by MARC::Record::BEGIN@9 at line 9 of MARC/Record.pm # once (6µs+0s) by File::Spec::BEGIN@3 at line 3 of File/Spec.pm # once (6µs+0s) by XML::SAX::Exception::BEGIN@3 at line 3 of XML/SAX/Exception.pm # once (6µs+0s) by POSIX::BEGIN@2 at line 2 of POSIX.pm # once (6µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm # once (6µs+0s) by Encode::Encoding::BEGIN@4 at line 4 of Encode/Encoding.pm # once (6µs+0s) by Fcntl::BEGIN@3 at line 3 of Fcntl.pm # once (5µs+0s) by IO::Handle::BEGIN@4 at line 4 of IO/Handle.pm # once (5µs+0s) by MARC::File::BEGIN@9 at line 9 of MARC/File.pm # once (5µs+0s) by IO::Seekable::BEGIN@7 at line 7 of IO/Seekable.pm # once (5µs+0s) by MARC::Charset::Constants::BEGIN@18 at line 18 of MARC/Charset/Constants.pm # once (4µs+0s) by IO::BEGIN@7 at line 7 of IO.pm
sub import {
3588437µs shift;
36226µs $^H |= @_ ? bits(@_) : $default_bits;
# spent 26µs making 2 calls to strict::bits, avg 13µs/call
37}
38
39
# spent 455µs (211+244) within strict::unimport which was called 18 times, avg 25µs/call: # once (13µs+21µs) by Class::Accessor::BEGIN@150 at line 150 of Class/Accessor.pm # once (14µs+16µs) by XML::LibXML::XPathContext::BEGIN@141 at line 141 of XML/LibXML/XPathContext.pm # once (14µs+16µs) by utf8::BEGIN@76 at line 76 of utf8_heavy.pl # once (13µs+17µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (13µs+16µs) by IO::Handle::BEGIN@355 at line 355 of IO/Handle.pm # once (12µs+17µs) by Config::BEGIN@35 at line 35 of Config.pm # once (13µs+16µs) by File::Spec::Unix::BEGIN@145 at line 145 of File/Spec/Unix.pm # once (14µs+15µs) by constant::BEGIN@38 at line 38 of constant.pm # once (11µs+16µs) by Carp::BEGIN@289 at line 289 of Carp/Heavy.pm # once (12µs+15µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm # once (11µs+15µs) by utf8::BEGIN@155 at line 155 of utf8_heavy.pl # once (13µs+13µs) by Fcntl::BEGIN@184 at line 184 of Fcntl.pm # once (11µs+13µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm # once (10µs+13µs) by FileHandle::BEGIN@46 at line 46 of FileHandle.pm # once (11µs+12µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm # once (10µs+13µs) by constant::BEGIN@101 at line 101 of constant.pm # once (11µs+0s) by MARC::File::BEGIN@57 at line 57 of MARC/File.pm # once (5µs+0s) by POSIX::BEGIN@39 at line 39 of POSIX.pm
sub unimport {
4036223µs shift;
4116244µs $^H &= ~ (@_ ? bits(@_) : $default_bits);
# spent 244µs making 16 calls to strict::bits, avg 15µs/call
42}
43
44116µs1;
45__END__
 
# spent 5µs within strict::CORE:match which was called: # once (5µs+0s) by MARC::File::XML::BEGIN@4 at line 6
sub strict::CORE:match; # opcode
# spent 18µs within strict::CORE:regcomp which was called: # once (18µs+0s) by MARC::File::XML::BEGIN@4 at line 6
sub strict::CORE:regcomp; # opcode