Profile of /usr/local/lib/perl5/5.10.1/darwin-2level/Config.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 01.HTTP.t
Run on Tue May 4 15:25:55 2010
Reported on Tue May 4 15:26:15 2010

File | /usr/local/lib/perl5/5.10.1/darwin-2level/Config.pm
Statements Executed | 87
Statement Execution Time | 952µs

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 1.16ms | 1.26ms | Config::::AUTOLOADConfig::AUTOLOAD
5 | 5 | 5 | 94µs | 94µs | Config::::importConfig::import
14 | 11 | 5 | 66µs | 1.42ms | Config::::FETCHConfig::FETCH
1 | 1 | 2 | 36µs | 36µs | Config::::CORE:substConfig::CORE:subst (opcode)
1 | 1 | 2 | 22µs | 22µs | Config::::CORE:packConfig::CORE:pack (opcode)
2 | 1 | 2 | 20µs | 20µs | Config::::CORE:substcontConfig::CORE:substcont (opcode)
1 | 1 | 1 | 18µs | 21µs | Config::::BEGIN@9Config::BEGIN@9
1 | 1 | 1 | 10µs | 10µs | Config::::TIEHASHConfig::TIEHASH
1 | 1 | 2 | 10µs | 10µs | Config::::CORE:unpackConfig::CORE:unpack (opcode)
1 | 1 | 1 | 9µs | 31µs | Config::::BEGIN@35Config::BEGIN@35
1 | 1 | 2 | 2µs | 2µs | Config::::CORE:matchConfig::CORE:match (opcode)
0 | 0 | 0 | 0s | 0s | Config::::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 |  |  |  |  |
8 |  |  |  |  | package Config;
9 | 3 | 133µs | 2 | 25µs | # spent 21µs (18+4) within Config::BEGIN@9 which was called # once (18µs+4µs) by Test::Builder::BEGIN@19 at line 9 use strict; # spent 21µs making 1 call to Config::BEGIN@9 # spent 4µs making 1 call to strict::import
10 |  |  |  |  | # use warnings; Pulls in Carp
11 |  |  |  |  | # use vars pulls in Carp
12 | 1 | 2µs |  |  | @Config::EXPORT = qw(%Config);
13 | 1 | 1µ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 |  |  |  |  |
18 |  |  |  |  | sub myconfig;
19 |  |  |  |  | sub config_sh;
20 |  |  |  |  | sub config_vars;
21 |  |  |  |  | sub config_re;
22 |  |  |  |  |
23 | 1 | 8µs |  |  | my %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
24 |  |  |  |  |
25 | 1 | 100ns |  |  | our %Config;
26 |  |  |  |  |
27 |  |  |  |  | # Define our own import method to avoid pulling in the full Exporter:
28 |  |  |  |  | # spent 94µs within Config::import which was called 5 times, avg 19µs/call: # once (27µs+0s) by Errno::BEGIN@8 at line 8 of Errno.pm # once (21µs+0s) by lib::BEGIN@6 at line 6 of lib.pm # once (16µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm # once (16µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm # once (15µs+0s) by Test::Builder::BEGIN@19 at line 19 of Test/Builder.pm sub import {
29 | 40 | 120µs |  |  | my $pkg = shift;
30 |  |  |  |  | @_ = @Config::EXPORT unless @_;
31 |  |  |  |  |
32 |  |  |  |  | my @funcs = grep $_ ne '%Config', @_;
33 |  |  |  |  | my $export_Config = @funcs < @_ ? 1 : 0;
34 |  |  |  |  |
35 | 3 | 361µs | 2 | 52µs | # spent 31µs (9+22) within Config::BEGIN@35 which was called # once (9µs+22µs) by Test::Builder::BEGIN@19 at line 35 no strict 'refs'; # spent 31µs making 1 call to Config::BEGIN@35 # spent 22µs making 1 call to strict::unimport
36 |  |  |  |  | my $callpkg = caller(0);
37 |  |  |  |  | foreach my $func (@funcs) {
38 |  |  |  |  | die sprintf qq{"%s" is not exported by the %s module\n},
39 |  |  |  |  | $func, __PACKAGE__ unless $Export_Cache{$func};
40 |  |  |  |  | *{$callpkg.'::'.$func} = \&{$func};
41 |  |  |  |  | }
42 |  |  |  |  |
43 |  |  |  |  | *{"$callpkg\::Config"} = \%Config if $export_Config;
44 |  |  |  |  | return;
45 |  |  |  |  | }
46 |  |  |  |  |
47 | 1 | 26µs | 1 | 11µs | die "Perl lib version (5.10.1) doesn't match executable version ($])" # spent 11µs making 1 call to version::(bool
48 |  |  |  |  | unless $^V;
49 |  |  |  |  |
50 | 1 | 23µs | 1 | 12µs | $^V eq 5.10.1 # spent 12µs making 1 call to version::(cmp
51 |  |  |  |  | or die "Perl lib version (5.10.1) doesn't match executable version (" .
52 |  |  |  |  | sprintf("v%vd",$^V) . ")";
53 |  |  |  |  |
54 |  |  |  |  |
55 |  |  |  |  | # spent 1.42ms (66µs+1.35) within Config::FETCH which was called 14 times, avg 101µs/call: # 3 times (24µs+1.32ms) by base::import at line 43 of DynaLoader.pm, avg 448µs/call # 2 times (9µs+0s) by LWP::Protocol::http::BEGIN@216 at line 11 of Errno.pm, avg 5µs/call # once (11µs+30µs) by LWP::UserAgent::BEGIN@12 at line 38 of Time/Local.pm # once (5µs+0s) by main::BEGIN@2 at line 10 of lib.pm # once (4µs+0s) by Test::Builder::BEGIN@18 at line 22 of Test/Builder.pm # once (3µs+0s) by main::BEGIN@2 at line 11 of lib.pm # once (3µs+0s) by main::BEGIN@2 at line 12 of lib.pm # once (2µs+0s) by base::import at line 65 of DynaLoader.pm # once (2µs+0s) by base::import at line 70 of DynaLoader.pm # once (2µs+0s) by base::import at line 68 of DynaLoader.pm # once (1µs+0s) by base::import at line 69 of DynaLoader.pm sub FETCH {
56 | 31 | 139µs |  |  | my($self, $key) = @_;
57 |  |  |  |  |
58 |  |  |  |  | # check for cached value (which may be undef so we use exists not defined)
59 |  |  |  |  | return $self->{$key} if exists $self->{$key};
60 |  |  |  |  |
61 |  |  |  |  | return $self->fetch_string($key); # spent 1.26ms making 1 call to Config::AUTOLOAD # spent 56µs making 2 calls to Config::fetch_string, avg 28µs/call
62 |  |  |  |  | }
63 |  |  |  |  | # spent 10µs within Config::TIEHASH which was called # once (10µs+0s) by Test::Builder::BEGIN@19 at line 76 sub TIEHASH {
64 | 1 | 13µs |  |  | bless $_[1], $_[0];
65 |  |  |  |  | }
66 |  |  |  |  |
67 |  |  |  |  | sub DESTROY { }
68 |  |  |  |  |
69 |  |  |  |  | # spent 1.26ms (1.16+104µs) within Config::AUTOLOAD which was called # once (1.16ms+104µs) by Config::FETCH at line 61 sub AUTOLOAD {
70 | 2 | 73µs |  |  | require 'Config_heavy.pl';
71 |  |  |  |  | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 10µs making 1 call to Config::launcher # spent 2µs making 1 call to Config::CORE:match
72 |  |  |  |  | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
73 |  |  |  |  | }
74 |  |  |  |  |
75 |  |  |  |  | # tie returns the object, so the value returned to require will be true.
76 | 1 | 53µs | 1 | 10µs | tie %Config, 'Config', { # spent 10µs making 1 call to Config::TIEHASH
77 |  |  |  |  | archlibexp => '/usr/local/lib/perl5/5.10.1/darwin-2level',
78 |  |  |  |  | archname => 'darwin-2level',
79 |  |  |  |  | cc => 'cc',
80 |  |  |  |  | d_readlink => 'define',
81 |  |  |  |  | d_symlink => 'define',
82 |  |  |  |  | dlsrc => 'dl_dlopen.xs',
83 |  |  |  |  | dont_use_nlink => undef,
84 |  |  |  |  | exe_ext => '',
85 |  |  |  |  | inc_version_list => ' ',
86 |  |  |  |  | intsize => '4',
87 |  |  |  |  | ldlibpthname => 'DYLD_LIBRARY_PATH',
88 |  |  |  |  | libpth => '/usr/local/lib /usr/lib',
89 |  |  |  |  | osname => 'darwin',
90 |  |  |  |  | osvers => '10.2.0',
91 |  |  |  |  | path_sep => ':',
92 |  |  |  |  | privlibexp => '/usr/local/lib/perl5/5.10.1',
93 |  |  |  |  | scriptdir => '/usr/local/bin',
94 |  |  |  |  | sitearchexp => '/usr/local/lib/perl5/site_perl/5.10.1/darwin-2level',
95 |  |  |  |  | sitelibexp => '/usr/local/lib/perl5/site_perl/5.10.1',
96 |  |  |  |  | useithreads => undef,
97 |  |  |  |  | usevendorprefix => undef,
98 |  |  |  |  | version => '5.10.1',
99 |  |  |  |  | };
|  |  |  |  | # spent 2µs within Config::CORE:match which was called # once (2µs+0s) by Config::AUTOLOAD at line 71 of Config.pm sub Config::CORE:match; # xsub
|  |  |  |  | # spent 22µs within Config::CORE:pack which was called # once (22µs+0s) by Config::AUTOLOAD at line 1170 of Config_heavy.pl sub Config::CORE:pack; # xsub
|  |  |  |  | # spent 36µs within Config::CORE:subst which was called # once (36µs+0s) by Config::AUTOLOAD at line 1171 of Config_heavy.pl sub Config::CORE:subst; # xsub
|  |  |  |  | # spent 20µs within Config::CORE:substcont which was called 2 times, avg 10µs/call: # 2 times (20µs+0s) by Config::AUTOLOAD at line 1171 of Config_heavy.pl, avg 10µs/call sub Config::CORE:substcont; # xsub
|  |  |  |  | # spent 10µs within Config::CORE:unpack which was called # once (10µs+0s) by Config::AUTOLOAD at line 1170 of Config_heavy.pl sub Config::CORE:unpack; # xsub