← Index
NYTProf Performance Profile   « line view »
For ../prof.pl
  Run on Wed Dec 14 15:33:55 2022
Reported on Wed Dec 14 15:40:03 2022

Filename/Users/ether/perl5/perlbrew/perls/36.0/lib/5.36.0/darwin-2level/File/Glob.pm
StatementsExecuted 26 statements in 1.76ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11123µs25µsFile::Glob::::BEGIN@3File::Glob::BEGIN@3
11114µs18µsFile::Glob::::BEGIN@54File::Glob::BEGIN@54
11111µs216µsFile::Glob::::importFile::Glob::import
1117µs28µsFile::Glob::::BEGIN@50File::Glob::BEGIN@50
1113µs3µsFile::Glob::::CORE:matchFile::Glob::CORE:match (opcode)
2221µs1µsFile::Glob::::GLOB_CSHFile::Glob::GLOB_CSH (xsub)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package File::Glob;
2
32171µs227µs
# spent 25µs (23+2) within File::Glob::BEGIN@3 which was called: # once (23µs+2µs) by File::GlobMapper::BEGIN@10 at line 3
use strict;
# spent 25µs making 1 call to File::Glob::BEGIN@3 # spent 2µs making 1 call to strict::import
4our($DEFAULT_FLAGS);
5
611µsrequire XSLoader;
7
8# NOTE: The glob() export is only here for compatibility with 5.6.0.
9# csh_glob() should not be used directly, unless you know what you're doing.
10
1113µsour %EXPORT_TAGS = (
12 'glob' => [ qw(
13 GLOB_ABEND
14 GLOB_ALPHASORT
15 GLOB_ALTDIRFUNC
16 GLOB_BRACE
17 GLOB_CSH
18 GLOB_ERR
19 GLOB_ERROR
20 GLOB_LIMIT
21 GLOB_MARK
22 GLOB_NOCASE
23 GLOB_NOCHECK
24 GLOB_NOMAGIC
25 GLOB_NOSORT
26 GLOB_NOSPACE
27 GLOB_QUOTE
28 GLOB_TILDE
29 bsd_glob
30 ) ],
31);
3212µs$EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}];
33
3412µsour @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
35
3610sour $VERSION = '1.37';
37
38
# spent 216µs (11+205) within File::Glob::import which was called: # once (11µs+205µs) by File::GlobMapper::BEGIN@10 at line 19 of File/GlobMapper.pm
sub import {
3911µs require Exporter;
4011µs local $Exporter::ExportLevel = $Exporter::ExportLevel + 1;
41 Exporter::import(grep {
4237µs1205µs my $passthrough;
# spent 205µs making 1 call to Exporter::import
4322µs if ($_ eq ':case') {
44 $DEFAULT_FLAGS &= ~GLOB_NOCASE()
45 }
46 elsif ($_ eq ':nocase') {
47 $DEFAULT_FLAGS |= GLOB_NOCASE();
48 }
49 elsif ($_ eq ':globally') {
502214µs249µs
# spent 28µs (7+21) within File::Glob::BEGIN@50 which was called: # once (7µs+21µs) by File::GlobMapper::BEGIN@10 at line 50
no warnings 'redefine';
# spent 28µs making 1 call to File::Glob::BEGIN@50 # spent 21µs making 1 call to warnings::unimport
51 *CORE::GLOBAL::glob = \&File::Glob::csh_glob;
52 }
53 elsif ($_ eq ':bsd_glob') {
542210µs222µs
# spent 18µs (14+4) within File::Glob::BEGIN@54 which was called: # once (14µs+4µs) by File::GlobMapper::BEGIN@10 at line 54
no strict; *{caller."::glob"} = \&bsd_glob_override;
# spent 18µs making 1 call to File::Glob::BEGIN@54 # spent 4µs making 1 call to strict::unimport
55 $passthrough = 1;
56 }
57 else {
5820s $passthrough = 1;
59 }
6020s $passthrough;
61 } @_);
62}
63
6411.12ms11.11msXSLoader::load();
# spent 1.11ms making 1 call to XSLoader::load
65
6616µs11µs$DEFAULT_FLAGS = GLOB_CSH();
# spent 1µs making 1 call to File::Glob::GLOB_CSH
6718µs13µsif ($^O =~ /^(?:MSWin32|VMS|os2|riscos)$/) {
# spent 3µs making 1 call to File::Glob::CORE:match
68 $DEFAULT_FLAGS |= GLOB_NOCASE();
69}
70
71115µs1;
72__END__
 
# spent 3µs within File::Glob::CORE:match which was called: # once (3µs+0s) by File::GlobMapper::BEGIN@10 at line 67
sub File::Glob::CORE:match; # opcode
# spent 1µs within File::Glob::GLOB_CSH which was called 2 times, avg 500ns/call: # once (1µs+0s) by File::GlobMapper::BEGIN@10 at line 66 # once (0s+0s) by File::GlobMapper::BEGIN@10 at line 20 of File/GlobMapper.pm
sub File::Glob::GLOB_CSH; # xsub