← Index
NYTProf Performance Profile   « line view »
For /usr/local/bin/sa-learn
  Run on Sun Nov 5 02:36:06 2017
Reported on Sun Nov 5 02:56:17 2017

Filename/usr/local/lib/perl5/5.24/mach/Errno.pm
StatementsExecuted 215 statements in 4.15ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.55ms4.42msErrno::::BEGIN@10Errno::BEGIN@10
111856µs856µsErrno::::BEGIN@21Errno::BEGIN@21
11149µs66µsErrno::::BEGIN@8Errno::BEGIN@8
1115µs5µsErrno::::TIEHASHErrno::TIEHASH
0000s0sErrno::::EXISTSErrno::EXISTS
0000s0sErrno::::FETCHErrno::FETCH
0000s0sErrno::::FIRSTKEYErrno::FIRSTKEY
0000s0sErrno::::NEXTKEYErrno::NEXTKEY
0000s0sErrno::::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
6package Errno;
711.43msrequire Exporter;
8261µs284µs
# spent 66µs (49+17) within Errno::BEGIN@8 which was called: # once (49µs+17µs) by main::BEGIN@23 at line 8
use strict;
# spent 66µs making 1 call to Errno::BEGIN@8 # spent 17µs making 1 call to strict::import
9
102946µs24.49ms
# spent 4.42ms (1.55+2.87) within Errno::BEGIN@10 which was called: # once (1.55ms+2.87ms) by main::BEGIN@23 at line 10
use Config;
# spent 4.42ms making 1 call to Errno::BEGIN@10 # spent 63µs making 1 call to Config::import
11143µs217µs"$Config{'archname'}-$Config{'osvers'}" eq
# spent 17µs making 2 calls to Config::FETCH, avg 8µs/call
12"amd64-freebsd-thread-multi-10.3-release" or
13 die "Errno architecture (amd64-freebsd-thread-multi-10.3-release) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
14
1512µsour $VERSION = "1.25";
16133µs$VERSION = eval $VERSION;
# spent 5µs executing statements in string eval
17116µsour @ISA = 'Exporter';
18
1912µsmy %err;
20
21
# spent 856µs within Errno::BEGIN@21 which was called: # once (856µs+0s) by main::BEGIN@23 at line 142
BEGIN {
22177µ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 EDEADLK => 11,
34 ENOMEM => 12,
35 EACCES => 13,
36 EFAULT => 14,
37 ENOTBLK => 15,
38 EBUSY => 16,
39 EEXIST => 17,
40 EXDEV => 18,
41 ENODEV => 19,
42 ENOTDIR => 20,
43 EISDIR => 21,
44 EINVAL => 22,
45 ENFILE => 23,
46 EMFILE => 24,
47 ENOTTY => 25,
48 ETXTBSY => 26,
49 EFBIG => 27,
50 ENOSPC => 28,
51 ESPIPE => 29,
52 EROFS => 30,
53 EMLINK => 31,
54 EPIPE => 32,
55 EDOM => 33,
56 ERANGE => 34,
57 EAGAIN => 35,
58 EWOULDBLOCK => 35,
59 EINPROGRESS => 36,
60 EALREADY => 37,
61 ENOTSOCK => 38,
62 EDESTADDRREQ => 39,
63 EMSGSIZE => 40,
64 EPROTOTYPE => 41,
65 ENOPROTOOPT => 42,
66 EPROTONOSUPPORT => 43,
67 ESOCKTNOSUPPORT => 44,
68 ENOTSUP => 45,
69 EOPNOTSUPP => 45,
70 EPFNOSUPPORT => 46,
71 EAFNOSUPPORT => 47,
72 EADDRINUSE => 48,
73 EADDRNOTAVAIL => 49,
74 ENETDOWN => 50,
75 ENETUNREACH => 51,
76 ENETRESET => 52,
77 ECONNABORTED => 53,
78 ECONNRESET => 54,
79 ENOBUFS => 55,
80 EISCONN => 56,
81 ENOTCONN => 57,
82 ESHUTDOWN => 58,
83 ETOOMANYREFS => 59,
84 ETIMEDOUT => 60,
85 ECONNREFUSED => 61,
86 ELOOP => 62,
87 ENAMETOOLONG => 63,
88 EHOSTDOWN => 64,
89 EHOSTUNREACH => 65,
90 ENOTEMPTY => 66,
91 EPROCLIM => 67,
92 EUSERS => 68,
93 EDQUOT => 69,
94 ESTALE => 70,
95 EREMOTE => 71,
96 EBADRPC => 72,
97 ERPCMISMATCH => 73,
98 EPROGUNAVAIL => 74,
99 EPROGMISMATCH => 75,
100 EPROCUNAVAIL => 76,
101 ENOLCK => 77,
102 ENOSYS => 78,
103 EFTYPE => 79,
104 EAUTH => 80,
105 ENEEDAUTH => 81,
106 EIDRM => 82,
107 ENOMSG => 83,
108 EOVERFLOW => 84,
109 ECANCELED => 85,
110 EILSEQ => 86,
111 ENOATTR => 87,
112 EDOOFUS => 88,
113 EBADMSG => 89,
114 EMULTIHOP => 90,
115 ENOLINK => 91,
116 EPROTO => 92,
117 ENOTCAPABLE => 93,
118 ECAPMODE => 94,
119 ENOTRECOVERABLE => 95,
120 ELAST => 96,
121 EOWNERDEAD => 96,
122 );
123 # Generate proxy constant subroutines for all the values.
124 # Well, almost all the values. Unfortunately we can't assume that at this
125 # point that our symbol table is empty, as code such as if the parser has
126 # seen code such as C<exists &Errno::EINVAL>, it will have created the
127 # typeglob.
128 # Doing this before defining @EXPORT_OK etc means that even if a platform is
129 # crazy enough to define EXPORT_OK as an error constant, everything will
130 # still work, because the parser will upgrade the PCS to a real typeglob.
131 # We rely on the subroutine definitions below to update the internal caches.
132 # Don't use %each, as we don't want a copy of the value.
133149µs foreach my $name (keys %err) {
13499528µs if ($Errno::{$name}) {
135 # We expect this to be reached fairly rarely, so take an approach
136 # which uses the least compile time effort in the common case:
137 eval "sub $name() { $err{$name} }; 1" or die $@;
138 } else {
13999205µs $Errno::{$name} = \$err{$name};
140 }
141 }
1421624µs1856µs}
# spent 856µs making 1 call to Errno::BEGIN@21
143
144138µsour @EXPORT_OK = keys %err;
145
146126µsour %EXPORT_TAGS = (
147 POSIX => [qw(
148 E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
149 EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
150 EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
151 EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
152 EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
153 ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
154 ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
155 EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE
156 EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
157 ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
158 )],
159);
160
161119µs
# spent 5µs within Errno::TIEHASH which was called: # once (5µs+0s) by main::BEGIN@23 at line 191
sub TIEHASH { bless \%err }
162
163sub FETCH {
164 my (undef, $errname) = @_;
165 return "" unless exists $err{$errname};
166 my $errno = $err{$errname};
167 return $errno == $! ? $errno : 0;
168}
169
170sub STORE {
171 require Carp;
172 Carp::confess("ERRNO hash is read only!");
173}
174
17516µs*CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space
176
177sub NEXTKEY {
178 each %err;
179}
180
181sub FIRSTKEY {
182 my $s = scalar keys %err; # initialize iterator
183 each %err;
184}
185
186sub EXISTS {
187 my (undef, $errname) = @_;
188 exists $err{$errname};
189}
190
191146µs15µstie %!, __PACKAGE__; # Returns an object, objects are true.
# spent 5µs making 1 call to Errno::TIEHASH
192
193__END__