← Index
NYTProf Performance Profile   « block view • line view • sub view »
For conv.pl
  Run on Sun Nov 14 22:50:31 2010
Reported on Sun Nov 14 22:51:21 2010

Filename/usr/lib/perl/5.10/Config.pm
StatementsExecuted 40 statements in 990µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1112.98ms3.15msConfig::::AUTOLOADConfig::AUTOLOAD
75171µs3.35msConfig::::FETCHConfig::FETCH
11123µs29µsConfig::::BEGIN@9Config::BEGIN@9
11123µs23µsConfig::::importConfig::import
11120µs49µsConfig::::BEGIN@35Config::BEGIN@35
11114µs14µ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;
93194µs235µs
# spent 29µs (23+6) within Config::BEGIN@9 which was called: # once (23µs+6µs) by DynaLoader::BEGIN@24 at line 9
use strict;
# spent 29µs making 1 call to Config::BEGIN@9 # spent 6µ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
2317µsmy %Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK);
24
2511µsour %Config;
26
27# Define our own import method to avoid pulling in the full Exporter:
28
# spent 23µs within Config::import which was called: # once (23µs+0s) by DynaLoader::BEGIN@24 at line 24 of DynaLoader.pm
sub import {
29826µs my $pkg = shift;
30 @_ = @Config::EXPORT unless @_;
31
32 my @funcs = grep $_ ne '%Config', @_;
33 my $export_Config = @funcs < @_ ? 1 : 0;
34
353455µs278µs
# spent 49µs (20+29) within Config::BEGIN@35 which was called: # once (20µs+29µs) by DynaLoader::BEGIN@24 at line 35
no strict 'refs';
# spent 49µs making 1 call to Config::BEGIN@35 # spent 29µ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
47122µs19µsdie "Perl lib version (5.10.1) doesn't match executable version ($])"
# spent 9µs making 1 call to version::(bool
48 unless $^V;
49
50117µs18µs$^V eq 5.10.1
# spent 8µ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
# spent 3.35ms (71µs+3.28) within Config::FETCH which was called 7 times, avg 479µs/call: # 3 times (49µs+3.28ms) by XML::LibXML::BEGIN@28 at line 42 of DynaLoader.pm, avg 1.11ms/call # once (6µs+0s) by XML::LibXML::BEGIN@28 at line 64 of DynaLoader.pm # once (6µs+0s) by XML::LibXML::BEGIN@28 at line 61 of DynaLoader.pm # once (5µs+0s) by XML::LibXML::BEGIN@28 at line 63 of DynaLoader.pm # once (5µs+0s) by XML::LibXML::BEGIN@28 at line 65 of DynaLoader.pm
sub FETCH {
551664µs my($self, $key) = @_;
56
57 # check for cached value (which may be undef so we use exists not defined)
58 return $self->{$key} if exists $self->{$key};
59
6023.21ms return $self->fetch_string($key);
# spent 3.15ms making 1 call to Config::AUTOLOAD # spent 68µs making 1 call to Config::fetch_string
61}
62
# spent 14µs within Config::TIEHASH which was called: # once (14µs+0s) by DynaLoader::BEGIN@24 at line 75
sub TIEHASH {
63117µs bless $_[1], $_[0];
64}
65
66sub DESTROY { }
67
68
# spent 3.15ms (2.98+167µs) within Config::AUTOLOAD which was called: # once (2.98ms+167µs) by Config::FETCH at line 60
sub AUTOLOAD {
692137µs require 'Config_heavy.pl';
70215µs goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 12µs making 1 call to Config::launcher # spent 3µs making 1 call to Config::CORE:match
71 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
72}
73
74# tie returns the object, so the value returned to require will be true.
75146µs114µstie %Config, 'Config', {
# spent 14µs making 1 call to Config::TIEHASH
76 archlibexp => '/usr/lib/perl/5.10',
77 archname => 'i486-linux-gnu-thread-multi',
78 cc => 'cc',
79 d_readlink => 'define',
80 d_symlink => 'define',
81 dlsrc => 'dl_dlopen.xs',
82 dont_use_nlink => undef,
83 exe_ext => '',
84 inc_version_list => '5.10.0',
85 intsize => '4',
86 ldlibpthname => 'LD_LIBRARY_PATH',
87 libpth => '/usr/local/lib /lib /usr/lib /usr/lib64',
88 osname => 'linux',
89 osvers => '2.6.32.17-dsa-ia32',
90 path_sep => ':',
91 privlibexp => '/usr/share/perl/5.10',
92 scriptdir => '/usr/bin',
93 sitearchexp => '/usr/local/lib/perl/5.10.1',
94 sitelibexp => '/usr/local/share/perl/5.10.1',
95 useithreads => 'define',
96 usevendorprefix => 'define',
97 version => '5.10.1',
98};