← Index
NYTProf Performance Profile   « block view • line view • sub view »
For /usr/local/src/github.com/foswiki/core/bin/view
  Run on Sun Dec 4 17:17:59 2011
Reported on Sun Dec 4 17:27:01 2011

Filename/usr/lib/perl/5.14/Config.pm
StatementsExecuted 60 statements in 1.13ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
333104µs104µsConfig::::importConfig::import
97262µs62µsConfig::::FETCHConfig::FETCH
11124µs31µsConfig::::BEGIN@9Config::BEGIN@9
11118µs38µsConfig::::BEGIN@10Config::BEGIN@10
11117µs61µsConfig::::BEGIN@11Config::BEGIN@11
11115µs46µsConfig::::BEGIN@45Config::BEGIN@45
1119µs9µsConfig::::TIEHASHConfig::TIEHASH
0000s0sConfig::::AUTOLOADConfig::AUTOLOAD
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;
9244µs239µs
# spent 31µs (24+8) within Config::BEGIN@9 which was called: # once (24µs+8µs) by main::BEGIN@8 at line 9
use strict;
# spent 31µs making 1 call to Config::BEGIN@9 # spent 8µs making 1 call to strict::import
10246µs257µs
# spent 38µs (18+20) within Config::BEGIN@10 which was called: # once (18µs+20µs) by main::BEGIN@8 at line 10
use warnings;
# spent 38µs making 1 call to Config::BEGIN@10 # spent 20µs making 1 call to warnings::import
112232µs2105µs
# spent 61µs (17+44) within Config::BEGIN@11 which was called: # once (17µs+44µs) by main::BEGIN@8 at line 11
use vars '%Config';
# spent 61µs making 1 call to Config::BEGIN@11 # spent 44µ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.
1616µsmy %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
2112µs@Config::EXPORT = qw(%Config);
2215µ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
27sub bincompat_options;
28sub compile_date;
29sub config_re;
30sub config_sh;
31sub config_vars;
32sub header_files;
33sub local_patches;
34sub myconfig;
35sub non_bincompat_options;
36
37# Define our own import method to avoid pulling in the full Exporter:
38
# spent 104µs within Config::import which was called 3 times, avg 35µs/call: # once (39µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm # once (33µs+0s) by File::Copy::BEGIN@14 at line 14 of File/Copy.pm # once (32µs+0s) by DynaLoader::BEGIN@21 at line 21 of DynaLoader.pm
sub import {
3935µs shift;
40313µs @_ = @Config::EXPORT unless @_;
41
42312µs my @funcs = grep $_ ne '%Config', @_;
4338µs my $export_Config = @funcs < @_ ? 1 : 0;
44
452483µs276µs
# spent 46µs (15+30) within Config::BEGIN@45 which was called: # once (15µs+30µs) by main::BEGIN@8 at line 45
no strict 'refs';
# spent 46µs making 1 call to Config::BEGIN@45 # spent 30µs making 1 call to strict::unimport
4638µs my $callpkg = caller(0);
47312µs 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
53627µs *{"$callpkg\::Config"} = \%Config if $export_Config;
54328µs return;
55}
56
57127µs110µsdie "Perl lib version (5.14.2) doesn't match executable '$0' version ($])"
# spent 10µs making 1 call to version::(bool
58 unless $^V;
59
60120µs110µs$^V eq 5.14.2
# spent 10µs making 1 call to version::(cmp
61 or die "Perl lib version (5.14.2) doesn't match executable '$0' version (" .
62 sprintf("v%vd",$^V) . ")";
63
64
# spent 62µs within Config::FETCH which was called 9 times, avg 7µs/call: # 3 times (23µs+0s) by Foswiki::Users::HtPasswdUser::BEGIN@2 at line 39 of DynaLoader.pm, avg 8µs/call # once (8µs+0s) by main::BEGIN@8 at line 43 of setlib.cfg # once (6µs+0s) by Foswiki::Users::HtPasswdUser::BEGIN@2 at line 58 of DynaLoader.pm # once (6µs+0s) by Foswiki::Users::HtPasswdUser::BEGIN@2 at line 60 of DynaLoader.pm # once (6µs+0s) by main::BEGIN@8 at line 44 of setlib.cfg # once (6µs+0s) by Foswiki::Users::HtPasswdUser::BEGIN@2 at line 61 of DynaLoader.pm # once (6µs+0s) by Foswiki::Users::HtPasswdUser::BEGIN@2 at line 62 of DynaLoader.pm
sub FETCH {
65917µs my($self, $key) = @_;
66
67 # check for cached value (which may be undef so we use exists not defined)
68971µs return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
69}
70
71
# spent 9µs within Config::TIEHASH which was called: # once (9µs+0s) by main::BEGIN@8 at line 84
sub TIEHASH {
72116µs bless $_[1], $_[0];
73}
74
75sub DESTROY { }
76
77sub AUTOLOAD {
78 require 'Config_heavy.pl';
79 goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
80 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
81}
82
83# tie returns the object, so the value returned to require will be true.
84147µs19µstie %Config, 'Config', {
# spent 9µs making 1 call to Config::TIEHASH
85 archlibexp => '/usr/lib/perl/5.14',
86 archname => 'x86_64-linux-gnu-thread-multi',
87 cc => 'cc',
88 d_readlink => 'define',
89 d_symlink => 'define',
90 dlext => 'so',
91 dlsrc => 'dl_dlopen.xs',
92 dont_use_nlink => undef,
93 exe_ext => '',
94 inc_version_list => '',
95 intsize => '4',
96 ldlibpthname => 'LD_LIBRARY_PATH',
97 libpth => '/usr/local/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib',
98 osname => 'linux',
99 osvers => '2.6.32-5-amd64',
100 path_sep => ':',
101 privlibexp => '/usr/share/perl/5.14',
102 scriptdir => '/usr/bin',
103 sitearchexp => '/usr/local/lib/perl/5.14.2',
104 sitelibexp => '/usr/local/share/perl/5.14.2',
105 so => 'so',
106 useithreads => 'define',
107 usevendorprefix => 'define',
108 version => '5.14.2',
109};