← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Tue Nov 7 05:38:10 2017
Reported on Tue Nov 7 06:15:59 2017

Filename/usr/local/lib/perl5/5.24/mach/Config.pm
StatementsExecuted 122 statements in 2.65ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1115.57ms5.89msConfig::::AUTOLOADConfig::AUTOLOAD
1111.11ms2.70msConfig::::BEGIN@11Config::BEGIN@11
888398µs398µsConfig::::importConfig::import
322238µs238µsConfig::::CORE:matchConfig::CORE:match (opcode)
16137220µs6.51msConfig::::FETCHConfig::FETCH
21176µs76µsConfig::::CORE:substcontConfig::CORE:substcont (opcode)
21171µs71µsConfig::::CORE:regcompConfig::CORE:regcomp (opcode)
11137µs43µsConfig::::BEGIN@9Config::BEGIN@9
11135µs109µsConfig::::BEGIN@47Config::BEGIN@47
11123µs23µsConfig::::CORE:substConfig::CORE:subst (opcode)
11120µs45µsConfig::::BEGIN@10Config::BEGIN@10
11117µs17µsConfig::::CORE:unpackConfig::CORE:unpack (opcode)
1118µs8µsConfig::::TIEHASHConfig::TIEHASH
1116µs6µsConfig::::CORE:packConfig::CORE:pack (opcode)
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;
9254µs250µs
# spent 43µs (37+7) within Config::BEGIN@9 which was called: # once (37µs+7µs) by Errno::BEGIN@10 at line 9
use strict;
# spent 43µs making 1 call to Config::BEGIN@9 # spent 7µs making 1 call to strict::import
10267µs269µs
# spent 45µs (20+25) within Config::BEGIN@10 which was called: # once (20µs+25µs) by Errno::BEGIN@10 at line 10
use warnings;
# spent 45µs making 1 call to Config::BEGIN@10 # spent 25µs making 1 call to warnings::import
112568µs22.89ms
# spent 2.70ms (1.11+1.59) within Config::BEGIN@11 which was called: # once (1.11ms+1.59ms) by Errno::BEGIN@10 at line 11
use vars '%Config', '$VERSION';
# spent 2.70ms making 1 call to Config::BEGIN@11 # spent 187µs making 1 call to vars::import
12
1312µs$VERSION = "5.024003";
14
15# Skip @Config::EXPORT because it only contains %Config, which we special
16# case below as it's not a function. @Config::EXPORT won't change in the
17# lifetime of Perl 5.
1817µsmy %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1,
19 config_re => 1, compile_date => 1, local_patches => 1,
20 bincompat_options => 1, non_bincompat_options => 1,
21 header_files => 1);
22
2313µs@Config::EXPORT = qw(%Config);
24116µs@Config::EXPORT_OK = keys %Export_Cache;
25
26# Need to stub all the functions to make code such as print Config::config_sh
27# keep working
28
29sub bincompat_options;
30sub compile_date;
31sub config_re;
32sub config_sh;
33sub config_vars;
34sub header_files;
35sub local_patches;
36sub myconfig;
37sub non_bincompat_options;
38
39# Define our own import method to avoid pulling in the full Exporter:
40
# spent 398µs within Config::import which was called 8 times, avg 50µs/call: # once (69µs+0s) by Errno::BEGIN@10 at line 10 of Errno.pm # once (59µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm # once (52µs+0s) by DynaLoader::BEGIN@22 at line 22 of DynaLoader.pm # once (48µs+0s) by Mail::SpamAssassin::Util::BEGIN@70 at line 70 of Mail/SpamAssassin/Util.pm # once (44µs+0s) by Pod::Usage::BEGIN@20 at line 20 of Pod/Usage.pm # once (43µs+0s) by File::Copy::BEGIN@14 at line 14 of File/Copy.pm # once (42µs+0s) by lib::BEGIN@6 at line 6 of lib.pm # once (40µs+0s) by Mail::SpamAssassin::BEGIN@88 at line 88 of Mail/SpamAssassin.pm
sub import {
41814µs shift;
42857µs @_ = @Config::EXPORT unless @_;
43
44848µs my @funcs = grep $_ ne '%Config', @_;
45828µs my $export_Config = @funcs < @_ ? 1 : 0;
46
472760µs2183µs
# spent 109µs (35+74) within Config::BEGIN@47 which was called: # once (35µs+74µs) by Errno::BEGIN@10 at line 47
no strict 'refs';
# spent 109µs making 1 call to Config::BEGIN@47 # spent 74µs making 1 call to strict::unimport
48828µs my $callpkg = caller(0);
49835µs foreach my $func (@funcs) {
50 die qq{"$func" is not exported by the Config module\n}
51 unless $Export_Cache{$func};
52 *{$callpkg.'::'.$func} = \&{$func};
53 }
54
5516131µs *{"$callpkg\::Config"} = \%Config if $export_Config;
56895µs return;
57}
58
59174µs111µsdie "$0: Perl lib version (5.24.3) doesn't match executable '$^X' version ($])"
# spent 11µs making 1 call to version::(bool
60 unless $^V;
61
62133µs116µs$^V eq 5.24.3
# spent 16µs making 1 call to version::(cmp
63 or die sprintf "%s: Perl lib version (5.24.3) doesn't match executable '$^X' version (%vd)", $0, $^V;
64
65
66
# spent 6.51ms (220µs+6.29) within Config::FETCH which was called 16 times, avg 407µs/call: # 3 times (37µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 41 of DynaLoader.pm, avg 12µs/call # 2 times (18µs+0s) by main::BEGIN@23 at line 11 of Errno.pm, avg 9µs/call # once (51µs+6.07ms) by Net::DNS::Resolver::Base::BEGIN@40 at line 1 of (eval 20)[Net/DNS/Resolver/Base.pm:40] # once (20µs+219µs) by IO::Socket::SSL::BEGIN@27 at line 34 of IO/Socket/SSL.pm # once (15µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 57 of DynaLoader.pm # once (13µs+0s) by File::Path::BEGIN@6 at line 244 of Cwd.pm # once (12µs+0s) by main::BEGIN@39 at line 10 of lib.pm # once (11µs+0s) by Mail::SpamAssassin::Util::clean_path_in_taint_mode at line 183 of Mail/SpamAssassin/Util.pm # once (10µs+0s) by main::BEGIN@39 at line 11 of lib.pm # once (10µs+0s) by main::BEGIN@39 at line 12 of lib.pm # once (8µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 60 of DynaLoader.pm # once (7µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 61 of DynaLoader.pm # once (7µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 62 of DynaLoader.pm
sub FETCH {
671643µs my($self, $key) = @_;
68
69 # check for cached value (which may be undef so we use exists not defined)
7016238µs26.11ms return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
# spent 5.89ms making 1 call to Config::AUTOLOAD # spent 219µs making 1 call to Config::fetch_string
71}
72
73
# spent 8µs within Config::TIEHASH which was called: # once (8µs+0s) by Errno::BEGIN@10 at line 86
sub TIEHASH {
74111µs bless $_[1], $_[0];
75}
76
77sub DESTROY { }
78
79
# spent 5.89ms (5.57+324µs) within Config::AUTOLOAD which was called: # once (5.57ms+324µs) by Config::FETCH at line 70
sub AUTOLOAD {
801212µs require 'Config_heavy.pl';
81133µs231µs goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 27µs making 1 call to Config::launcher # spent 4µs making 1 call to Config::CORE:match
82 die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
83}
84
85# tie returns the object, so the value returned to require will be true.
86192µs18µstie %Config, 'Config', {
# spent 8µs making 1 call to Config::TIEHASH
87 archlibexp => '/usr/local/lib/perl5/5.24/mach',
88 archname => 'amd64-freebsd-thread-multi',
89 cc => 'cc',
90 d_readlink => 'define',
91 d_symlink => 'define',
92 dlext => 'so',
93 dlsrc => 'dl_dlopen.xs',
94 dont_use_nlink => undef,
95 exe_ext => '',
96 inc_version_list => ' ',
97 intsize => '4',
98 ldlibpthname => 'LD_LIBRARY_PATH',
99 libpth => '/usr/lib /usr/local/lib /usr/include/clang/3.4.1 /usr/lib',
100 osname => 'freebsd',
101 osvers => '10.3-release',
102 path_sep => ':',
103 privlibexp => '/usr/local/lib/perl5/5.24',
104 scriptdir => '/usr/local/bin',
105 sitearchexp => '/usr/local/lib/perl5/site_perl/mach/5.24',
106 sitelibexp => '/usr/local/lib/perl5/site_perl',
107 so => 'so',
108 useithreads => 'define',
109 usevendorprefix => undef,
110 version => '5.24.3',
111};
 
