← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/dpath
  Run on Tue Jun 5 15:31:33 2012
Reported on Tue Jun 5 15:31:37 2012

Filename/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/vars.pm
StatementsExecuted 180 statements in 4.66ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1313131.72ms2.22msvars::::importvars::import
111780µs1.20msvars::::BEGIN@7vars::BEGIN@7
9031502µs502µsvars::::CORE:matchvars::CORE:match (opcode)
11172µs72µsvars::::BEGIN@3vars::BEGIN@3
11127µs75µ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
32218µs172µs
# spent 72µs within vars::BEGIN@3 which was called: # once (72µs+0s) by Attribute::Handlers::BEGIN@6 at line 3
use 5.006;
# spent 72µs making 1 call to vars::BEGIN@3
4
513µsour $VERSION = '1.02';
6
72848µs21.62ms
# spent 1.20ms (780µs+418µs) within vars::BEGIN@7 which was called: # once (780µs+418µs) by Attribute::Handlers::BEGIN@6 at line 7
use warnings::register;
# spent 1.20ms making 1 call to vars::BEGIN@7 # spent 418µs making 1 call to warnings::register::import
821.27ms2122µs
# spent 75µs (27+48) within vars::BEGIN@8 which was called: # once (27µs+48µs) by Attribute::Handlers::BEGIN@6 at line 8
use strict qw(vars subs);
# spent 75µs making 1 call to vars::BEGIN@8 # spent 48µs making 1 call to strict::import
9
10
# spent 2.22ms (1.72+502µs) within vars::import which was called 13 times, avg 171µs/call: # once (237µs+66µs) by POSIX::SigRt::BEGIN@60 at line 60 of POSIX.pm # once (198µs+57µs) by Params::Util::BEGIN@65 at line 65 of Params/Util.pm # once (191µs+55µs) by List::MoreUtils::BEGIN@8 at line 8 of List/MoreUtils.pm # once (146µs+46µs) by Iterator::Util::BEGIN@21 at line 21 of Iterator/Util.pm # once (149µs+42µs) by Text::Balanced::BEGIN@11 at line 11 of Text/Balanced.pm # once (139µs+36µs) by Attribute::Handlers::BEGIN@6 at line 6 of Attribute/Handlers.pm # once (125µs+38µs) by File::Spec::BEGIN@4 at line 4 of File/Spec.pm # once (132µs+21µs) by File::Spec::Unix::BEGIN@4 at line 4 of File/Spec/Unix.pm # once (108µs+36µs) by constant::BEGIN@6 at line 6 of constant.pm # once (73µs+29µs) by SelfLoader::BEGIN@9 at line 9 of SelfLoader.pm # once (75µs+25µs) by Class::Data::Inheritable::BEGIN@4 at line 4 of Class/Data/Inheritable.pm # once (73µs+26µs) by base::BEGIN@4 at line 4 of base.pm # once (74µs+25µs) by Config::BEGIN@11 at line 11 of Config.pm
sub import {
111722.31ms my $callpack = caller;
12 my (undef, @imports) = @_;
13 my ($sym, $ch);
14 foreach (@imports) {
1530335µs if (($ch, $sym) = /^([\$\@\%\*\&])(.+)/) {
# spent 335µs making 30 calls to vars::CORE:match, avg 11µs/call
163085µs if ($sym =~ /\W/) {
# spent 85µs making 30 calls to vars::CORE:match, avg 3µ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 }
283082µs $sym = "${callpack}::$sym" unless $sym =~ /::/;
# spent 82µs making 30 calls to vars::CORE:match, avg 3µs/call
29 *$sym =
30 ( $ch eq "\$" ? \$$sym
31 : $ch eq "\@" ? \@$sym
32 : $ch eq "\%" ? \%$sym
33 : $ch eq "\*" ? \*$sym
34 : $ch eq "\&" ? \&$sym
35 : 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
46112µs1;
47__END__
 
# spent 502µs within vars::CORE:match which was called 90 times, avg 6µs/call: # 30 times (335µs+0s) by vars::import at line 15, avg 11µs/call # 30 times (85µs+0s) by vars::import at line 16, avg 3µs/call # 30 times (82µs+0s) by vars::import at line 28, avg 3µs/call
sub vars::CORE:match; # opcode