← Index
NYTProf Performance Profile   « line view »
For bin/benchmark-perlformance
  Run on Fri Apr 17 15:31:48 2015
Reported on Fri Apr 17 15:32:02 2015

Filename/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3/x86_64-linux/Config.pm
StatementsExecuted 59 statements in 612µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.32ms1.42msConfig::::AUTOLOADConfig::AUTOLOAD
111324µs567µsConfig::::BEGIN@11Config::BEGIN@11
33332µs32µsConfig::::importConfig::import
97320µs20µsConfig::::FETCHConfig::FETCH
11110µs21µsConfig::::BEGIN@9Config::BEGIN@9
1117µs10µsConfig::::BEGIN@10Config::BEGIN@10
1116µs16µsConfig::::BEGIN@45Config::BEGIN@45
1114µs4µ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;
9218µs232µs
# spent 21µs (10+11) within Config::BEGIN@9 which was called: # once (10µs+11µs) by Benchmark::Perl::Formance::BEGIN@8 at line 9
use strict;
# spent 21µs making 1 call to Config::BEGIN@9 # spent 11µs making 1 call to strict::import
10218µs213µs
# spent 10µs (7+3) within Config::BEGIN@10 which was called: # once (7µs+3µs) by Benchmark::Perl::Formance::BEGIN@8 at line 10
use warnings;
# spent 10µs making 1 call to Config::BEGIN@10 # spent 3µs making 1 call to warnings::import
112153µs2589µs
# spent 567µs (324+243) within Config::BEGIN@11 which was called: # once (324µs+243µs) by Benchmark::Perl::Formance::BEGIN@8 at line 11
use vars '%Config';
# spent 567µs making 1 call to Config::BEGIN@11 # spent 22µ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.
1613µ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
211700ns@Config::EXPORT = qw(%Config);
2212µ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 32µs within Config::import which was called 3 times, avg 10µs/call: # once (12µs+0s) by DynaLoader::BEGIN@22 at line 22 of DynaLoader.pm # once (10µs+0s) by Config::Perl::V::BEGIN@8 at line 8 of Config/Perl/V.pm # once (10µs+0s) by Benchmark::Perl::Formance::BEGIN@8 at line 8 of lib/Benchmark/Perl/Formance.pm
sub import {
393700ns shift;
4034µs @_ = @Config::EXPORT unless @_;
41
4236µs my @funcs = grep $_ ne '%Config', @_;
4332µs my $export_Config = @funcs < @_ ? 1 : 0;
44
452219µs226µs
# spent 16µs (6+10) within Config::BEGIN@45 which was called: # once (6µs+10µs) by Benchmark::Perl::Formance::BEGIN@8 at line 45
no strict 'refs';
# spent 16µs making 1 call to Config::BEGIN@45 # spent 10µs making 1 call to strict::unimport
4632µs my $callpkg = caller(0);
4733µ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
5339µs *{"$callpkg\::Config"} = \%Config if $export_Config;
54320µs return;
55}
56
57114µs16µsdie "Perl lib version (5.16.3) doesn't match executable '$0' version ($])"
# spent 6µs making 1 call to version::(bool
58 unless $^V;
59
6018µs14µs$^V eq 5.16.3
# spent 4µs making 1 call to version::(cmp
61 or die "Perl lib version (5.16.3) doesn't match executable '$0' version (" .
62 sprintf("v%vd",$^V) . ")";
63
64
65
# spent 20µs within Config::FETCH which was called 9 times, avg 2µs/call: # 3 times (7µs+0s) by Benchmark::Perl::Formance::BEGIN@12 at line 40 of DynaLoader.pm, avg 2µs/call # once (4µs+0s) by Benchmark::Perl::Formance::BEGIN@18 at line 375 of Cwd.pm # once (3µs+0s) by Benchmark::Perl::Formance::BEGIN@18 at line 1107 of File/Find.pm # once (2µs+0s) by Benchmark::Perl::Formance::BEGIN@12 at line 60 of DynaLoader.pm # once (2µs+0s) by Benchmark::Perl::Formance::BEGIN@12 at line 65 of DynaLoader.pm # once (1µs+0s) by Benchmark::Perl::Formance::BEGIN@12 at line 63 of DynaLoader.pm # once (1µs+0s) by Benchmark::Perl::Formance::BEGIN@12 at line 64 of DynaLoader.pm
sub FETCH {
6695µs my($self, $key) = @_;
67
68 # check for cached value (which may be undef so we use exists not defined)
69933µs return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
70}
71
72
# spent 4µs within Config::TIEHASH which was called: # once (4µs+0s) by Benchmark::Perl::Formance::BEGIN@8 at line 85
sub TIEHASH {
7316µs bless $_[1], $_[0];
74}
75
76sub DESTROY { }
77
78
# spent 1.42ms (1.32+100µs) within Config::AUTOLOAD which was called: # once (1.32ms+100µs) by main::BEGIN@5 at line 74 of lib/Benchmark/Perl/Formance.pm
sub AUTOLOAD {
79151µs require 'Config_heavy.pl';
80112µs27µs goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 6µs making 1 call to Config::launcher # spent 900ns making 1 call to Config::CORE:match
81 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
82}
83
84# tie returns the object, so the value returned to require will be true.
85120µs14µstie %Config, 'Config', {
# spent 4µs making 1 call to Config::TIEHASH
86 archlibexp => '/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3/x86_64-linux',
87 archname => 'x86_64-linux',
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/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib',
99 osname => 'linux',
100 osvers => '3.5.0-27-generic',
101 path_sep => ':',
102 privlibexp => '/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/5.16.3',
103 scriptdir => '/home/ss5/perl5/perlbrew/perls/tapper-perl/bin',
104 sitearchexp => '/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3/x86_64-linux',
105 sitelibexp => '/home/ss5/perl5/perlbrew/perls/tapper-perl/lib/site_perl/5.16.3',
106 so => 'so',
107 useithreads => undef,
108 usevendorprefix => undef,
109 version => '5.16.3',
110};