← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Sun Nov 5 02:36:06 2017
Reported on Sun Nov 5 02:56:17 2017

Filename/usr/local/lib/perl5/5.24/mach/Config.pm
StatementsExecuted 122 statements in 2.58ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1115.46ms5.80msConfig::::AUTOLOADConfig::AUTOLOAD
1111.09ms2.60msConfig::::BEGIN@11Config::BEGIN@11
888383µs383µsConfig::::importConfig::import
322229µs229µsConfig::::CORE:matchConfig::CORE:match (opcode)
16137205µs6.40msConfig::::FETCHConfig::FETCH
21179µs79µsConfig::::CORE:substcontConfig::CORE:substcont (opcode)
21176µs76µsConfig::::CORE:regcompConfig::CORE:regcomp (opcode)
11143µs50µsConfig::::BEGIN@9Config::BEGIN@9
11123µs23µsConfig::::CORE:substConfig::CORE:subst (opcode)
11121µs82µsConfig::::BEGIN@47Config::BEGIN@47
11120µs47µsConfig::::BEGIN@10Config::BEGIN@10
11118µs18µsConfig::::CORE:unpackConfig::CORE:unpack (opcode)
11115µs15µsConfig::::CORE:packConfig::CORE:pack (opcode)
1119µs9µ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;
9266µs256µs
# spent 50µs (43+7) within Config::BEGIN@9 which was called: # once (43µs+7µs) by Errno::BEGIN@10 at line 9
use strict;
# spent 50µs making 1 call to Config::BEGIN@9 # spent 7µs making 1 call to strict::import
10280µs275µs
# spent 47µs (20+28) within Config::BEGIN@10 which was called: # once (20µs+28µs) by Errno::BEGIN@10 at line 10
use warnings;
# spent 47µs making 1 call to Config::BEGIN@10 # spent 28µs making 1 call to warnings::import
112529µs22.74ms
# spent 2.60ms (1.09+1.50) within Config::BEGIN@11 which was called: # once (1.09ms+1.50ms) by Errno::BEGIN@10 at line 11
use vars '%Config', '$VERSION';
# spent 2.60ms making 1 call to Config::BEGIN@11 # spent 146µ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.
18118µ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
2312µs@Config::EXPORT = qw(%Config);
2418µ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 383µs within Config::import which was called 8 times, avg 48µs/call: # once (63µs+0s) by Errno::BEGIN@10 at line 10 of Errno.pm # once (53µs+0s) by Mail::SpamAssassin::Util::BEGIN@70 at line 70 of Mail/SpamAssassin/Util.pm # once (51µs+0s) by lib::BEGIN@6 at line 6 of lib.pm # once (50µs+0s) by DynaLoader::BEGIN@22 at line 22 of DynaLoader.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 (41µs+0s) by Mail::SpamAssassin::BEGIN@88 at line 88 of Mail/SpamAssassin.pm # once (39µs+0s) by Time::Local::BEGIN@5 at line 5 of Time/Local.pm
sub import {
41814µs shift;
42852µs @_ = @Config::EXPORT unless @_;
43
44851µs my @funcs = grep $_ ne '%Config', @_;
45829µs my $export_Config = @funcs < @_ ? 1 : 0;
46
472734µs2143µs
# spent 82µs (21+61) within Config::BEGIN@47 which was called: # once (21µs+61µs) by Errno::BEGIN@10 at line 47
no strict 'refs';
# spent 82µs making 1 call to Config::BEGIN@47 # spent 61µs making 1 call to strict::unimport
48822µs my $callpkg = caller(0);
49843µ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
5516120µs *{"$callpkg\::Config"} = \%Config if $export_Config;
56895µs return;
57}
58
59187µ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
62128µs111µs$^V eq 5.24.3
# spent 11µ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.40ms (205µs+6.20) within Config::FETCH which was called 16 times, avg 400µs/call: # 3 times (29µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 41 of DynaLoader.pm, avg 10µs/call # 2 times (17µs+0s) by main::BEGIN@23 at line 11 of Errno.pm, avg 8µs/call # once (45µs+5.97ms) by Net::DNS::Resolver::Base::BEGIN@40 at line 1 of (eval 20)[Net/DNS/Resolver/Base.pm:40] # once (21µs+228µs) by IO::Socket::SSL::BEGIN@27 at line 34 of IO/Socket/SSL.pm # once (17µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 62 of DynaLoader.pm # once (14µs+0s) by main::BEGIN@39 at line 10 of lib.pm # once (12µs+0s) by File::Path::BEGIN@6 at line 244 of Cwd.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 Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 57 of DynaLoader.pm # once (8µs+0s) by main::BEGIN@39 at line 12 of lib.pm # once (8µs+0s) by main::BEGIN@39 at line 11 of lib.pm # once (7µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 60 of DynaLoader.pm # once (6µs+0s) by Mail::SpamAssassin::Logger::Stderr::BEGIN@38 at line 61 of DynaLoader.pm
sub FETCH {
671638µs my($self, $key) = @_;
68
69 # check for cached value (which may be undef so we use exists not defined)
7016227µs26.03ms return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
# spent 5.80ms making 1 call to Config::AUTOLOAD # spent 228µs making 1 call to Config::fetch_string
71}
72
73
# spent 9µs within Config::TIEHASH which was called: # once (9µs+0s) by Errno::BEGIN@10 at line 86
sub TIEHASH {
74111µs bless $_[1], $_[0];
75}
76
77sub DESTROY { }
78
79
# spent 5.80ms (5.46+339µs) within Config::AUTOLOAD which was called: # once (5.46ms+339µs) by Config::FETCH at line 70
sub AUTOLOAD {
801200µs require 'Config_heavy.pl';
81133µs227µs goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
# spent 23µ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.
86184µs19µstie %Config, 'Config', {
# spent 9µ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 229µs within Config::CORE:match which was called 3 times, avg 76µs/call: # 2 times (225µs+0s) by Config::fetch_string at line 1398 of Config_heavy.pl, avg 112µs/call # once (4µs+0s) by Config::AUTOLOAD at line 81
sub Config::CORE:match; # opcode
# spent 15µs within Config::CORE:pack which was called: # once (15µs+0s) by Config::AUTOLOAD at line 1374 of Config_heavy.pl
sub Config::CORE:pack; # opcode
# spent 76µs within Config::CORE:regcomp which was called 2 times, avg 38µs/call: # 2 times (76µs+0s) by Config::fetch_string at line 1398 of Config_heavy.pl, avg 38µ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 79µs within Config::CORE:substcont which was called 2 times, avg 40µs/call: # 2 times (79µs+0s) by Config::AUTOLOAD at line 1375 of Config_heavy.pl, avg 40µs/call
sub Config::CORE:substcont; # opcode
# spent 18µs within Config::CORE:unpack which was called: # once (18µs+0s) by Config::AUTOLOAD at line 1374 of Config_heavy.pl
sub Config::CORE:unpack; # opcode