Profile of Errno.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For t/app_dpath.t
Run on Tue Jun 5 15:25:28 2012
Reported on Tue Jun 5 15:26:05 2012

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi/Errno.pm
Statements | Executed 285 statements in 4.42ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 929µs | 929µs | Errno::::BEGIN@21Errno::BEGIN@21
1 | 1 | 1 | 72µs | 127µs | Errno::::BEGIN@8Errno::BEGIN@8
1 | 1 | 1 | 31µs | 31µs | Errno::::TIEHASHErrno::TIEHASH
1 | 1 | 1 | 29µs | 43µs | Errno::::BEGIN@9Errno::BEGIN@9
0 | 0 | 0 | 0s | 0s | Errno::::EXISTSErrno::EXISTS
0 | 0 | 0 | 0s | 0s | Errno::::FETCHErrno::FETCH
0 | 0 | 0 | 0s | 0s | Errno::::FIRSTKEYErrno::FIRSTKEY
0 | 0 | 0 | 0s | 0s | Errno::::NEXTKEYErrno::NEXTKEY
0 | 0 | 0 | 0s | 0s | Errno::::STOREErrno::STORE

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

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | # -*- buffer-read-only: t -*-
2 |  |  |  |  | #
3 |  |  |  |  | # This file is auto-generated. ***ANY*** changes here will be lost
4 |  |  |  |  | #
5 |  |  |  |  |
6 |  |  |  |  | package Errno;
7 | 1 | 2µs |  |  | require Exporter;
8 | 2 | 110µs | 2 | 182µs | # spent 127µs (72+55) within Errno::BEGIN@8 which was called: # once (72µs+55µs) by English::BEGIN@187 at line 8 use Config; # spent 127µs making 1 call to Errno::BEGIN@8 # spent 55µs making 1 call to Config::import
9 | 2 | 1.77ms | 2 | 57µs | # spent 43µs (29+14) within Errno::BEGIN@9 which was called: # once (29µs+14µs) by English::BEGIN@187 at line 9 use strict; # spent 43µs making 1 call to Errno::BEGIN@9 # spent 14µs making 1 call to strict::import
10 |  |  |  |  |
11 | 1 | 58µs | 2 | 32µs | "$Config{'archname'}-$Config{'osvers'}" eq # spent 32µs making 2 calls to Config::FETCH, avg 16µs/call
12 |  |  |  |  | "x86_64-linux-thread-multi-3.0.0-1-amd64" or
13 |  |  |  |  | die "Errno architecture (x86_64-linux-thread-multi-3.0.0-1-amd64) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
14 |  |  |  |  |
15 | 1 | 2µs |  |  | our $VERSION = "1.13";
16 | 1 | 108µs |  |  | $VERSION = eval $VERSION; # spent 10µs executing statements in string eval
17 | 1 | 27µs |  |  | our @ISA = 'Exporter';
18 |  |  |  |  |
19 | 1 | 1µs |  |  | my %err;
20 |  |  |  |  |
21 |  |  |  |  | # spent 929µs within Errno::BEGIN@21 which was called: # once (929µs+0s) by English::BEGIN@187 at line 177 BEGIN {
22 | 2 | 292µs |  |  | %err = (
23 |  |  |  |  | EPERM => 1,
24 |  |  |  |  | ENOENT => 2,
25 |  |  |  |  | ESRCH => 3,
26 |  |  |  |  | EINTR => 4,
27 |  |  |  |  | EIO => 5,
28 |  |  |  |  | ENXIO => 6,
29 |  |  |  |  | E2BIG => 7,
30 |  |  |  |  | ENOEXEC => 8,
31 |  |  |  |  | EBADF => 9,
32 |  |  |  |  | ECHILD => 10,
33 |  |  |  |  | EWOULDBLOCK => 11,
34 |  |  |  |  | EAGAIN => 11,
35 |  |  |  |  | ENOMEM => 12,
36 |  |  |  |  | EACCES => 13,
37 |  |  |  |  | EFAULT => 14,
38 |  |  |  |  | ENOTBLK => 15,
39 |  |  |  |  | EBUSY => 16,
40 |  |  |  |  | EEXIST => 17,
41 |  |  |  |  | EXDEV => 18,
42 |  |  |  |  | ENODEV => 19,
43 |  |  |  |  | ENOTDIR => 20,
44 |  |  |  |  | EISDIR => 21,
45 |  |  |  |  | EINVAL => 22,
46 |  |  |  |  | ENFILE => 23,
47 |  |  |  |  | EMFILE => 24,
48 |  |  |  |  | ENOTTY => 25,
49 |  |  |  |  | ETXTBSY => 26,
50 |  |  |  |  | EFBIG => 27,
51 |  |  |  |  | ENOSPC => 28,
52 |  |  |  |  | ESPIPE => 29,
53 |  |  |  |  | EROFS => 30,
54 |  |  |  |  | EMLINK => 31,
55 |  |  |  |  | EPIPE => 32,
56 |  |  |  |  | EDOM => 33,
57 |  |  |  |  | ERANGE => 34,
58 |  |  |  |  | EDEADLOCK => 35,
59 |  |  |  |  | EDEADLK => 35,
60 |  |  |  |  | ENAMETOOLONG => 36,
61 |  |  |  |  | ENOLCK => 37,
62 |  |  |  |  | ENOSYS => 38,
63 |  |  |  |  | ENOTEMPTY => 39,
64 |  |  |  |  | ELOOP => 40,
65 |  |  |  |  | ENOMSG => 42,
66 |  |  |  |  | EIDRM => 43,
67 |  |  |  |  | ECHRNG => 44,
68 |  |  |  |  | EL2NSYNC => 45,
69 |  |  |  |  | EL3HLT => 46,
70 |  |  |  |  | EL3RST => 47,
71 |  |  |  |  | ELNRNG => 48,
72 |  |  |  |  | EUNATCH => 49,
73 |  |  |  |  | ENOCSI => 50,
74 |  |  |  |  | EL2HLT => 51,
75 |  |  |  |  | EBADE => 52,
76 |  |  |  |  | EBADR => 53,
77 |  |  |  |  | EXFULL => 54,
78 |  |  |  |  | ENOANO => 55,
79 |  |  |  |  | EBADRQC => 56,
80 |  |  |  |  | EBADSLT => 57,
81 |  |  |  |  | EBFONT => 59,
82 |  |  |  |  | ENOSTR => 60,
83 |  |  |  |  | ENODATA => 61,
84 |  |  |  |  | ETIME => 62,
85 |  |  |  |  | ENOSR => 63,
86 |  |  |  |  | ENONET => 64,
87 |  |  |  |  | ENOPKG => 65,
88 |  |  |  |  | EREMOTE => 66,
89 |  |  |  |  | ENOLINK => 67,
90 |  |  |  |  | EADV => 68,
91 |  |  |  |  | ESRMNT => 69,
92 |  |  |  |  | ECOMM => 70,
93 |  |  |  |  | EPROTO => 71,
94 |  |  |  |  | EMULTIHOP => 72,
95 |  |  |  |  | EDOTDOT => 73,
96 |  |  |  |  | EBADMSG => 74,
97 |  |  |  |  | EOVERFLOW => 75,
98 |  |  |  |  | ENOTUNIQ => 76,
99 |  |  |  |  | EBADFD => 77,
100 |  |  |  |  | EREMCHG => 78,
101 |  |  |  |  | ELIBACC => 79,
102 |  |  |  |  | ELIBBAD => 80,
103 |  |  |  |  | ELIBSCN => 81,
104 |  |  |  |  | ELIBMAX => 82,
105 |  |  |  |  | ELIBEXEC => 83,
106 |  |  |  |  | EILSEQ => 84,
107 |  |  |  |  | ERESTART => 85,
108 |  |  |  |  | ESTRPIPE => 86,
109 |  |  |  |  | EUSERS => 87,
110 |  |  |  |  | ENOTSOCK => 88,
111 |  |  |  |  | EDESTADDRREQ => 89,
112 |  |  |  |  | EMSGSIZE => 90,
113 |  |  |  |  | EPROTOTYPE => 91,
114 |  |  |  |  | ENOPROTOOPT => 92,
115 |  |  |  |  | EPROTONOSUPPORT => 93,
116 |  |  |  |  | ESOCKTNOSUPPORT => 94,
117 |  |  |  |  | ENOTSUP => 95,
118 |  |  |  |  | EOPNOTSUPP => 95,
119 |  |  |  |  | EPFNOSUPPORT => 96,
120 |  |  |  |  | EAFNOSUPPORT => 97,
121 |  |  |  |  | EADDRINUSE => 98,
122 |  |  |  |  | EADDRNOTAVAIL => 99,
123 |  |  |  |  | ENETDOWN => 100,
124 |  |  |  |  | ENETUNREACH => 101,
125 |  |  |  |  | ENETRESET => 102,
126 |  |  |  |  | ECONNABORTED => 103,
127 |  |  |  |  | ECONNRESET => 104,
128 |  |  |  |  | ENOBUFS => 105,
129 |  |  |  |  | EISCONN => 106,
130 |  |  |  |  | ENOTCONN => 107,
131 |  |  |  |  | ESHUTDOWN => 108,
132 |  |  |  |  | ETOOMANYREFS => 109,
133 |  |  |  |  | ETIMEDOUT => 110,
134 |  |  |  |  | ECONNREFUSED => 111,
135 |  |  |  |  | EHOSTDOWN => 112,
136 |  |  |  |  | EHOSTUNREACH => 113,
137 |  |  |  |  | EALREADY => 114,
138 |  |  |  |  | EINPROGRESS => 115,
139 |  |  |  |  | ESTALE => 116,
140 |  |  |  |  | EUCLEAN => 117,
141 |  |  |  |  | ENOTNAM => 118,
142 |  |  |  |  | ENAVAIL => 119,
143 |  |  |  |  | EISNAM => 120,
144 |  |  |  |  | EREMOTEIO => 121,
145 |  |  |  |  | EDQUOT => 122,
146 |  |  |  |  | ENOMEDIUM => 123,
147 |  |  |  |  | EMEDIUMTYPE => 124,
148 |  |  |  |  | ECANCELED => 125,
149 |  |  |  |  | ENOKEY => 126,
150 |  |  |  |  | EKEYEXPIRED => 127,
151 |  |  |  |  | EKEYREVOKED => 128,
152 |  |  |  |  | EKEYREJECTED => 129,
153 |  |  |  |  | EOWNERDEAD => 130,
154 |  |  |  |  | ENOTRECOVERABLE => 131,
155 |  |  |  |  | ERFKILL => 132,
156 |  |  |  |  | EHWPOISON => 133,
157 |  |  |  |  | );
158 |  |  |  |  | # Generate proxy constant subroutines for all the values.
159 |  |  |  |  | # Well, almost all the values. Unfortunately we can't assume that at this
160 |  |  |  |  | # point that our symbol table is empty, as code such as if the parser has
161 |  |  |  |  | # seen code such as C<exists &Errno::EINVAL>, it will have created the
162 |  |  |  |  | # typeglob.
163 |  |  |  |  | # Doing this before defining @EXPORT_OK etc means that even if a platform is
164 |  |  |  |  | # crazy enough to define EXPORT_OK as an error constant, everything will
165 |  |  |  |  | # still work, because the parser will upgrade the PCS to a real typeglob.
166 |  |  |  |  | # We rely on the subroutine definitions below to update the internal caches.
167 |  |  |  |  | # Don't use %each, as we don't want a copy of the value.
168 |  |  |  |  | foreach my $name (keys %err) {
169 | 268 | 642µs |  |  | if ($Errno::{$name}) {
170 |  |  |  |  | # We expect this to be reached fairly rarely, so take an approach
171 |  |  |  |  | # which uses the least compile time effort in the common case:
172 |  |  |  |  | eval "sub $name() { $err{$name} }; 1" or die $@;
173 |  |  |  |  | } else {
174 |  |  |  |  | $Errno::{$name} = \$err{$name};
175 |  |  |  |  | }
176 |  |  |  |  | }
177 | 1 | 1.15ms | 1 | 929µs | } # spent 929µs making 1 call to Errno::BEGIN@21
178 |  |  |  |  |
179 | 1 | 89µs |  |  | our @EXPORT_OK = keys %err;
180 |  |  |  |  |
181 | 1 | 48µs |  |  | our %EXPORT_TAGS = (
182 |  |  |  |  | POSIX => [qw(
183 |  |  |  |  | E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
184 |  |  |  |  | EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
185 |  |  |  |  | EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
186 |  |  |  |  | EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
187 |  |  |  |  | EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
188 |  |  |  |  | ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
189 |  |  |  |  | ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
190 |  |  |  |  | EPFNOSUPPORT EPIPE EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART
191 |  |  |  |  | EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
192 |  |  |  |  | ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
193 |  |  |  |  | )]
194 |  |  |  |  | );
195 |  |  |  |  |
196 | 1 | 39µs |  |  | # spent 31µs within Errno::TIEHASH which was called: # once (31µs+0s) by English::BEGIN@187 at line 226 sub TIEHASH { bless \%err }
197 |  |  |  |  |
198 |  |  |  |  | sub FETCH {
199 |  |  |  |  | my (undef, $errname) = @_;
200 |  |  |  |  | return "" unless exists $err{$errname};
201 |  |  |  |  | my $errno = $err{$errname};
202 |  |  |  |  | return $errno == $! ? $errno : 0;
203 |  |  |  |  | }
204 |  |  |  |  |
205 |  |  |  |  | sub STORE {
206 |  |  |  |  | require Carp;
207 |  |  |  |  | Carp::confess("ERRNO hash is read only!");
208 |  |  |  |  | }
209 |  |  |  |  |
210 | 1 | 10µs |  |  | *CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space
211 |  |  |  |  |
212 |  |  |  |  | sub NEXTKEY {
213 |  |  |  |  | each %err;
214 |  |  |  |  | }
215 |  |  |  |  |
216 |  |  |  |  | sub FIRSTKEY {
217 |  |  |  |  | my $s = scalar keys %err; # initialize iterator
218 |  |  |  |  | each %err;
219 |  |  |  |  | }
220 |  |  |  |  |
221 |  |  |  |  | sub EXISTS {
222 |  |  |  |  | my (undef, $errname) = @_;
223 |  |  |  |  | exists $err{$errname};
224 |  |  |  |  | }
225 |  |  |  |  |
226 | 1 | 72µs | 1 | 31µs | tie %!, __PACKAGE__; # Returns an object, objects are true. # spent 31µs making 1 call to Errno::TIEHASH
227 |  |  |  |  |
228 |  |  |  |  | __END__