# spent 238µs within Config::CORE:match which was called 3 times, avg 79µs/call: # 2 times (234µs+0s) by Config::fetch_string at line 1398 of Config_heavy.pl, avg 117µs/call # once (4µs+0s) by Config::AUTOLOAD at line 81
sub Config::CORE:match; # opcode
# spent 6µs within Config::CORE:pack which was called: # once (6µs+0s) by Config::AUTOLOAD at line 1374 of Config_heavy.pl
sub Config::CORE:pack; # opcode
# spent 71µs within Config::CORE:regcomp which was called 2 times, avg 35µs/call: # 2 times (71µs+0s) by Config::fetch_string at line 1398 of Config_heavy.pl, avg 35µs/call
sub Config::CORE:regcomp; # opcode
# spent 23µs within Config::CORE:subst which was called: # once (23µs+0s) by Config::AUTOLOAD at line 1375 of Config_heavy.pl
sub Config::CORE:subst; # opcode
# spent 76µs within Config::CORE:substcont which was called 2 times, avg 38µs/call: # 2 times (76µs+0s) by Config::AUTOLOAD at line 1375 of Config_heavy.pl, avg 38µs/call
sub Config::CORE:substcont; # opcode
# spent 17µs within Config::CORE:unpack which was called: # once (17µs+0s) by Config::AUTOLOAD at line 1374 of Config_heavy.pl
sub Config::CORE:unpack; # opcode