Profile of /usr/local/lib/perl5/5.10.1/darwin-2level/Errno.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For 01.HTTP.t
Run on Tue May 4 15:25:55 2010
Reported on Tue May 4 15:26:05 2010

File | /usr/local/lib/perl5/5.10.1/darwin-2level/Errno.pm
Statements Executed | 52
Statement Execution Time | 1.94ms

Subroutines — ordered by exclusive time
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
4 | 2 | 1 | 101µs | 112µs | Errno::::FETCHErrno::FETCH
1 | 1 | 1 | 21µs | 48µs | Errno::::BEGIN@8Errno::BEGIN@8
1 | 1 | 1 | 15µs | 15µs | Errno::::BEGIN@7Errno::BEGIN@7
1 | 1 | 1 | 12µs | 33µs | Errno::::BEGIN@162Errno::BEGIN@162
1 | 1 | 1 | 9µs | 12µs | Errno::::BEGIN@9Errno::BEGIN@9
1 | 1 | 1 | 8µs | 8µs | Errno::::TIEHASHErrno::TIEHASH
2 | 1 | 2 | 6µs | 6µs | Errno::::EISCONNErrno::EISCONN (xsub)
2 | 1 | 2 | 6µs | 6µs | Errno::::EINPROGRESSErrno::EINPROGRESS (xsub)
0 | 0 | 0 | 0s | 0s | Errno::::EXISTSErrno::EXISTS
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 |  |  |  |  | #
2 |  |  |  |  | # This file is auto-generated. ***ANY*** changes here will be lost
3 |  |  |  |  | #
4 |  |  |  |  |
5 |  |  |  |  | package Errno;
6 | 1 | 800ns |  |  | our (@EXPORT_OK,%EXPORT_TAGS,@ISA,$VERSION,%errno,$AUTOLOAD);
7 | 3 | 36µs | 1 | 15µs | # spent 15µs within Errno::BEGIN@7 which was called # once (15µs+0s) by LWP::Protocol::http::BEGIN@216 at line 7 use Exporter (); # spent 15µs making 1 call to Errno::BEGIN@7
8 | 3 | 33µs | 2 | 75µs | # spent 48µs (21+27) within Errno::BEGIN@8 which was called # once (21µs+27µs) by LWP::Protocol::http::BEGIN@216 at line 8 use Config; # spent 48µs making 1 call to Errno::BEGIN@8 # spent 27µs making 1 call to Config::import
9 | 3 | 1.29ms | 2 | 16µs | # spent 12µs (9+4) within Errno::BEGIN@9 which was called # once (9µs+4µs) by LWP::Protocol::http::BEGIN@216 at line 9 use strict; # spent 12µs making 1 call to Errno::BEGIN@9 # spent 4µs making 1 call to strict::import
10 |  |  |  |  |
11 | 1 | 19µs | 2 | 9µs | "$Config{'archname'}-$Config{'osvers'}" eq # spent 9µs making 2 calls to Config::FETCH, avg 5µs/call
12 |  |  |  |  | "darwin-2level-10.2.0" or
13 |  |  |  |  | die "Errno architecture (darwin-2level-10.2.0) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
14 |  |  |  |  |
15 | 1 | 400ns |  |  | $VERSION = "1.11";
16 | 1 | 21µs |  |  | $VERSION = eval $VERSION;
17 | 1 | 10µs |  |  | @ISA = qw(Exporter);
18 |  |  |  |  |
19 | 1 | 33µs |  |  | @EXPORT_OK = qw(EBADMACHO ENOMSG ELAST EROFS ENOTSUP ESHUTDOWN EAUTH
20 |  |  |  |  | EMULTIHOP EPROTONOSUPPORT ENFILE ENOLCK EADDRINUSE ECONNABORTED EBADF
21 |  |  |  |  | ECANCELED ENOTBLK EDEADLK ENOLINK ENOTDIR ETIME EINVAL ENOTTY EXDEV
22 |  |  |  |  | ELOOP ECONNREFUSED ENOSTR EISCONN EOVERFLOW EFBIG ENOENT EPFNOSUPPORT
23 |  |  |  |  | ECONNRESET EWOULDBLOCK EBADMSG EDOM EPROGMISMATCH EMSGSIZE ENOPOLICY
24 |  |  |  |  | ERPCMISMATCH ENOSPC EIO ENOTSOCK EDESTADDRREQ EIDRM ERANGE EINPROGRESS
25 |  |  |  |  | ENOBUFS EADDRNOTAVAIL EAFNOSUPPORT ENOSYS EINTR EPROCUNAVAIL EHOSTDOWN
26 |  |  |  |  | EREMOTE EPWROFF EILSEQ ENOMEM ENOSR ENOTCONN ENETUNREACH EPIPE ESTALE
27 |  |  |  |  | EPROGUNAVAIL ENODATA EDQUOT EUSERS EOPNOTSUPP EPROTO EFTYPE ESPIPE
28 |  |  |  |  | EALREADY ENAMETOOLONG EMFILE EACCES ENOEXEC EISDIR EPROCLIM EBUSY
29 |  |  |  |  | EBADEXEC E2BIG EPERM EEXIST ETOOMANYREFS ESHLIBVERS ESOCKTNOSUPPORT
30 |  |  |  |  | ETIMEDOUT EDEVERR EBADARCH ENOATTR ENXIO ESRCH EBADRPC EFAULT ENODEV
31 |  |  |  |  | ETXTBSY EAGAIN EMLINK ENOPROTOOPT ECHILD ENETDOWN EHOSTUNREACH
32 |  |  |  |  | EPROTOTYPE ENEEDAUTH ENETRESET ENOTEMPTY);
33 |  |  |  |  |
34 | 1 | 22µs |  |  | %EXPORT_TAGS = (
35 |  |  |  |  | POSIX => [qw(
36 |  |  |  |  | E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
37 |  |  |  |  | EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
38 |  |  |  |  | EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
39 |  |  |  |  | EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
40 |  |  |  |  | EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
41 |  |  |  |  | ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
42 |  |  |  |  | ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
43 |  |  |  |  | EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE
44 |  |  |  |  | EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
45 |  |  |  |  | ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
46 |  |  |  |  | )]
47 |  |  |  |  | );
48 |  |  |  |  |
49 |  |  |  |  | sub EPERM () { 1 }
50 |  |  |  |  | sub ENOENT () { 2 }
51 |  |  |  |  | sub ESRCH () { 3 }
52 |  |  |  |  | sub EINTR () { 4 }
53 |  |  |  |  | sub EIO () { 5 }
54 |  |  |  |  | sub ENXIO () { 6 }
55 |  |  |  |  | sub E2BIG () { 7 }
56 |  |  |  |  | sub ENOEXEC () { 8 }
57 |  |  |  |  | sub EBADF () { 9 }
58 |  |  |  |  | sub ECHILD () { 10 }
59 |  |  |  |  | sub EDEADLK () { 11 }
60 |  |  |  |  | sub ENOMEM () { 12 }
61 |  |  |  |  | sub EACCES () { 13 }
62 |  |  |  |  | sub EFAULT () { 14 }
63 |  |  |  |  | sub ENOTBLK () { 15 }
64 |  |  |  |  | sub EBUSY () { 16 }
65 |  |  |  |  | sub EEXIST () { 17 }
66 |  |  |  |  | sub EXDEV () { 18 }
67 |  |  |  |  | sub ENODEV () { 19 }
68 |  |  |  |  | sub ENOTDIR () { 20 }
69 |  |  |  |  | sub EISDIR () { 21 }
70 |  |  |  |  | sub EINVAL () { 22 }
71 |  |  |  |  | sub ENFILE () { 23 }
72 |  |  |  |  | sub EMFILE () { 24 }
73 |  |  |  |  | sub ENOTTY () { 25 }
74 |  |  |  |  | sub ETXTBSY () { 26 }
75 |  |  |  |  | sub EFBIG () { 27 }
76 |  |  |  |  | sub ENOSPC () { 28 }
77 |  |  |  |  | sub ESPIPE () { 29 }
78 |  |  |  |  | sub EROFS () { 30 }
79 |  |  |  |  | sub EMLINK () { 31 }
80 |  |  |  |  | sub EPIPE () { 32 }
81 |  |  |  |  | sub EDOM () { 33 }
82 |  |  |  |  | sub ERANGE () { 34 }
83 |  |  |  |  | sub EWOULDBLOCK () { 35 }
84 |  |  |  |  | sub EAGAIN () { 35 }
85 |  |  |  |  | sub EINPROGRESS () { 36 }
86 |  |  |  |  | sub EALREADY () { 37 }
87 |  |  |  |  | sub ENOTSOCK () { 38 }
88 |  |  |  |  | sub EDESTADDRREQ () { 39 }
89 |  |  |  |  | sub EMSGSIZE () { 40 }
90 |  |  |  |  | sub EPROTOTYPE () { 41 }
91 |  |  |  |  | sub ENOPROTOOPT () { 42 }
92 |  |  |  |  | sub EPROTONOSUPPORT () { 43 }
93 |  |  |  |  | sub ESOCKTNOSUPPORT () { 44 }
94 |  |  |  |  | sub ENOTSUP () { 45 }
95 |  |  |  |  | sub EPFNOSUPPORT () { 46 }
96 |  |  |  |  | sub EAFNOSUPPORT () { 47 }
97 |  |  |  |  | sub EADDRINUSE () { 48 }
98 |  |  |  |  | sub EADDRNOTAVAIL () { 49 }
99 |  |  |  |  | sub ENETDOWN () { 50 }
100 |  |  |  |  | sub ENETUNREACH () { 51 }
101 |  |  |  |  | sub ENETRESET () { 52 }
102 |  |  |  |  | sub ECONNABORTED () { 53 }
103 |  |  |  |  | sub ECONNRESET () { 54 }
104 |  |  |  |  | sub ENOBUFS () { 55 }
105 |  |  |  |  | sub EISCONN () { 56 }
106 |  |  |  |  | sub ENOTCONN () { 57 }
107 |  |  |  |  | sub ESHUTDOWN () { 58 }
108 |  |  |  |  | sub ETOOMANYREFS () { 59 }
109 |  |  |  |  | sub ETIMEDOUT () { 60 }
110 |  |  |  |  | sub ECONNREFUSED () { 61 }
111 |  |  |  |  | sub ELOOP () { 62 }
112 |  |  |  |  | sub ENAMETOOLONG () { 63 }
113 |  |  |  |  | sub EHOSTDOWN () { 64 }
114 |  |  |  |  | sub EHOSTUNREACH () { 65 }
115 |  |  |  |  | sub ENOTEMPTY () { 66 }
116 |  |  |  |  | sub EPROCLIM () { 67 }
117 |  |  |  |  | sub EUSERS () { 68 }
118 |  |  |  |  | sub EDQUOT () { 69 }
119 |  |  |  |  | sub ESTALE () { 70 }
120 |  |  |  |  | sub EREMOTE () { 71 }
121 |  |  |  |  | sub EBADRPC () { 72 }
122 |  |  |  |  | sub ERPCMISMATCH () { 73 }
123 |  |  |  |  | sub EPROGUNAVAIL () { 74 }
124 |  |  |  |  | sub EPROGMISMATCH () { 75 }
125 |  |  |  |  | sub EPROCUNAVAIL () { 76 }
126 |  |  |  |  | sub ENOLCK () { 77 }
127 |  |  |  |  | sub ENOSYS () { 78 }
128 |  |  |  |  | sub EFTYPE () { 79 }
129 |  |  |  |  | sub EAUTH () { 80 }
130 |  |  |  |  | sub ENEEDAUTH () { 81 }
131 |  |  |  |  | sub EPWROFF () { 82 }
132 |  |  |  |  | sub EDEVERR () { 83 }
133 |  |  |  |  | sub EOVERFLOW () { 84 }
134 |  |  |  |  | sub EBADEXEC () { 85 }
135 |  |  |  |  | sub EBADARCH () { 86 }
136 |  |  |  |  | sub ESHLIBVERS () { 87 }
137 |  |  |  |  | sub EBADMACHO () { 88 }
138 |  |  |  |  | sub ECANCELED () { 89 }
139 |  |  |  |  | sub EIDRM () { 90 }
140 |  |  |  |  | sub ENOMSG () { 91 }
141 |  |  |  |  | sub EILSEQ () { 92 }
142 |  |  |  |  | sub ENOATTR () { 93 }
143 |  |  |  |  | sub EBADMSG () { 94 }
144 |  |  |  |  | sub EMULTIHOP () { 95 }
145 |  |  |  |  | sub ENODATA () { 96 }
146 |  |  |  |  | sub ENOLINK () { 97 }
147 |  |  |  |  | sub ENOSR () { 98 }
148 |  |  |  |  | sub ENOSTR () { 99 }
149 |  |  |  |  | sub EPROTO () { 100 }
150 |  |  |  |  | sub ETIME () { 101 }
151 |  |  |  |  | sub EOPNOTSUPP () { 102 }
152 |  |  |  |  | sub ELAST () { 103 }
153 |  |  |  |  | sub ENOPOLICY () { 103 }
154 |  |  |  |  |
155 | 1 | 12µs |  |  | # spent 8µs within Errno::TIEHASH which was called # once (8µs+0s) by LWP::Protocol::http::BEGIN@216 at line 198 sub TIEHASH { bless [] }
156 |  |  |  |  |
157 |  |  |  |  | # spent 112µs (101+11) within Errno::FETCH which was called 4 times, avg 28µs/call: # 2 times (52µs+6µs) by IO::Socket::connect at line 121 of IO/Socket.pm, avg 29µs/call # 2 times (49µs+5µs) by IO::Socket::connect at line 115 of IO/Socket.pm, avg 27µs/call sub FETCH {
158 | 28 | 115µs |  |  | my ($self, $errname) = @_;
159 |  |  |  |  | my $proto = prototype("Errno::$errname");
160 |  |  |  |  | my $errno = "";
161 |  |  |  |  | if (defined($proto) && $proto eq "") {
162 | 3 | 260µs | 2 | 55µs | # spent 33µs (12+22) within Errno::BEGIN@162 which was called # once (12µs+22µs) by LWP::Protocol::http::BEGIN@216 at line 162 no strict 'refs'; # spent 33µs making 1 call to Errno::BEGIN@162 # spent 22µs making 1 call to strict::unimport
163 |  |  |  |  | $errno = &$errname; # spent 6µs making 2 calls to Errno::EISCONN, avg 3µs/call # spent 6µs making 2 calls to Errno::EINPROGRESS, avg 3µs/call
164 |  |  |  |  | $errno = 0 unless $! == $errno;
165 |  |  |  |  | }
166 |  |  |  |  | return $errno;
167 |  |  |  |  | }
168 |  |  |  |  |
169 |  |  |  |  | sub STORE {
170 |  |  |  |  | require Carp;
171 |  |  |  |  | Carp::confess("ERRNO hash is read only!");
172 |  |  |  |  | }
173 |  |  |  |  |
174 | 1 | 1µs |  |  | *CLEAR = \&STORE;
175 | 1 | 400ns |  |  | *DELETE = \&STORE;
176 |  |  |  |  |
177 |  |  |  |  | sub NEXTKEY {
178 |  |  |  |  | my($k,$v);
179 |  |  |  |  | while(($k,$v) = each %Errno::) {
180 |  |  |  |  | my $proto = prototype("Errno::$k");
181 |  |  |  |  | last if (defined($proto) && $proto eq "");
182 |  |  |  |  | }
183 |  |  |  |  | $k
184 |  |  |  |  | }
185 |  |  |  |  |
186 |  |  |  |  | sub FIRSTKEY {
187 |  |  |  |  | my $s = scalar keys %Errno::; # initialize iterator
188 |  |  |  |  | goto &NEXTKEY;
189 |  |  |  |  | }
190 |  |  |  |  |
191 |  |  |  |  | sub EXISTS {
192 |  |  |  |  | my ($self, $errname) = @_;
193 |  |  |  |  | my $r = ref $errname;
194 |  |  |  |  | my $proto = !$r || $r eq 'CODE' ? prototype($errname) : undef;
195 |  |  |  |  | defined($proto) && $proto eq "";
196 |  |  |  |  | }
197 |  |  |  |  |
198 | 1 | 4µs | 1 | 8µs | tie %!, __PACKAGE__; # spent 8µs making 1 call to Errno::TIEHASH
199 |  |  |  |  |
200 | 1 | 81µs |  |  | 1;
201 |  |  |  |  | __END__
202 |  |  |  |  |
203 |  |  |  |  | =head1 NAME
204 |  |  |  |  |
205 |  |  |  |  | Errno - System errno constants
206 |  |  |  |  |
207 |  |  |  |  | =head1 SYNOPSIS
208 |  |  |  |  |
209 |  |  |  |  | use Errno qw(EINTR EIO :POSIX);
210 |  |  |  |  |
211 |  |  |  |  | =head1 DESCRIPTION
212 |  |  |  |  |
213 |  |  |  |  | C<Errno> defines and conditionally exports all the error constants
214 |  |  |  |  | defined in your system C<errno.h> include file. It has a single export
215 |  |  |  |  | tag, C<:POSIX>, which will export all POSIX defined error numbers.
216 |  |  |  |  |
217 |  |  |  |  | C<Errno> also makes C<%!> magic such that each element of C<%!> has a
218 |  |  |  |  | non-zero value only if C<$!> is set to that value. For example:
219 |  |  |  |  |
220 |  |  |  |  | use Errno;
221 |  |  |  |  |
222 |  |  |  |  | unless (open(FH, "/fangorn/spouse")) {
223 |  |  |  |  | if ($!{ENOENT}) {
224 |  |  |  |  | warn "Get a wife!\n";
225 |  |  |  |  | } else {
226 |  |  |  |  | warn "This path is barred: $!";
227 |  |  |  |  | }
228 |  |  |  |  | }
229 |  |  |  |  |
230 |  |  |  |  | If a specified constant C<EFOO> does not exist on the system, C<$!{EFOO}>
231 |  |  |  |  | returns C<"">. You may use C<exists $!{EFOO}> to check whether the
232 |  |  |  |  | constant is available on the system.
233 |  |  |  |  |
234 |  |  |  |  | =head1 CAVEATS
235 |  |  |  |  |
236 |  |  |  |  | Importing a particular constant may not be very portable, because the
237 |  |  |  |  | import will fail on platforms that do not have that constant. A more
238 |  |  |  |  | portable way to set C<$!> to a valid value is to use:
239 |  |  |  |  |
240 |  |  |  |  | if (exists &Errno::EFOO) {
241 |  |  |  |  | $! = &Errno::EFOO;
242 |  |  |  |  | }
243 |  |  |  |  |
244 |  |  |  |  | =head1 AUTHOR
245 |  |  |  |  |
246 |  |  |  |  | Graham Barr <gbarr@pobox.com>
247 |  |  |  |  |
248 |  |  |  |  | =head1 COPYRIGHT
249 |  |  |  |  |
250 |  |  |  |  | Copyright (c) 1997-8 Graham Barr. All rights reserved.
251 |  |  |  |  | This program is free software; you can redistribute it and/or modify it
252 |  |  |  |  | under the same terms as Perl itself.
253 |  |  |  |  |
254 |  |  |  |  | =cut
255 |  |  |  |  |
|  |  |  |  | # spent 6µs within Errno::EINPROGRESS which was called 2 times, avg 3µs/call: # 2 times (6µs+0s) by Errno::FETCH at line 163 of Errno.pm, avg 3µs/call sub Errno::EINPROGRESS; # xsub
|  |  |  |  | # spent 6µs within Errno::EISCONN which was called 2 times, avg 3µs/call: # 2 times (6µs+0s) by Errno::FETCH at line 163 of Errno.pm, avg 3µs/call sub Errno::EISCONN; # xsub