Profile of Config.pm

← 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:38 2012

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi/Config.pm
Statements | Executed 37 statements in 2.78ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
7 | 5 | 1 | 82µs | 82µs | Config::::FETCHConfig::FETCH
1 | 1 | 1 | 46µs | 58µs | Config::::BEGIN@9Config::BEGIN@9
1 | 1 | 1 | 45µs | 45µs | Config::::importConfig::import
1 | 1 | 1 | 31µs | 31µs | Config::::TIEHASHConfig::TIEHASH
1 | 1 | 1 | 29µs | 57µs | Config::::BEGIN@10Config::BEGIN@10
1 | 1 | 1 | 28µs | 126µs | Config::::BEGIN@11Config::BEGIN@11
1 | 1 | 1 | 27µs | 77µs | Config::::BEGIN@45Config::BEGIN@45
0 | 0 | 0 | 0s | 0s | Config::::AUTOLOADConfig::AUTOLOAD
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 | 2 | 89µs | 2 | 70µs | # spent 58µs (46+12) within Config::BEGIN@9 which was called: # once (46µs+12µs) by DynaLoader::BEGIN@22 at line 9 use strict; # spent 58µs making 1 call to Config::BEGIN@9 # spent 12µs making 1 call to strict::import
10 | 2 | 94µs | 2 | 86µs | # spent 57µs (29+29) within Config::BEGIN@10 which was called: # once (29µs+29µs) by DynaLoader::BEGIN@22 at line 10 use warnings; # spent 57µs making 1 call to Config::BEGIN@10 # spent 29µs making 1 call to warnings::import
11 | 2 | 632µs | 2 | 225µs | # spent 126µs (28+99) within Config::BEGIN@11 which was called: # once (28µs+99µs) by DynaLoader::BEGIN@22 at line 11 use vars '%Config'; # spent 126µs making 1 call to Config::BEGIN@11 # spent 99µs making 1 call to vars::import
12 |  |  |  |  |
13 |  |  |  |  | # Skip @Config::EXPORT because it only contains %Config, which we special
14 |  |  |  |  | # case below as it's not a function. @Config::EXPORT won't change in the
15 |  |  |  |  | # lifetime of Perl 5.
16 | 1 | 14µs |  |  | my %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1,
17 |  |  |  |  | config_re => 1, compile_date => 1, local_patches => 1,
18 |  |  |  |  | bincompat_options => 1, non_bincompat_options => 1,
19 |  |  |  |  | header_files => 1);
20 |  |  |  |  |
21 | 1 | 4µs |  |  | @Config::EXPORT = qw(%Config);
22 | 1 | 13µs |  |  | @Config::EXPORT_OK = keys %Export_Cache;
23 |  |  |  |  |
24 |  |  |  |  | # Need to stub all the functions to make code such as print Config::config_sh
25 |  |  |  |  | # keep working
26 |  |  |  |  |
27 |  |  |  |  | sub bincompat_options;
28 |  |  |  |  | sub compile_date;
29 |  |  |  |  | sub config_re;
30 |  |  |  |  | sub config_sh;
31 |  |  |  |  | sub config_vars;
32 |  |  |  |  | sub header_files;
33 |  |  |  |  | sub local_patches;
34 |  |  |  |  | sub myconfig;
35 |  |  |  |  | sub non_bincompat_options;
36 |  |  |  |  |
37 |  |  |  |  | # Define our own import method to avoid pulling in the full Exporter:
38 |  |  |  |  | # spent 45µs within Config::import which was called: # once (45µs+0s) by DynaLoader::BEGIN@22 at line 22 of DynaLoader.pm sub import {
39 | 8 | 53µs |  |  | shift;
40 |  |  |  |  | @_ = @Config::EXPORT unless @_;
41 |  |  |  |  |
42 |  |  |  |  | my @funcs = grep $_ ne '%Config', @_;
43 |  |  |  |  | my $export_Config = @funcs < @_ ? 1 : 0;
44 |  |  |  |  |
45 | 2 | 1.48ms | 2 | 126µs | # spent 77µs (27+50) within Config::BEGIN@45 which was called: # once (27µs+50µs) by DynaLoader::BEGIN@22 at line 45 no strict 'refs'; # spent 77µs making 1 call to Config::BEGIN@45 # spent 50µs making 1 call to strict::unimport
46 |  |  |  |  | my $callpkg = caller(0);
47 |  |  |  |  | foreach my $func (@funcs) {
48 |  |  |  |  | die qq{"$func" is not exported by the Config module\n}
49 |  |  |  |  | unless $Export_Cache{$func};
50 |  |  |  |  | *{$callpkg.'::'.$func} = \&{$func};
51 |  |  |  |  | }
52 |  |  |  |  |
53 |  |  |  |  | *{"$callpkg\::Config"} = \%Config if $export_Config;
54 |  |  |  |  | return;
55 |  |  |  |  | }
56 |  |  |  |  |
57 | 1 | 68µs | 1 | 32µs | die "Perl lib version (5.14.1) doesn't match executable '$0' version ($])" # spent 32µs making 1 call to version::(bool
58 |  |  |  |  | unless $^V;
59 |  |  |  |  |
60 | 1 | 49µs | 1 | 20µs | $^V eq 5.14.1 # spent 20µs making 1 call to version::(cmp
61 |  |  |  |  | or die "Perl lib version (5.14.1) doesn't match executable '$0' version (" .
62 |  |  |  |  | sprintf("v%vd",$^V) . ")";
63 |  |  |  |  |
64 |  |  |  |  |
65 |  |  |  |  | # spent 82µs within Config::FETCH which was called 7 times, avg 12µs/call: # 3 times (46µs+0s) by List::MoreUtils::BEGIN@6 at line 40 of DynaLoader.pm, avg 15µs/call # once (10µs+0s) by List::MoreUtils::BEGIN@6 at line 60 of DynaLoader.pm # once (9µs+0s) by List::MoreUtils::BEGIN@6 at line 63 of DynaLoader.pm # once (9µs+0s) by List::MoreUtils::BEGIN@6 at line 64 of DynaLoader.pm # once (8µs+0s) by List::MoreUtils::BEGIN@6 at line 65 of DynaLoader.pm sub FETCH {
66 | 14 | 138µs |  |  | my($self, $key) = @_;
67 |  |  |  |  |
68 |  |  |  |  | # check for cached value (which may be undef so we use exists not defined)
69 |  |  |  |  | return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
70 |  |  |  |  | }
71 |  |  |  |  |
72 |  |  |  |  | # spent 31µs within Config::TIEHASH which was called: # once (31µs+0s) by DynaLoader::BEGIN@22 at line 85 sub TIEHASH {
73 | 1 | 38µs |  |  | bless $_[1], $_[0];
74 |  |  |  |  | }
75 |  |  |  |  |
76 |  |  |  |  | sub DESTROY { }
77 |  |  |  |  |
78 |  |  |  |  | sub AUTOLOAD {
79 |  |  |  |  | require 'Config_heavy.pl';
80 |  |  |  |  | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
81 |  |  |  |  | die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
82 |  |  |  |  | }
83 |  |  |  |  |
84 |  |  |  |  | # tie returns the object, so the value returned to require will be true.
85 | 1 | 110µs | 1 | 31µs | tie %Config, 'Config', { # spent 31µs making 1 call to Config::TIEHASH
86 |  |  |  |  | archlibexp => '/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi',
87 |  |  |  |  | archname => 'x86_64-linux-thread-multi',
88 |  |  |  |  | cc => 'cc',
89 |  |  |  |  | d_readlink => 'define',
90 |  |  |  |  | d_symlink => 'define',
91 |  |  |  |  | dlext => 'so',
92 |  |  |  |  | dlsrc => 'dl_dlopen.xs',
93 |  |  |  |  | dont_use_nlink => undef,
94 |  |  |  |  | exe_ext => '',
95 |  |  |  |  | inc_version_list => ' ',
96 |  |  |  |  | intsize => '4',
97 |  |  |  |  | ldlibpthname => 'LD_LIBRARY_PATH',
98 |  |  |  |  | libpth => '/usr/local/lib /lib /usr/lib /usr/lib/x86_64-linux-gnu /lib64 /usr/lib64',
99 |  |  |  |  | osname => 'linux',
100 |  |  |  |  | osvers => '3.0.0-1-amd64',
101 |  |  |  |  | path_sep => ':',
102 |  |  |  |  | privlibexp => '/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1',
103 |  |  |  |  | scriptdir => '/home/ss5/perl5/perlbrew/perls/perl-5.14.1/bin',
104 |  |  |  |  | sitearchexp => '/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/x86_64-linux-thread-multi',
105 |  |  |  |  | sitelibexp => '/home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1',
106 |  |  |  |  | so => 'so',
107 |  |  |  |  | useithreads => 'define',
108 |  |  |  |  | usevendorprefix => undef,
109 |  |  |  |  | version => '5.14.1',
110 |  |  |  |  | };