Filename | /usr/lib/perl/5.10/Socket.pm |
Statements | Executed 25 statements in 1.62ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 155µs | 155µs | inet_aton (xsub) | Socket::
1 | 1 | 1 | 35µs | 142µs | BEGIN@6 | Socket::
1 | 1 | 1 | 27µs | 35µs | sockaddr_in | Socket::
1 | 1 | 1 | 19µs | 174µs | BEGIN@7 | Socket::
1 | 1 | 1 | 9µs | 9µs | BEGIN@10 | Socket::
1 | 1 | 1 | 8µs | 8µs | BEGIN@193 | Socket::
1 | 1 | 1 | 8µs | 8µs | pack_sockaddr_in (xsub) | Socket::
0 | 0 | 0 | 0s | 0s | AUTOLOAD | Socket::
0 | 0 | 0 | 0s | 0s | __ANON__[:236] | Socket::
0 | 0 | 0 | 0s | 0s | sockaddr_un | Socket::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Socket; | ||||
2 | |||||
3 | 1 | 2µs | our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); | ||
4 | 1 | 1µs | $VERSION = "1.82"; | ||
5 | |||||
6 | 3 | 60µs | 2 | 249µs | # spent 142µs (35+107) within Socket::BEGIN@6 which was called:
# once (35µs+107µs) by Cache::Memcached::BEGIN@15 at line 6 # spent 142µs making 1 call to Socket::BEGIN@6
# spent 107µs making 1 call to Exporter::import |
7 | 3 | 66µs | 2 | 328µs | # spent 174µs (19+155) within Socket::BEGIN@7 which was called:
# once (19µs+155µs) by Cache::Memcached::BEGIN@15 at line 7 # spent 174µs making 1 call to Socket::BEGIN@7
# spent 155µs making 1 call to warnings::register::import |
8 | |||||
9 | 1 | 1µs | require Exporter; | ||
10 | 3 | 364µs | 1 | 9µs | # spent 9µs within Socket::BEGIN@10 which was called:
# once (9µs+0s) by Cache::Memcached::BEGIN@15 at line 10 # spent 9µs making 1 call to Socket::BEGIN@10 |
11 | 1 | 15µs | @ISA = qw(Exporter); | ||
12 | 1 | 38µs | @EXPORT = qw( | ||
13 | inet_aton inet_ntoa | ||||
14 | sockaddr_family | ||||
15 | pack_sockaddr_in unpack_sockaddr_in | ||||
16 | pack_sockaddr_un unpack_sockaddr_un | ||||
17 | sockaddr_in sockaddr_un | ||||
18 | INADDR_ANY INADDR_BROADCAST INADDR_LOOPBACK INADDR_NONE | ||||
19 | AF_802 | ||||
20 | AF_AAL | ||||
21 | AF_APPLETALK | ||||
22 | AF_CCITT | ||||
23 | AF_CHAOS | ||||
24 | AF_CTF | ||||
25 | AF_DATAKIT | ||||
26 | AF_DECnet | ||||
27 | AF_DLI | ||||
28 | AF_ECMA | ||||
29 | AF_GOSIP | ||||
30 | AF_HYLINK | ||||
31 | AF_IMPLINK | ||||
32 | AF_INET | ||||
33 | AF_INET6 | ||||
34 | AF_ISO | ||||
35 | AF_KEY | ||||
36 | AF_LAST | ||||
37 | AF_LAT | ||||
38 | AF_LINK | ||||
39 | AF_MAX | ||||
40 | AF_NBS | ||||
41 | AF_NIT | ||||
42 | AF_NS | ||||
43 | AF_OSI | ||||
44 | AF_OSINET | ||||
45 | AF_PUP | ||||
46 | AF_ROUTE | ||||
47 | AF_SNA | ||||
48 | AF_UNIX | ||||
49 | AF_UNSPEC | ||||
50 | AF_USER | ||||
51 | AF_WAN | ||||
52 | AF_X25 | ||||
53 | IOV_MAX | ||||
54 | IP_OPTIONS | ||||
55 | IP_HDRINCL | ||||
56 | IP_TOS | ||||
57 | IP_TTL | ||||
58 | IP_RECVOPTS | ||||
59 | IP_RECVRETOPTS | ||||
60 | IP_RETOPTS | ||||
61 | MSG_BCAST | ||||
62 | MSG_BTAG | ||||
63 | MSG_CTLFLAGS | ||||
64 | MSG_CTLIGNORE | ||||
65 | MSG_CTRUNC | ||||
66 | MSG_DONTROUTE | ||||
67 | MSG_DONTWAIT | ||||
68 | MSG_EOF | ||||
69 | MSG_EOR | ||||
70 | MSG_ERRQUEUE | ||||
71 | MSG_ETAG | ||||
72 | MSG_FIN | ||||
73 | MSG_MAXIOVLEN | ||||
74 | MSG_MCAST | ||||
75 | MSG_NOSIGNAL | ||||
76 | MSG_OOB | ||||
77 | MSG_PEEK | ||||
78 | MSG_PROXY | ||||
79 | MSG_RST | ||||
80 | MSG_SYN | ||||
81 | MSG_TRUNC | ||||
82 | MSG_URG | ||||
83 | MSG_WAITALL | ||||
84 | MSG_WIRE | ||||
85 | PF_802 | ||||
86 | PF_AAL | ||||
87 | PF_APPLETALK | ||||
88 | PF_CCITT | ||||
89 | PF_CHAOS | ||||
90 | PF_CTF | ||||
91 | PF_DATAKIT | ||||
92 | PF_DECnet | ||||
93 | PF_DLI | ||||
94 | PF_ECMA | ||||
95 | PF_GOSIP | ||||
96 | PF_HYLINK | ||||
97 | PF_IMPLINK | ||||
98 | PF_INET | ||||
99 | PF_INET6 | ||||
100 | PF_ISO | ||||
101 | PF_KEY | ||||
102 | PF_LAST | ||||
103 | PF_LAT | ||||
104 | PF_LINK | ||||
105 | PF_MAX | ||||
106 | PF_NBS | ||||
107 | PF_NIT | ||||
108 | PF_NS | ||||
109 | PF_OSI | ||||
110 | PF_OSINET | ||||
111 | PF_PUP | ||||
112 | PF_ROUTE | ||||
113 | PF_SNA | ||||
114 | PF_UNIX | ||||
115 | PF_UNSPEC | ||||
116 | PF_USER | ||||
117 | PF_WAN | ||||
118 | PF_X25 | ||||
119 | SCM_CONNECT | ||||
120 | SCM_CREDENTIALS | ||||
121 | SCM_CREDS | ||||
122 | SCM_RIGHTS | ||||
123 | SCM_TIMESTAMP | ||||
124 | SHUT_RD | ||||
125 | SHUT_RDWR | ||||
126 | SHUT_WR | ||||
127 | SOCK_DGRAM | ||||
128 | SOCK_RAW | ||||
129 | SOCK_RDM | ||||
130 | SOCK_SEQPACKET | ||||
131 | SOCK_STREAM | ||||
132 | SOL_SOCKET | ||||
133 | SOMAXCONN | ||||
134 | SO_ACCEPTCONN | ||||
135 | SO_ATTACH_FILTER | ||||
136 | SO_BACKLOG | ||||
137 | SO_BROADCAST | ||||
138 | SO_CHAMELEON | ||||
139 | SO_DEBUG | ||||
140 | SO_DETACH_FILTER | ||||
141 | SO_DGRAM_ERRIND | ||||
142 | SO_DONTLINGER | ||||
143 | SO_DONTROUTE | ||||
144 | SO_ERROR | ||||
145 | SO_FAMILY | ||||
146 | SO_KEEPALIVE | ||||
147 | SO_LINGER | ||||
148 | SO_OOBINLINE | ||||
149 | SO_PASSCRED | ||||
150 | SO_PASSIFNAME | ||||
151 | SO_PEERCRED | ||||
152 | SO_PROTOCOL | ||||
153 | SO_PROTOTYPE | ||||
154 | SO_RCVBUF | ||||
155 | SO_RCVLOWAT | ||||
156 | SO_RCVTIMEO | ||||
157 | SO_REUSEADDR | ||||
158 | SO_REUSEPORT | ||||
159 | SO_SECURITY_AUTHENTICATION | ||||
160 | SO_SECURITY_ENCRYPTION_NETWORK | ||||
161 | SO_SECURITY_ENCRYPTION_TRANSPORT | ||||
162 | SO_SNDBUF | ||||
163 | SO_SNDLOWAT | ||||
164 | SO_SNDTIMEO | ||||
165 | SO_STATE | ||||
166 | SO_TYPE | ||||
167 | SO_USELOOPBACK | ||||
168 | SO_XOPEN | ||||
169 | SO_XSE | ||||
170 | UIO_MAXIOV | ||||
171 | ); | ||||
172 | |||||
173 | 1 | 4µs | @EXPORT_OK = qw(CR LF CRLF $CR $LF $CRLF | ||
174 | |||||
175 | IPPROTO_IP | ||||
176 | IPPROTO_IPV6 | ||||
177 | IPPROTO_RAW | ||||
178 | IPPROTO_ICMP | ||||
179 | IPPROTO_TCP | ||||
180 | IPPROTO_UDP | ||||
181 | |||||
182 | TCP_KEEPALIVE | ||||
183 | TCP_MAXRT | ||||
184 | TCP_MAXSEG | ||||
185 | TCP_NODELAY | ||||
186 | TCP_STDURG); | ||||
187 | |||||
188 | 1 | 51µs | %EXPORT_TAGS = ( | ||
189 | crlf => [qw(CR LF CRLF $CR $LF $CRLF)], | ||||
190 | all => [@EXPORT, @EXPORT_OK], | ||||
191 | ); | ||||
192 | |||||
193 | 1 | 8µs | # spent 8µs within Socket::BEGIN@193 which was called:
# once (8µs+0s) by Cache::Memcached::BEGIN@15 at line 197 | ||
194 | sub CR () {"\015"} | ||||
195 | sub LF () {"\012"} | ||||
196 | sub CRLF () {"\015\012"} | ||||
197 | 1 | 506µs | 1 | 8µs | } # spent 8µs making 1 call to Socket::BEGIN@193 |
198 | |||||
199 | 1 | 1µs | *CR = \CR(); | ||
200 | 1 | 400ns | *LF = \LF(); | ||
201 | 1 | 300ns | *CRLF = \CRLF(); | ||
202 | |||||
203 | # spent 35µs (27+7) within Socket::sockaddr_in which was called:
# once (27µs+7µs) by Cache::Memcached::sock_to_host at line 288 of Cache/Memcached.pm | ||||
204 | 3 | 36µs | if (@_ == 6 && !wantarray) { # perl5.001m compat; use this && die | ||
205 | my($af, $port, @quad) = @_; | ||||
206 | warnings::warn "6-ARG sockaddr_in call is deprecated" | ||||
207 | if warnings::enabled(); | ||||
208 | pack_sockaddr_in($port, inet_aton(join('.', @quad))); | ||||
209 | } elsif (wantarray) { | ||||
210 | croak "usage: (port,iaddr) = sockaddr_in(sin_sv)" unless @_ == 1; | ||||
211 | unpack_sockaddr_in(@_); | ||||
212 | } else { | ||||
213 | croak "usage: sin_sv = sockaddr_in(port,iaddr))" unless @_ == 2; | ||||
214 | 1 | 8µs | pack_sockaddr_in(@_); # spent 8µs making 1 call to Socket::pack_sockaddr_in | ||
215 | } | ||||
216 | } | ||||
217 | |||||
218 | sub sockaddr_un { | ||||
219 | if (wantarray) { | ||||
220 | croak "usage: (filename) = sockaddr_un(sun_sv)" unless @_ == 1; | ||||
221 | unpack_sockaddr_un(@_); | ||||
222 | } else { | ||||
223 | croak "usage: sun_sv = sockaddr_un(filename)" unless @_ == 1; | ||||
224 | pack_sockaddr_un(@_); | ||||
225 | } | ||||
226 | } | ||||
227 | |||||
228 | sub AUTOLOAD { | ||||
229 | my($constname); | ||||
230 | ($constname = $AUTOLOAD) =~ s/.*:://; | ||||
231 | croak "&Socket::constant not defined" if $constname eq 'constant'; | ||||
232 | my ($error, $val) = constant($constname); | ||||
233 | if ($error) { | ||||
234 | croak $error; | ||||
235 | } | ||||
236 | *$AUTOLOAD = sub { $val }; | ||||
237 | goto &$AUTOLOAD; | ||||
238 | } | ||||
239 | |||||
240 | 1 | 434µs | 1 | 423µs | XSLoader::load 'Socket', $VERSION; # spent 423µs making 1 call to XSLoader::load |
241 | |||||
242 | 1 | 38µs | 1; | ||
# spent 155µs within Socket::inet_aton which was called:
# once (155µs+0s) by Cache::Memcached::sock_to_host at line 288 of Cache/Memcached.pm | |||||
# spent 8µs within Socket::pack_sockaddr_in which was called:
# once (8µs+0s) by Socket::sockaddr_in at line 214 |