← 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:22 2010

Filename/usr/share/perl/5.10/vars.pm
StatementsExecuted 423 statements in 3.30ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
3434191.90ms2.35msvars::::importvars::import
20731446µs446µsvars::::CORE:matchvars::CORE:match (opcode)
111358µs526µsvars::::BEGIN@7vars::BEGIN@7
11156µs56µsvars::::BEGIN@3vars::BEGIN@3
11112µs38µ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
73383µs2694µs
# spent 526µs (358+168) within vars::BEGIN@7 which was called: # once (358µs+168µs) by MARC::File::XML::BEGIN@5 at line 7
use warnings::register;
# spent 526µs making 1 call to vars::BEGIN@7 # spent 168µs making 1 call to warnings::register::import
83379µs264µs
# spent 38µs (12+26) within vars::BEGIN@8 which was called: # once (12µs+26µs) by MARC::File::XML::BEGIN@5 at line 8
use strict qw(vars subs);
# spent 38µs making 1 call to vars::BEGIN@8 # spent 26µs making 1 call to strict::import
9
10
# spent 2.35ms (1.90+446µs) within vars::import which was called 34 times, avg 69µs/call: # once (300µs+87µs) by XML::LibXML::BEGIN@14 at line 14 of XML/LibXML.pm # once (121µs+26µs) by POSIX::SigRt::BEGIN@66 at line 66 of POSIX.pm # once (92µs+22µs) by XML::LibXML::Error::BEGIN@12 at line 12 of XML/LibXML/Error.pm # once (85µs+27µs) by XML::LibXML::BEGIN@35 at line 35 of XML/LibXML.pm # once (86µs+18µs) by XML::LibXML::XPathContext::BEGIN@13 at line 13 of XML/LibXML/XPathContext.pm # once (83µs+19µs) by XML::LibXML::InputCallback::BEGIN@2077 at line 2077 of XML/LibXML.pm # once (80µs+17µs) by MARC::Record::BEGIN@27 at line 27 of MARC/Record.pm # once (71µs+23µs) by Storable::BEGIN@24 at line 24 of Storable.pm # once (68µs+12µs) by MARC::File::XML::BEGIN@5 at line 5 of lib/MARC/File/XML.pm # once (57µs+14µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (51µs+15µs) by constant::BEGIN@6 at line 6 of constant.pm # once (50µs+12µs) by XML::SAX::Exception::BEGIN@8 at line 8 of XML/SAX/Exception.pm # once (43µs+10µs) by XML::LibXML::Document::BEGIN@1359 at line 1359 of XML/LibXML.pm # once (43µs+6µs) by XML::LibXML::Dtd::BEGIN@1754 at line 1754 of XML/LibXML.pm # once (38µs+7µs) by XML::LibXML::Text::BEGIN@1663 at line 1663 of XML/LibXML.pm # once (37µs+8µs) by MARC::File::USMARC::BEGIN@12 at line 12 of MARC/File/USMARC.pm # once (36µs+8µs) by XML::LibXML::DocumentFragment::BEGIN@1455 at line 1455 of XML/LibXML.pm # once (36µs+7µs) by XML::LibXML::Element::BEGIN@1478 at line 1478 of XML/LibXML.pm # once (34µs+8µs) by XML::LibXML::PI::BEGIN@1765 at line 1765 of XML/LibXML.pm # once (35µs+7µs) by XML::LibXML::Literal::BEGIN@15 at line 15 of XML/LibXML/Literal.pm # once (35µs+7µs) by MARC::Record::BEGIN@12 at line 12 of MARC/Record.pm # once (36µs+6µs) by MARC::File::USMARC::BEGIN@16 at line 16 of MARC/File/USMARC.pm # once (34µs+7µs) by XML::LibXML::Comment::BEGIN@1716 at line 1716 of XML/LibXML.pm # once (34µs+7µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm # once (34µs+7µs) by XML::LibXML::Number::BEGIN@15 at line 15 of XML/LibXML/Number.pm # once (33µs+7µs) by XML::LibXML::Attr::BEGIN@1732 at line 1732 of XML/LibXML.pm # once (33µs+7µs) by XML::LibXML::NodeList::BEGIN@16 at line 16 of XML/LibXML/NodeList.pm # once (32µs+7µs) by XML::LibXML::Boolean::BEGIN@16 at line 16 of XML/LibXML/Boolean.pm # once (33µs+6µs) by MARC::File::BEGIN@12 at line 12 of MARC/File.pm # once (30µs+7µs) by base::BEGIN@4 at line 4 of base.pm # once (32µs+5µs) by XML::LibXML::CDATASection::BEGIN@1723 at line 1723 of XML/LibXML.pm # once (30µs+7µs) by MARC::Record::BEGIN@32 at line 32 of MARC/Record.pm # once (29µs+7µs) by MARC::Field::BEGIN@10 at line 10 of MARC/Field.pm # once (30µs+6µs) by MARC::Record::BEGIN@23 at line 23 of MARC/Record.pm
sub import {
113456µs my $callpack = caller;
123488µs my ($pack, @imports) = @_;
133441µs my ($sym, $ch);
1434259µs foreach (@imports) {
1569862µs69244µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 244µs making 69 calls to vars::CORE:match, avg 4µs/call
1669342µs69110µs if ($sym =~ /\W/) {
# spent 110µs making 69 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 }
2869357µs6992µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 92µs making 69 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
3569431µ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 446µs within vars::CORE:match which was called 207 times, avg 2µs/call: # 69 times (244µs+0s) by vars::import at line 15, avg 4µs/call # 69 times (110µs+0s) by vars::import at line 16, avg 2µs/call # 69 times (92µs+0s) by vars::import at line 28, avg 1µs/call
sub vars::CORE:match; # opcode