Profile of File/Glob.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/File/Glob.pm
Statements | Executed 15 statements in 392µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 10µs | 12µs | File::Glob::::BEGIN@3File::Glob::BEGIN@3
1 | 1 | 1 | 7µs | 9µs | File::Glob::::BEGIN@54File::Glob::BEGIN@54
1 | 1 | 1 | 4µs | 24µs | File::Glob::::BEGIN@50File::Glob::BEGIN@50
1 | 1 | 1 | 600ns | 600ns | File::Glob::::GLOB_CSHFile::Glob::GLOB_CSH (xsub)
0 | 0 | 0 | 0s | 0s | File::Glob::::importFile::Glob::import

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package File::Glob;
2 |  |  |  |  |
3 | 2 | 108µs | 2 | 13µs | # spent 12µs (10+2) within File::Glob::BEGIN@3 which was called: # once (10µs+2µs) by XML::Twig::BEGIN@1125 at line 3 use strict; # spent 12µs making 1 call to File::Glob::BEGIN@3 # spent 2µs making 1 call to strict::import
4 |  |  |  |  | our($DEFAULT_FLAGS);
5 |  |  |  |  |
6 | 1 | 300ns |  |  | require 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 |  |  |  |  |
11 | 1 | 2µs |  |  | our %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 |  |  |  |  | );
32 | 1 | 1µs |  |  | $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}];
33 |  |  |  |  |
34 | 1 | 2µs |  |  | our @EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
35 |  |  |  |  |
36 | 1 | 100ns |  |  | our $VERSION = '1.40';
37 |  |  |  |  |
38 |  |  |  |  | sub import {
39 |  |  |  |  | require Exporter;
40 |  |  |  |  | local $Exporter::ExportLevel = $Exporter::ExportLevel + 1;
41 |  |  |  |  | Exporter::import(grep {
42 |  |  |  |  | my $passthrough;
43 |  |  |  |  | if ($_ eq ':case') {
44 |  |  |  |  | $DEFAULT_FLAGS &= ~GLOB_NOCASE()
45 |  |  |  |  | }
46 |  |  |  |  | elsif ($_ eq ':nocase') {
47 |  |  |  |  | $DEFAULT_FLAGS |= GLOB_NOCASE();
48 |  |  |  |  | }
49 |  |  |  |  | elsif ($_ eq ':globally') {
50 | 2 | 31µs | 2 | 44µs | # spent 24µs (4+20) within File::Glob::BEGIN@50 which was called: # once (4µs+20µs) by XML::Twig::BEGIN@1125 at line 50 no warnings 'redefine'; # spent 24µs making 1 call to File::Glob::BEGIN@50 # spent 20µs making 1 call to warnings::unimport
51 |  |  |  |  | *CORE::GLOBAL::glob = \&File::Glob::csh_glob;
52 |  |  |  |  | }
53 |  |  |  |  | elsif ($_ eq ':bsd_glob') {
54 | 2 | 101µs | 2 | 11µs | # spent 9µs (7+2) within File::Glob::BEGIN@54 which was called: # once (7µs+2µs) by XML::Twig::BEGIN@1125 at line 54 no strict; *{caller."::glob"} = \&bsd_glob_override; # spent 9µs making 1 call to File::Glob::BEGIN@54 # spent 2µs making 1 call to strict::unimport
55 |  |  |  |  | $passthrough = 1;
56 |  |  |  |  | }
57 |  |  |  |  | else {
58 |  |  |  |  | $passthrough = 1;
59 |  |  |  |  | }
60 |  |  |  |  | $passthrough;
61 |  |  |  |  | } @_);
62 |  |  |  |  | }
63 |  |  |  |  |
64 | 1 | 132µs | 1 | 126µs | XSLoader::load(); # spent 126µs making 1 call to XSLoader::load
65 |  |  |  |  |
66 | 1 | 3µs | 1 | 600ns | $DEFAULT_FLAGS = GLOB_CSH(); # spent 600ns making 1 call to File::Glob::GLOB_CSH
67 | 1 | 3µs | 1 | 2µs | if ($^O =~ /^(?:MSWin32|VMS|os2|riscos)$/) { # spent 2µs making 1 call to CORE::match
68 |  |  |  |  | $DEFAULT_FLAGS |= GLOB_NOCASE();
69 |  |  |  |  | }
70 |  |  |  |  |
71 | 1 | 8µs |  |  | 1;
72 |  |  |  |  | __END__
|  |  |  |  | # spent 600ns within File::Glob::GLOB_CSH which was called: # once (600ns+0s) by XML::Twig::BEGIN@1125 at line 66 sub File::Glob::GLOB_CSH; # xsub