← Index
NYTProf Performance Profile   « line view »
For ./view
  Run on Fri Jul 31 19:05:14 2015
Reported on Fri Jul 31 19:08:08 2015

Filename/usr/share/perl5/vendor_perl/Exporter.pm
StatementsExecuted 1309 statements in 4.35ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
8058343.37ms6.31msExporter::::importExporter::import
28212.71ms2.83msExporter::::as_heavyExporter::as_heavy
2611190µs531µsExporter::::exportExporter::export
22225µs2.51msExporter::::export_tagsExporter::export_tags
0000s0sExporter::::__ANON__[:64]Exporter::__ANON__[:64]
0000s0sExporter::::export_failExporter::export_fail
0000s0sExporter::::export_ok_tagsExporter::export_ok_tags
0000s0sExporter::::export_to_levelExporter::export_to_level
0000s0sExporter::::require_versionExporter::require_version
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Exporter;
2
3138µsrequire 5.006;
4
5# Be lean.
6#use strict;
7#no strict 'refs';
8
91700nsour $Debug = 0;
101200nsour $ExportLevel = 0;
111800nsour $Verbose ||= 0;
121800nsour $VERSION = '5.68';
131600nsour (%Cache);
14
15
# spent 2.83ms (2.71+117µs) within Exporter::as_heavy which was called 28 times, avg 101µs/call: # 26 times (341µs+0s) by Exporter::export at line 25, avg 13µs/call # 2 times (2.37ms+117µs) by Exporter::export_tags at line 85, avg 1.24ms/call
sub as_heavy {
1628142µs require Exporter::Heavy;
17 # Unfortunately, this does not work if the caller is aliased as *name = \&foo
18 # Thus the need to create a lot of identical subroutines
1928164µs my $c = (caller(1))[3];
202888µs $c =~ s/.*:://;
2128198µs \&{"Exporter::Heavy::heavy_$c"};
22}
23
24
# spent 531µs (190+341) within Exporter::export which was called 26 times, avg 20µs/call: # 26 times (190µs+341µs) by Exporter::import at line 62, avg 20µs/call
sub export {
2526168µs522.75ms goto &{as_heavy()};
# spent 2.41ms making 26 calls to Exporter::Heavy::heavy_export, avg 93µs/call # spent 341µs making 26 calls to Exporter::as_heavy, avg 13µs/call
26}
27
28
# spent 6.31ms (3.37+2.94) within Exporter::import which was called 80 times, avg 79µs/call: # 23 times (626µs+2.41ms) by Error::import at line 63 of Error.pm, avg 132µs/call # once (424µs+135µs) by POSIX::import at line 30 of POSIX.pm # once (20µs+320µs) by Foswiki::Store::VC::Handler::BEGIN@34 at line 34 of /var/www/foswiki11/lib/Foswiki/Store/VC/Handler.pm # once (207µs+0s) by POSIX::BEGIN@11 at line 11 of POSIX.pm # once (182µs+0s) by File::Temp::BEGIN@14 at line 14 of File/Temp.pm # once (119µs+0s) by Foswiki::Meta::BEGIN@117 at line 117 of /var/www/foswiki11/lib/Foswiki/Meta.pm # once (108µs+0s) by Foswiki::Request::BEGIN@37 at line 147 of IO/File.pm # once (104µs+0s) by Foswiki::Plugins::WysiwygPlugin::Constants::BEGIN@7 at line 7 of /var/www/foswiki11/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm # once (21µs+76µs) by Storable::BEGIN@53 at line 54 of Storable.pm # once (95µs+0s) by I18N::LangTags::Detect::BEGIN@16 at line 16 of I18N/LangTags/Detect.pm # once (82µs+0s) by CGI::BEGIN@28 at line 28 of CGI.pm # once (68µs+0s) by CGI::Carp::import at line 370 of CGI/Carp.pm # once (67µs+0s) by Data::Dumper::BEGIN@22 at line 22 of Data/Dumper.pm # once (56µs+0s) by CGI::Carp::BEGIN@332 at line 332 of CGI/Carp.pm # once (44µs+0s) by Foswiki::BEGIN@28 at line 28 of setlib.cfg # once (43µs+0s) by Foswiki::Plugins::DirectedGraphPlugin::BEGIN@31 at line 31 of /var/www/foswiki11/lib/Foswiki/Plugins/DirectedGraphPlugin.pm # once (40µs+0s) by CGI::BEGIN@3 at line 3 of CGI.pm # once (40µs+0s) by Foswiki::Plugins::WysiwygPlugin::Constants::BEGIN@8 at line 8 of /var/www/foswiki11/lib/Foswiki/Plugins/WysiwygPlugin/Constants.pm # once (39µs+0s) by Time::ParseDate::BEGIN@7 at line 7 of Time/ParseDate.pm # once (38µs+0s) by IO::BEGIN@6 at line 6 of IO.pm # once (36µs+0s) by IO::Seekable::BEGIN@98 at line 98 of IO/Seekable.pm # once (34µs+0s) by Foswiki::Plugins::DirectedGraphPlugin::BEGIN@197 at line 197 of /var/www/foswiki11/lib/Foswiki/Plugins/DirectedGraphPlugin.pm # once (33µs+0s) by Time::Local::BEGIN@4 at line 4 of Time/Local.pm # once (32µs+0s) by Tie::Hash::BEGIN@188 at line 188 of Tie/Hash.pm # once (32µs+0s) by Time::ParseDate::BEGIN@6 at line 6 of Time/ParseDate.pm # once (32µs+0s) by IO::File::BEGIN@131 at line 131 of IO/File.pm # once (30µs+0s) by IO::File::BEGIN@130 at line 130 of IO/File.pm # once (30µs+0s) by File::Temp::BEGIN@17 at line 17 of File/Temp.pm # once (30µs+0s) by Foswiki::MetaCache::BEGIN@23 at line 23 of /var/www/foswiki11/lib/Foswiki/MetaCache.pm # once (30µs+0s) by Foswiki::Users::BaseUserMapping::BEGIN@38 at line 38 of /var/www/foswiki11/lib/Foswiki/Users/BaseUserMapping.pm # once (30µs+0s) by IO::Handle::BEGIN@263 at line 263 of IO/Handle.pm # once (30µs+0s) by SelectSaver::BEGIN@38 at line 38 of SelectSaver.pm # once (29µs+0s) by CGI::Cookie::BEGIN@21 at line 21 of CGI/Cookie.pm # once (28µs+0s) by IO::Handle::BEGIN@264 at line 264 of IO/Handle.pm # once (27µs+0s) by File::Temp::BEGIN@10 at line 10 of File/Temp.pm # once (25µs+0s) by Time::ParseDate::BEGIN@5 at line 5 of Time/ParseDate.pm # once (25µs+0s) by Foswiki::Users::BaseUserMapping::BEGIN@39 at line 39 of /var/www/foswiki11/lib/Foswiki/Users/BaseUserMapping.pm # once (25µs+0s) by SelectSaver::BEGIN@39 at line 39 of SelectSaver.pm # once (25µs+0s) by Foswiki::Plugins::TimeCalcPlugin::BEGIN@38 at line 38 of /var/www/foswiki11/lib/Foswiki/Plugins/TimeCalcPlugin.pm # once (25µs+0s) by Foswiki::Plugins::PlantUMLPlugin::BEGIN@11 at line 11 of /var/www/foswiki11/lib/Foswiki/Plugins/PlantUMLPlugin.pm # once (24µs+0s) by File::Temp::BEGIN@13 at line 13 of File/Temp.pm # once (24µs+0s) by IO::Seekable::BEGIN@104 at line 104 of IO/Seekable.pm # once (24µs+0s) by Time::JulianDay::BEGIN@5 at line 5 of Time/JulianDay.pm # once (24µs+0s) by IO::File::BEGIN@133 at line 133 of IO/File.pm # once (23µs+0s) by Time::Timezone::BEGIN@10 at line 10 of Time/Timezone.pm # once (22µs+0s) by Foswiki::Plugins::DirectedGraphPlugin::BEGIN@30 at line 30 of /var/www/foswiki11/lib/Foswiki/Plugins/DirectedGraphPlugin.pm # once (22µs+0s) by Time::JulianDay::BEGIN@6 at line 6 of Time/JulianDay.pm # once (21µs+0s) by Assert::BEGIN@20 at line 20 of /var/www/foswiki11/lib/Assert.pm # once (21µs+0s) by File::Temp::Dir::BEGIN@1573 at line 1573 of File/Temp.pm # once (21µs+0s) by Foswiki::Plugins::PlantUMLPlugin::BEGIN@10 at line 10 of /var/www/foswiki11/lib/Foswiki/Plugins/PlantUMLPlugin.pm # once (20µs+0s) by Encode::BEGIN@48 at line 48 of Encode.pm # once (20µs+0s) by Cwd::BEGIN@171 at line 171 of Cwd.pm # once (19µs+0s) by Time::JulianDay::BEGIN@30 at line 30 of Time/JulianDay.pm # once (19µs+0s) by Foswiki::Request::BEGIN@38 at line 38 of /var/www/foswiki11/lib/Foswiki/Request.pm # once (19µs+0s) by File::Temp::BEGIN@15 at line 15 of File/Temp.pm # once (18µs+0s) by File::Path::BEGIN@6 at line 6 of File/Path.pm # once (13µs+0s) by Crypt::PasswdMD5::BEGIN@65 at line 65 of Crypt/PasswdMD5.pm # once (10µs+0s) by File::Temp::BEGIN@16 at line 16 of File/Temp.pm
sub import {
298053µs my $pkg = shift;
3080241µs my $callpkg = caller($ExportLevel);
31
328041µs if ($pkg eq "Exporter" and @_ and $_[0] eq "import") {
33 *{$callpkg."::import"} = \&import;
34 return;
35 }
36
37 # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
3880179µs my $exports = \@{"$pkg\::EXPORT"};
39 # But, avoid creating things if they don't exist, which saves a couple of
40 # hundred bytes per package processed.
4180142µs my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"};
428051µs return export $pkg, $callpkg, @_
43 if $Verbose or $Debug or $fail && @$fail > 1;
448077µs my $export_cache = ($Cache{$pkg} ||= {});
458097µs my $args = @_ or @_ = @$exports;
46
478038µs if ($args and not %$export_cache) {
48 s/^&//, $export_cache->{$_} = 1
4914721µs foreach (@$exports, @{"$pkg\::EXPORT_OK"});
50 }
518012µs my $heavy;
52 # Try very hard not to use {} and hence have to enter scope on the foreach
53 # We bomb out of the loop with last as soon as heavy is set.
548043µs if ($args or $fail) {
55 ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
56 or $fail and @$fail and $_ eq $fail->[0])) and last
5761323µs foreach (@_);
58 } else {
59 ($heavy = /\W/) and last
601980µs foreach (@_);
61 }
6280173µs26531µs return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
# spent 531µs making 26 calls to Exporter::export, avg 20µs/call
63 local $SIG{__WARN__} =
645475µs sub {require Carp; &Carp::carp} if not $SIG{__WARN__};
65 # shortcut for the common case of no type character
66541.17ms *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
67}
68
69# Default methods
70
71sub export_fail {
72 my $self = shift;
73 @_;
74}
75
76# Unfortunately, caller(1)[3] "does not work" if the caller is aliased as
77# *name = \&foo. Thus the need to create a lot of identical subroutines
78# Otherwise we could have aliased them to export().
79
80sub export_to_level {
81 goto &{as_heavy()};
82}
83
84
# spent 2.51ms (25µs+2.49) within Exporter::export_tags which was called 2 times, avg 1.26ms/call: # once (17µs+2.47ms) by Foswiki::BEGIN@46 at line 30 of /var/www/foswiki11/lib/Assert.pm # once (8µs+13µs) by Foswiki::Sandbox::BEGIN@37 at line 72 of File/Temp.pm
sub export_tags {
85225µs42.54ms goto &{as_heavy()};
# spent 2.49ms making 2 calls to Exporter::as_heavy, avg 1.24ms/call # spent 57µs making 2 calls to Exporter::Heavy::heavy_export_tags, avg 29µs/call
86}
87
88sub export_ok_tags {
89 goto &{as_heavy()};
90}
91
92sub require_version {
93 goto &{as_heavy()};
94}
95
9619µs1;
97__END__