← Index
NYTProf Performance Profile   « block view • line view • sub view »
For ddd2.pl
  Run on Tue May 25 16:52:24 2010
Reported on Tue May 25 16:56:50 2010

File /usr/local/lib/perl5/5.8.8/i686-linux/Errno.pm
Statements Executed 3251
Statement Execution Time 44.4ms
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4611136.6ms40.5msErrno::::FETCHErrno::FETCH
461123.91ms3.91msErrno::::EINPROGRESSErrno::EINPROGRESS (xsub)
0000s0sErrno::::BEGINErrno::BEGIN
0000s0sErrno::::EXISTSErrno::EXISTS
0000s0sErrno::::FIRSTKEYErrno::FIRSTKEY
0000s0sErrno::::NEXTKEYErrno::NEXTKEY
0000s0sErrno::::STOREErrno::STORE
0000s0sErrno::::TIEHASHErrno::TIEHASH
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
5package Errno;
616µsour (@EXPORT_OK,%EXPORT_TAGS,@ISA,$VERSION,%errno,$AUTOLOAD);
7366µsuse Exporter ();
8382µs173µsuse Config;
# spent 73µs making 1 call to Config::import
932.69ms122µsuse strict;
# spent 22µs making 1 call to strict::import
10
11161µs244µs"$Config{'archname'}-$Config{'osvers'}" eq
# spent 44µs making 2 calls to Config::FETCH, avg 22µs/call
12"i686-linux-2.6.9-42.0.10.el" or
13 die "Errno architecture (i686-linux-2.6.9-42.0.10.el) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
14
1515µs$VERSION = "1.09_01";
16167µs$VERSION = eval $VERSION;
1718µs@ISA = qw(Exporter);
18
19159µs@EXPORT_OK = qw(EBADR ENOMSG ENOTSUP ESTRPIPE EADDRINUSE EL3HLT EBADF
20 ENOTBLK ENAVAIL ECHRNG ENOTNAM ELNRNG ENOKEY EXDEV EBADE EBADSLT
21 ECONNREFUSED ENOSTR ENONET EOVERFLOW EISCONN EFBIG EKEYREVOKED
22 ECONNRESET EWOULDBLOCK ELIBMAX EREMOTEIO ENOPKG ELIBSCN EDESTADDRREQ
23 ENOTSOCK EIO EMEDIUMTYPE EINPROGRESS ERANGE EAFNOSUPPORT EADDRNOTAVAIL
24 EINTR EREMOTE EILSEQ ENOMEM EPIPE ENETUNREACH ENODATA EUSERS
25 EOPNOTSUPP EPROTO EISNAM ESPIPE EALREADY ENAMETOOLONG ENOEXEC EISDIR
26 EBADRQC EEXIST EDOTDOT ELIBBAD ESRCH EFAULT EXFULL EDEADLOCK EAGAIN
27 ENOPROTOOPT ENETDOWN EPROTOTYPE EL2NSYNC ENETRESET EUCLEAN EADV EROFS
28 ESHUTDOWN EMULTIHOP EPROTONOSUPPORT ENFILE ENOLCK ECONNABORTED
29 ECANCELED EDEADLK ESRMNT ENOLINK ETIME ENOTDIR EINVAL ENOTTY ENOANO
30 ELOOP ENOENT EPFNOSUPPORT EBADMSG ENOMEDIUM EL2HLT EDOM EBFONT
31 EKEYEXPIRED EMSGSIZE ENOCSI EL3RST ENOSPC EIDRM ENOBUFS ENOSYS
32 EHOSTDOWN EBADFD ENOSR ENOTCONN ESTALE EDQUOT EKEYREJECTED EMFILE
33 EACCES EBUSY E2BIG EPERM ELIBEXEC ETOOMANYREFS ELIBACC ENOTUNIQ ECOMM
34 ERESTART ESOCKTNOSUPPORT EUNATCH ETIMEDOUT ENXIO ENODEV ETXTBSY EMLINK
35 ECHILD EHOSTUNREACH EREMCHG ENOTEMPTY);
36
37140µs%EXPORT_TAGS = (
38 POSIX => [qw(
39 E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
40 EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
41 EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
42 EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
43 EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
44 ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
45 ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
46 EPFNOSUPPORT EPIPE EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART
47 EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
48 ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
49 )]
50);
51
52sub EPERM () { 1 }
53sub ENOENT () { 2 }
54sub ESRCH () { 3 }
55sub EINTR () { 4 }
56sub EIO () { 5 }
57sub ENXIO () { 6 }
58sub E2BIG () { 7 }
59sub ENOEXEC () { 8 }
60sub EBADF () { 9 }
61sub ECHILD () { 10 }
62sub EWOULDBLOCK () { 11 }
63sub EAGAIN () { 11 }
64sub ENOMEM () { 12 }
65sub EACCES () { 13 }
66sub EFAULT () { 14 }
67sub ENOTBLK () { 15 }
68sub EBUSY () { 16 }
69sub EEXIST () { 17 }
70sub EXDEV () { 18 }
71sub ENODEV () { 19 }
72sub ENOTDIR () { 20 }
73sub EISDIR () { 21 }
74sub EINVAL () { 22 }
75sub ENFILE () { 23 }
76sub EMFILE () { 24 }
77sub ENOTTY () { 25 }
78sub ETXTBSY () { 26 }
79sub EFBIG () { 27 }
80sub ENOSPC () { 28 }
81sub ESPIPE () { 29 }
82sub EROFS () { 30 }
83sub EMLINK () { 31 }
84sub EPIPE () { 32 }
85sub EDOM () { 33 }
86sub ERANGE () { 34 }
87sub EDEADLOCK () { 35 }
88sub EDEADLK () { 35 }
89sub ENAMETOOLONG () { 36 }
90sub ENOLCK () { 37 }
91sub ENOSYS () { 38 }
92sub ENOTEMPTY () { 39 }
93sub ELOOP () { 40 }
94sub ENOMSG () { 42 }
95sub EIDRM () { 43 }
96sub ECHRNG () { 44 }
97sub EL2NSYNC () { 45 }
98sub EL3HLT () { 46 }
99sub EL3RST () { 47 }
100sub ELNRNG () { 48 }
101sub EUNATCH () { 49 }
102sub ENOCSI () { 50 }
103sub EL2HLT () { 51 }
104sub EBADE () { 52 }
105sub EBADR () { 53 }
106sub EXFULL () { 54 }
107sub ENOANO () { 55 }
108sub EBADRQC () { 56 }
109sub EBADSLT () { 57 }
110sub EBFONT () { 59 }
111sub ENOSTR () { 60 }
112sub ENODATA () { 61 }
113sub ETIME () { 62 }
114sub ENOSR () { 63 }
115sub ENONET () { 64 }
116sub ENOPKG () { 65 }
117sub EREMOTE () { 66 }
118sub ENOLINK () { 67 }
119sub EADV () { 68 }
120sub ESRMNT () { 69 }
121sub ECOMM () { 70 }
122sub EPROTO () { 71 }
123sub EMULTIHOP () { 72 }
124sub EDOTDOT () { 73 }
125sub EBADMSG () { 74 }
126sub EOVERFLOW () { 75 }
127sub ENOTUNIQ () { 76 }
128sub EBADFD () { 77 }
129sub EREMCHG () { 78 }
130sub ELIBACC () { 79 }
131sub ELIBBAD () { 80 }
132sub ELIBSCN () { 81 }
133sub ELIBMAX () { 82 }
134sub ELIBEXEC () { 83 }
135sub EILSEQ () { 84 }
136sub ERESTART () { 85 }
137sub ESTRPIPE () { 86 }
138sub EUSERS () { 87 }
139sub ENOTSOCK () { 88 }
140sub EDESTADDRREQ () { 89 }
141sub EMSGSIZE () { 90 }
142sub EPROTOTYPE () { 91 }
143sub ENOPROTOOPT () { 92 }
144sub EPROTONOSUPPORT () { 93 }
145sub ESOCKTNOSUPPORT () { 94 }
146sub ENOTSUP () { 95 }
147sub EOPNOTSUPP () { 95 }
148sub EPFNOSUPPORT () { 96 }
149sub EAFNOSUPPORT () { 97 }
150sub EADDRINUSE () { 98 }
151sub EADDRNOTAVAIL () { 99 }
152sub ENETDOWN () { 100 }
153sub ENETUNREACH () { 101 }
154sub ENETRESET () { 102 }
155sub ECONNABORTED () { 103 }
156sub ECONNRESET () { 104 }
157sub ENOBUFS () { 105 }
158sub EISCONN () { 106 }
159sub ENOTCONN () { 107 }
160sub ESHUTDOWN () { 108 }
161sub ETOOMANYREFS () { 109 }
162sub ETIMEDOUT () { 110 }
163sub ECONNREFUSED () { 111 }
164sub EHOSTDOWN () { 112 }
165sub EHOSTUNREACH () { 113 }
166sub EALREADY () { 114 }
167sub EINPROGRESS () { 115 }
168sub ESTALE () { 116 }
169sub EUCLEAN () { 117 }
170sub ENOTNAM () { 118 }
171sub ENAVAIL () { 119 }
172sub EISNAM () { 120 }
173sub EREMOTEIO () { 121 }
174sub EDQUOT () { 122 }
175sub ENOMEDIUM () { 123 }
176sub EMEDIUMTYPE () { 124 }
177sub ECANCELED () { 125 }
178sub ENOKEY () { 126 }
179sub EKEYEXPIRED () { 127 }
180sub EKEYREVOKED () { 128 }
181sub EKEYREJECTED () { 129 }
182
183128µssub TIEHASH { bless [] }
184
185
# spent 40.5ms (36.6+3.91) within Errno::FETCH which was called 461 times, avg 88µs/call: # 461 times (36.6ms+3.91ms) by IO::Socket::connect at line 115 of IO/Socket.pm, avg 88µs/call
sub FETCH {
186230523.2ms my ($self, $errname) = @_;
187 my $proto = prototype("Errno::$errname");
188 my $errno = "";
18992217.4ms if (defined($proto) && $proto eq "") {
1903563µs1105µs no strict 'refs';
# spent 105µs making 1 call to strict::unimport
191 $errno = &$errname;
# spent 3.91ms making 461 calls to Errno::EINPROGRESS, avg 8µs/call
192 $errno = 0 unless $! == $errno;
193 }
194 return $errno;
195}
196
197sub STORE {
198 require Carp;
199 Carp::confess("ERRNO hash is read only!");
200}
201
20218µs*CLEAR = \&STORE;
20315µs*DELETE = \&STORE;
204
205sub NEXTKEY {
206 my($k,$v);
207 while(($k,$v) = each %Errno::) {
208 my $proto = prototype("Errno::$k");
209 last if (defined($proto) && $proto eq "");
210 }
211 $k
212}
213
214sub FIRSTKEY {
215 my $s = scalar keys %Errno::; # initialize iterator
216 goto &NEXTKEY;
217}
218
219sub EXISTS {
220 my ($self, $errname) = @_;
221 my $r = ref $errname;
222 my $proto = !$r || $r eq 'CODE' ? prototype($errname) : undef;
223 defined($proto) && $proto eq "";
224}
225
226117µstie %!, __PACKAGE__;
227
228176µs1;
229__END__
230
231=head1 NAME
232
233Errno - System errno constants
234
235=head1 SYNOPSIS
236
237 use Errno qw(EINTR EIO :POSIX);
238
239=head1 DESCRIPTION
240
241C<Errno> defines and conditionally exports all the error constants
242defined in your system C<errno.h> include file. It has a single export
243tag, C<:POSIX>, which will export all POSIX defined error numbers.
244
245C<Errno> also makes C<%!> magic such that each element of C<%!> has a
246non-zero value only if C<$!> is set to that value. For example:
247
248 use Errno;
249
250 unless (open(FH, "/fangorn/spouse")) {
251 if ($!{ENOENT}) {
252 warn "Get a wife!\n";
253 } else {
254 warn "This path is barred: $!";
255 }
256 }
257
258If a specified constant C<EFOO> does not exist on the system, C<$!{EFOO}>
259returns C<"">. You may use C<exists $!{EFOO}> to check whether the
260constant is available on the system.
261
262=head1 CAVEATS
263
264Importing a particular constant may not be very portable, because the
265import will fail on platforms that do not have that constant. A more
266portable way to set C<$!> to a valid value is to use:
267
268 if (exists &Errno::EFOO) {
269 $! = &Errno::EFOO;
270 }
271
272=head1 AUTHOR
273
274Graham Barr <gbarr@pobox.com>
275
276=head1 COPYRIGHT
277
278Copyright (c) 1997-8 Graham Barr. All rights reserved.
279This program is free software; you can redistribute it and/or modify it
280under the same terms as Perl itself.
281
282=cut
283
# spent 3.91ms within Errno::EINPROGRESS which was called 461 times, avg 8µs/call: # 461 times (3.91ms+0s) by Errno::FETCH at line 191 of Errno.pm, avg 8µs/call
sub Errno::EINPROGRESS; # xsub