Profile of Config.pm

← Index
NYTProf Performance Profile «line view»
For t/bug-md-11.t
Run on Fri Mar 8 13:27:24 2024
Reported on Fri Mar 8 13:30:23 2024

Filename | /home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2/x86_64-linux/Config.pm
Statements | Executed 64 statements in 555µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 1.53ms | 1.66ms | Config::::AUTOLOADConfig::AUTOLOAD
5 | 5 | 5 | 31µs | 31µs | Config::::importConfig::import
4 | 3 | 2 | 16µs | 1.71ms | Config::::FETCHConfig::FETCH
1 | 1 | 1 | 10µs | 12µs | Config::::BEGIN@9Config::BEGIN@9
1 | 1 | 1 | 5µs | 9µs | Config::::BEGIN@47Config::BEGIN@47
1 | 1 | 1 | 4µs | 22µs | Config::::BEGIN@10Config::BEGIN@10
1 | 1 | 1 | 1µs | 1µs | Config::::TIEHASHConfig::TIEHASH
0 | 0 | 0 | 0s | 0s | Config::::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 |  |  |  |  | # https://github.com/Perl/perl5/blob/blead/Porting/Glossary
7 |  |  |  |  |
8 |  |  |  |  | package Config;
9 | 2 | 20µs | 2 | 14µs | # spent 12µs (10+2) within Config::BEGIN@9 which was called: # once (10µs+2µs) by Test2::Util::BEGIN@8 at line 9 use strict; # spent 12µs making 1 call to Config::BEGIN@9 # spent 2µs making 1 call to strict::import
10 | 2 | 110µs | 2 | 41µs | # spent 22µs (4+19) within Config::BEGIN@10 which was called: # once (4µs+19µs) by Test2::Util::BEGIN@8 at line 10 use warnings; # spent 22µs making 1 call to Config::BEGIN@10 # spent 19µs making 1 call to warnings::import
11 |  |  |  |  | our ( %Config, $VERSION );
12 |  |  |  |  |
13 | 1 | 400ns |  |  | $VERSION = "5.038002";
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.
18 | 1 | 2µs |  |  | my %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 |  |  |  |  |
23 | 1 | 500ns |  |  | @Config::EXPORT = qw(%Config);
24 | 1 | 1µ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 |  |  |  |  |
29 |  |  |  |  | sub bincompat_options;
30 |  |  |  |  | sub compile_date;
31 |  |  |  |  | sub config_re;
32 |  |  |  |  | sub config_sh;
33 |  |  |  |  | sub config_vars;
34 |  |  |  |  | sub header_files;
35 |  |  |  |  | sub local_patches;
36 |  |  |  |  | sub myconfig;
37 |  |  |  |  | sub non_bincompat_options;
38 |  |  |  |  |
39 |  |  |  |  | # Define our own import method to avoid pulling in the full Exporter:
40 |  |  |  |  | # spent 31µs within Config::import which was called 5 times, avg 6µs/call: # once (7µs+0s) by Test2::Util::BEGIN@8 at line 8 of Test2/Util.pm # once (7µs+0s) by Errno::BEGIN@11 at line 11 of Errno.pm # once (6µs+0s) by Spreadsheet::ParseExcel::BEGIN@24 at line 24 of Spreadsheet/ParseExcel.pm # once (6µs+0s) by XML::Twig::BEGIN@33 at line 33 of XML/Twig.pm # once (5µs+0s) by File::Copy::BEGIN@17 at line 17 of File/Copy.pm sub import {
41 | 5 | 1µs |  |  | shift;
42 | 5 | 4µs |  |  | @_ = @Config::EXPORT unless @_;
43 |  |  |  |  |
44 | 5 | 5µs |  |  | my @funcs = grep $_ ne '%Config', @_;
45 | 5 | 3µs |  |  | my $export_Config = @funcs < @_ ? 1 : 0;
46 |  |  |  |  |
47 | 2 | 228µs | 2 | 13µs | # spent 9µs (5+4) within Config::BEGIN@47 which was called: # once (5µs+4µs) by Test2::Util::BEGIN@8 at line 47 no strict 'refs'; # spent 9µs making 1 call to Config::BEGIN@47 # spent 4µs making 1 call to strict::unimport
48 | 5 | 2µs |  |  | my $callpkg = caller(0);
49 | 5 | 2µ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 |  |  |  |  |
55 | 5 | 10µs |  |  | *{"$callpkg\::Config"} = \%Config if $export_Config;
56 | 5 | 39µs |  |  | return;
57 |  |  |  |  | }
58 |  |  |  |  |
59 | 1 | 19µs | 1 | 4µs | die "$0: Perl lib version (5.38.2) doesn't match executable '$^X' version ($])" # spent 4µs making 1 call to version::(bool
60 |  |  |  |  | unless $^V;
61 |  |  |  |  |
62 | 1 | 4µs | 1 | 2µs | $^V eq 5.38.2 # spent 2µs making 1 call to version::(cmp
63 |  |  |  |  | or die sprintf "%s: Perl lib version (5.38.2) doesn't match executable '$^X' version (%vd)", $0, $^V;
64 |  |  |  |  |
65 |  |  |  |  |
66 |  |  |  |  | # spent 1.71ms (16µs+1.70) within Config::FETCH which was called 4 times, avg 429µs/call: # 2 times (4µs+0s) by File::Temp::BEGIN@152 at line 12 of Errno.pm, avg 2µs/call # once (10µs+1.70ms) by Test2::Util::_check_for_sig_sys at line 167 of Test2/Util.pm # once (2µs+0s) by Test2::Util::_can_thread at line 48 of Test2/Util.pm sub FETCH {
67 | 4 | 2µs |  |  | my($self, $key) = @_;
68 |  |  |  |  |
69 |  |  |  |  | # check for cached value (which may be undef so we use exists not defined)
70 | 4 | 14µs | 1 | 1.66ms | return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key); # spent 1.66ms making 1 call to Config::AUTOLOAD
71 |  |  |  |  | }
72 |  |  |  |  |
73 |  |  |  |  | # spent 1µs within Config::TIEHASH which was called: # once (1µs+0s) by Test2::Util::BEGIN@8 at line 86 sub TIEHASH {
74 | 1 | 2µs |  |  | bless $_[1], $_[0];
75 |  |  |  |  | }
76 |  |  |  |  |
77 |  |  |  |  | sub DESTROY { }
78 |  |  |  |  |
79 |  |  |  |  | # spent 1.66ms (1.53+126µs) within Config::AUTOLOAD which was called: # once (1.53ms+126µs) by Config::FETCH at line 70 sub AUTOLOAD {
80 | 1 | 60µs |  |  | require 'Config_heavy.pl';
81 | 1 | 10µs | 2 | 6µs | goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; # spent 5µs making 1 call to Config::launcher # spent 900ns making 1 call to 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.
86 | 1 | 16µs | 1 | 1µs | tie %Config, 'Config', { # spent 1µs making 1 call to Config::TIEHASH
87 |  |  |  |  | archlibexp => '/home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2/x86_64-linux',
88 |  |  |  |  | archname => 'x86_64-linux',
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/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64',
100 |  |  |  |  | osname => 'linux',
101 |  |  |  |  | osvers => '6.2.0-39-generic',
102 |  |  |  |  | path_sep => ':',
103 |  |  |  |  | privlibexp => '/home/micha/.plenv/versions/5.38.2/lib/perl5/5.38.2',
104 |  |  |  |  | scriptdir => '/home/micha/.plenv/versions/5.38.2/bin',
105 |  |  |  |  | sitearchexp => '/home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2/x86_64-linux',
106 |  |  |  |  | sitelibexp => '/home/micha/.plenv/versions/5.38.2/lib/perl5/site_perl/5.38.2',
107 |  |  |  |  | so => 'so',
108 |  |  |  |  | useithreads => undef,
109 |  |  |  |  | usevendorprefix => undef,
110 |  |  |  |  | version => '5.38.2',
111 |  |  |  |  | };