← Index
NYTProf Performance Profile   « block view • line view • sub view »
For conv.pl
  Run on Sun Nov 14 21:14:18 2010
Reported on Sun Nov 14 21:17:53 2010

Filename/usr/share/perl/5.10/vars.pm
StatementsExecuted 291 statements in 2.50ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
2424191.32ms1.62msvars::::importvars::import
111340µs511µsvars::::BEGIN@7vars::BEGIN@7
13831301µs301µsvars::::CORE:matchvars::CORE:match (opcode)
11156µs56µsvars::::BEGIN@3vars::BEGIN@3
11114µs42µsvars::::BEGIN@8vars::BEGIN@8
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package vars;
2
3392µs156µs
# spent 56µs within vars::BEGIN@3 which was called: # once (56µs+0s) by MARC::File::XML::BEGIN@5 at line 3
use 5.006;
# spent 56µs making 1 call to vars::BEGIN@3
4
511µsour $VERSION = '1.01';
6
73365µs2682µs
# spent 511µs (340+171) within vars::BEGIN@7 which was called: # once (340µs+171µs) by MARC::File::XML::BEGIN@5 at line 7
use warnings::register;
# spent 511µs making 1 call to vars::BEGIN@7 # spent 171µs making 1 call to warnings::register::import
83371µs270µs
# spent 42µs (14+28) within vars::BEGIN@8 which was called: # once (14µs+28µs) by MARC::File::XML::BEGIN@5 at line 8
use strict qw(vars subs);
# spent 42µs making 1 call to vars::BEGIN@8 # spent 28µs making 1 call to strict::import
9
10
# spent 1.62ms (1.32+301µs) within vars::import which was called 24 times, avg 68µs/call: # once (158µs+33µs) by XML::Parser::Expat::BEGIN@6 at line 6 of XML/Parser/Expat.pm # once (121µs+31µs) by POSIX::SigRt::BEGIN@66 at line 66 of POSIX.pm # once (77µs+20µs) by XML::NamespaceSupport::BEGIN@18 at line 18 of XML/NamespaceSupport.pm # once (76µs+19µs) by XML::SAX::BEGIN@6 at line 6 of XML/SAX.pm # once (73µs+19µs) by Storable::BEGIN@24 at line 24 of Storable.pm # once (71µs+19µs) by MARC::Record::BEGIN@27 at line 27 of MARC/Record.pm # once (68µs+15µs) by MARC::File::XML::BEGIN@5 at line 5 of MARC/File/XML.pm # once (57µs+13µs) by XML::SAX::Exception::BEGIN@8 at line 8 of XML/SAX/Exception.pm # once (55µs+12µs) by constant::BEGIN@6 at line 6 of constant.pm # once (54µs+13µs) by XML::Parser::BEGIN@22 at line 22 of XML/Parser.pm # once (53µs+12µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (54µs+9µs) by MARC::File::USMARC::BEGIN@12 at line 12 of MARC/File/USMARC.pm # once (38µs+9µs) by XML::Parser::ExpatNB::BEGIN@587 at line 587 of XML/Parser/Expat.pm # once (38µs+7µs) by MARC::File::USMARC::BEGIN@16 at line 16 of MARC/File/USMARC.pm # once (36µs+7µs) by XML::SAX::ParserFactory::BEGIN@6 at line 6 of XML/SAX/ParserFactory.pm # once (34µs+8µs) by XML::SAX::Expat::BEGIN@13 at line 13 of XML/SAX/Expat.pm # once (35µs+7µs) by XML::SAX::Base::BEGIN@29 at line 29 of XML/SAX/Base.pm # once (33µs+7µs) by MARC::Field::BEGIN@10 at line 10 of MARC/Field.pm # once (33µs+7µs) by MARC::Record::BEGIN@23 at line 23 of MARC/Record.pm # once (31µs+8µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm # once (32µs+7µs) by MARC::Record::BEGIN@12 at line 12 of MARC/Record.pm # once (31µs+6µs) by base::BEGIN@4 at line 4 of base.pm # once (30µs+7µs) by MARC::Record::BEGIN@32 at line 32 of MARC/Record.pm # once (31µs+6µs) by MARC::File::BEGIN@12 at line 12 of MARC/File.pm
sub import {
112445µs my $callpack = caller;
122461µs my ($pack, @imports) = @_;
132427µs my ($sym, $ch);
1424176µs foreach (@imports) {
1546584µs46164µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 164µs making 46 calls to vars::CORE:match, avg 4µs/call
1646237µs4674µs if ($sym =~ /\W/) {
# spent 74µs making 46 calls to vars::CORE:match, avg 2µs/call
17 # time for a more-detailed check-up
18 if ($sym =~ /^\w+[[{].*[]}]$/) {
19 require Carp;
20 Carp::croak("Can't declare individual elements of hash or array");
21 } elsif (warnings::enabled() and length($sym) == 1 and $sym !~ tr/a-zA-Z//) {
22 warnings::warn("No need to declare built-in vars");
23 } elsif (($^H &= strict::bits('vars'))) {
24 require Carp;
25 Carp::croak("'$_' is not a valid variable name under strict vars");
26 }
27 }
2846246µs4663µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 63µs making 46 calls to vars::CORE:match, avg 1µs/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
3546292µs : do {
36 require Carp;
37 Carp::croak("'$_' is not a valid variable name");
38 });
39 } else {
40 require Carp;
41 Carp::croak("'$_' is not a valid variable name");
42 }
43 }
44};
45
4614µs1;
47__END__
 
# spent 301µs within vars::CORE:match which was called 138 times, avg 2µs/call: # 46 times (164µs+0s) by vars::import at line 15, avg 4µs/call # 46 times (74µs+0s) by vars::import at line 16, avg 2µs/call # 46 times (63µs+0s) by vars::import at line 28, avg 1µs/call
sub vars::CORE:match; # opcode