← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/hailo
  Run on Thu Oct 21 22:50:37 2010
Reported on Thu Oct 21 22:52:13 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/x86_64-linux/Config.pm
StatementsExecuted 53 statements in 707µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1112.16ms2.26msConfig::::AUTOLOADConfig::AUTOLOAD
108481µs2.52msConfig::::FETCHConfig::FETCH
22240µs40µsConfig::::importConfig::import
11124µs29µsConfig::::BEGIN@9Config::BEGIN@9
11111µs37µ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;
92110µs234µs
# spent 29µs (24+5) within Config::BEGIN@9 which was called: # once (24µs+5µs) by DynaLoader::BEGIN@25 at line 9
use strict;
# spent 29µ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.
2615µ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 40µs within Config::import which was called 2 times, avg 20µs/call: # once (22µs+0s) by Fatal::BEGIN@8 at line 8 of Fatal.pm # once (18µs+0s) by DynaLoader::BEGIN@25 at line 25 of DynaLoader.pm
sub import {
3222µs shift;
3325µs @_ = @Config::EXPORT unless @_;
34
3525µs my @funcs = grep $_ ne '%Config', @_;
3624µs my $export_Config = @funcs < @_ ? 1 : 0;
37
382292µs264µs
# spent 37µs (11+27) within Config::BEGIN@38 which was called: # once (11µs+27µs) by DynaLoader::BEGIN@25 at line 38
no strict 'refs';
# spent 37µs making 1 call to Config::BEGIN@38 # spent 27µs making 1 call to strict::unimport
3924µs my $callpkg = caller(0);
4026µs 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
4628µs *{"$callpkg\::Config"} = \%Config if $export_Config;
47211µs return;
48}
49
50122µs18µsdie "Perl lib version (5.13.5) doesn't match executable '$0' version ($])"
# spent 8µs making 1 call to version::(bool
51 unless $^V;
52
53112µs15µs$^V eq 5.13.5
# spent 5µ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.52ms (81µs+2.43) within Config::FETCH which was called 10 times, avg 252µs/call: # 3 times (36µs+2.37ms) by Data::OptList::BEGIN@7 at line 43 of DynaLoader.pm, avg 803µs/call # once (12µs+63µs) by Tie::RefHash::BEGIN@96 at line 100 of Tie/RefHash.pm # once (7µs+0s) by autodie::BEGIN@6 at line 58 of Fatal.pm # once (7µs+0s) by File::Spec::Unix::_cwd at line 378 of Cwd.pm # once (5µs+0s) by Data::OptList::BEGIN@7 at line 63 of DynaLoader.pm # once (5µs+0s) by Data::OptList::BEGIN@7 at line 68 of DynaLoader.pm # once (4µs+0s) by Data::OptList::BEGIN@7 at line 67 of DynaLoader.pm # once (4µs+0s) by Data::OptList::BEGIN@7 at line 66 of DynaLoader.pm
sub FETCH {
591016µs my($self, $key) = @_;
60
61 # check for cached value (which may be undef so we use exists not defined)
621043µs return $self->{$key} if exists $self->{$key};
63
64326µs32.38ms return $self->fetch_string($key);
# spent 2.26ms making 1 call to Config::AUTOLOAD # spent 119µs making 2 calls to Config::fetch_string, avg 60µs/call
65}
66
# spent 6µs within Config::TIEHASH which was called: # once (6µs+0s) by DynaLoader::BEGIN@25 at line 79
sub TIEHASH {
6717µs bless $_[1], $_[0];
68}
69
70sub DESTROY { }
71
72
# spent 2.26ms (2.16+96µs) within Config::AUTOLOAD which was called: # once (2.16ms+96µs) by Config::FETCH at line 64
sub AUTOLOAD {
73178µs require 'Config_heavy.pl';
74116µs211µs goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 9µ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.
79129µ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};