← Index
NYTProf Performance Profile   « block view • line view • sub view »
For reply.pl
  Run on Thu Oct 21 22:40:13 2010
Reported on Thu Oct 21 22:44:39 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/x86_64-linux/Config.pm
StatementsExecuted 51 statements in 699µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.70ms1.79msConfig::::AUTOLOADConfig::AUTOLOAD
97380µs2.05msConfig::::FETCHConfig::FETCH
22246µs46µsConfig::::importConfig::import
11125µs30µsConfig::::BEGIN@9Config::BEGIN@9
11110µs33µsConfig::::BEGIN@38Config::BEGIN@38
1116µs6µsConfig::::TIEHASHConfig::TIEHASH
0000s0sConfig::::DESTROYConfig::DESTROY
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# This file was created by configpm when Perl was built. Any changes
2# made to this file will be lost the next time perl is built.
3
4# for a description of the variables, please have a look at the
5# Glossary file, as written in the Porting folder, or use the url:
6# http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary
7
8package Config;
92120µs236µs
# spent 30µs (25+5) within Config::BEGIN@9 which was called: # once (25µs+5µs) by Tie::RefHash::BEGIN@99 at line 9
use strict;
# spent 30µs making 1 call to Config::BEGIN@9 # spent 5µs making 1 call to strict::import
10# use warnings; Pulls in Carp
11# use vars pulls in Carp
1212µs@Config::EXPORT = qw(%Config);
1312µs@Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re);
14
15# Need to stub all the functions to make code such as print Config::config_sh
16# keep working
17
18sub myconfig;
19sub config_sh;
20sub config_vars;
21sub config_re;
22
23# Skip @Config::EXPORT because it only contains %Config, which we special
24# case below as it's not a function. @Config::EXPORT won't change in the
25# lifetime of Perl 5.
2616µsmy %Export_Cache = map {($_ => 1)} @Config::EXPORT_OK;
27
2811µsour %Config;
29
30# Define our own import method to avoid pulling in the full Exporter:
31
# spent 46µs within Config::import which was called 2 times, avg 23µs/call: # once (24µs+0s) by Fatal::BEGIN@8 at line 8 of Fatal.pm # once (21µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm
sub import {
321650µs shift;
33 @_ = @Config::EXPORT unless @_;
34
35 my @funcs = grep $_ ne '%Config', @_;
36 my $export_Config = @funcs < @_ ? 1 : 0;
37
382279µs255µs
# spent 33µs (10+22) within Config::BEGIN@38 which was called: # once (10µs+22µs) by Tie::RefHash::BEGIN@99 at line 38
no strict 'refs';
# spent 33µs making 1 call to Config::BEGIN@38 # spent 22µs making 1 call to strict::unimport
39 my $callpkg = caller(0);
40 foreach my $func (@funcs) {
41 die qq{"$func" is not exported by the Config module\n}
42 unless $Export_Cache{$func};
43 *{$callpkg.'::'.$func} = \&{$func};
44 }
45
46 *{"$callpkg\::Config"} = \%Config if $export_Config;
47 return;
48}
49
50114µs16µsdie "Perl lib version (5.13.5) doesn't match executable '$0' version ($])"
# spent 6µs making 1 call to version::(bool
51 unless $^V;
52
53113µs16µs$^V eq 5.13.5
# spent 6µs making 1 call to version::(cmp
54 or die "Perl lib version (5.13.5) doesn't match executable '$0' version (" .
55 sprintf("v%vd",$^V) . ")";
56
57
58
# spent 2.05ms (80µs+1.97) within Config::FETCH which was called 9 times, avg 227µs/call: # 3 times (27µs+118µs) by base::import at line 43 of DynaLoader.pm, avg 48µs/call # once (24µs+1.85ms) by Tie::RefHash::BEGIN@96 at line 100 of Tie/RefHash.pm # once (11µs+0s) by autodie::BEGIN@6 at line 58 of Fatal.pm # once (5µs+0s) by base::import at line 63 of DynaLoader.pm # once (4µs+0s) by base::import at line 68 of DynaLoader.pm # once (4µs+0s) by base::import at line 67 of DynaLoader.pm # once (4µs+0s) by base::import at line 66 of DynaLoader.pm
sub FETCH {
592177µs my($self, $key) = @_;
60
61 # check for cached value (which may be undef so we use exists not defined)
62 return $self->{$key} if exists $self->{$key};
63
6431.91ms return $self->fetch_string($key);
# spent 1.79ms making 1 call to Config::AUTOLOAD # spent 118µs making 2 calls to Config::fetch_string, avg 59µs/call
65}
66
# spent 6µs within Config::TIEHASH which was called: # once (6µs+0s) by Tie::RefHash::BEGIN@99 at line 79
sub TIEHASH {
67111µs bless $_[1], $_[0];
68}
69
70sub DESTROY { }
71
72
# spent 1.79ms (1.70+90µs) within Config::AUTOLOAD which was called: # once (1.70ms+90µs) by Config::FETCH at line 64
sub AUTOLOAD {
73299µs require 'Config_heavy.pl';
74210µs goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 8µs making 1 call to Config::launcher # spent 2µs making 1 call to Config::CORE:match
75 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
76}
77
78# tie returns the object, so the value returned to require will be true.
79126µs16µstie %Config, 'Config', {
# spent 6µs making 1 call to Config::TIEHASH
80 archlibexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/x86_64-linux',
81 archname => 'x86_64-linux',
82 cc => 'cc',
83 d_readlink => 'define',
84 d_symlink => 'define',
85 dlsrc => 'dl_dlopen.xs',
86 dont_use_nlink => undef,
87 exe_ext => '',
88 inc_version_list => '',
89 intsize => '4',
90 ldlibpthname => 'LD_LIBRARY_PATH',
91 libpth => '/usr/local/lib /lib /usr/lib /lib64 /usr/lib64',
92 osname => 'linux',
93 osvers => '2.6.32-5-amd64',
94 path_sep => ':',
95 privlibexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5',
96 scriptdir => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/bin',
97 sitearchexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux',
98 sitelibexp => '/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5',
99 useithreads => undef,
100 usevendorprefix => undef,
101 version => '5.13.5',
102};