Filename | /usr/lib/perl/5.10/Fcntl.pm |
Statements | Executed 18 statements in 1.43ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 17µs | 22µs | BEGIN@3 | Fcntl::
1 | 1 | 1 | 16µs | 40µs | BEGIN@184 | Fcntl::
1 | 1 | 1 | 11µs | 342µs | BEGIN@159 | Fcntl::
1 | 1 | 1 | 5µs | 5µs | BEGIN@7 | Fcntl::
1 | 1 | 1 | 4µs | 4µs | BEGIN@9 | Fcntl::
0 | 0 | 0 | 0s | 0s | AUTOLOAD | Fcntl::
0 | 0 | 0 | 0s | 0s | S_IFMT | Fcntl::
0 | 0 | 0 | 0s | 0s | S_IMODE | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISBLK | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISCHR | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISDIR | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISENFMT | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISFIFO | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISLNK | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISREG | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISSOCK | Fcntl::
0 | 0 | 0 | 0s | 0s | S_ISWHT | Fcntl::
0 | 0 | 0 | 0s | 0s | __ANON__[:185] | Fcntl::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Fcntl; | ||||
2 | |||||
3 | 3 | 58µs | 2 | 28µs | # spent 22µs (17+5) within Fcntl::BEGIN@3 which was called:
# once (17µs+5µs) by IO::Seekable::BEGIN@12 at line 3 # spent 22µs making 1 call to Fcntl::BEGIN@3
# spent 5µs making 1 call to strict::import |
4 | 1 | 2µs | our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $AUTOLOAD); | ||
5 | |||||
6 | 1 | 1µs | require Exporter; | ||
7 | 3 | 36µs | 1 | 5µs | # spent 5µs within Fcntl::BEGIN@7 which was called:
# once (5µs+0s) by IO::Seekable::BEGIN@12 at line 7 # spent 5µs making 1 call to Fcntl::BEGIN@7 |
8 | 1 | 15µs | @ISA = qw(Exporter); | ||
9 | # spent 4µs within Fcntl::BEGIN@9 which was called:
# once (4µs+0s) by IO::Seekable::BEGIN@12 at line 11 | ||||
10 | 1 | 4µs | $VERSION = "1.06"; | ||
11 | 1 | 221µs | 1 | 4µs | } # spent 4µs making 1 call to Fcntl::BEGIN@9 |
12 | |||||
13 | # Items to export into callers namespace by default | ||||
14 | # (move infrequently used names to @EXPORT_OK below) | ||||
15 | 1 | 16µs | @EXPORT = | ||
16 | qw( | ||||
17 | FD_CLOEXEC | ||||
18 | F_ALLOCSP | ||||
19 | F_ALLOCSP64 | ||||
20 | F_COMPAT | ||||
21 | F_DUP2FD | ||||
22 | F_DUPFD | ||||
23 | F_EXLCK | ||||
24 | F_FREESP | ||||
25 | F_FREESP64 | ||||
26 | F_FSYNC | ||||
27 | F_FSYNC64 | ||||
28 | F_GETFD | ||||
29 | F_GETFL | ||||
30 | F_GETLK | ||||
31 | F_GETLK64 | ||||
32 | F_GETOWN | ||||
33 | F_NODNY | ||||
34 | F_POSIX | ||||
35 | F_RDACC | ||||
36 | F_RDDNY | ||||
37 | F_RDLCK | ||||
38 | F_RWACC | ||||
39 | F_RWDNY | ||||
40 | F_SETFD | ||||
41 | F_SETFL | ||||
42 | F_SETLK | ||||
43 | F_SETLK64 | ||||
44 | F_SETLKW | ||||
45 | F_SETLKW64 | ||||
46 | F_SETOWN | ||||
47 | F_SHARE | ||||
48 | F_SHLCK | ||||
49 | F_UNLCK | ||||
50 | F_UNSHARE | ||||
51 | F_WRACC | ||||
52 | F_WRDNY | ||||
53 | F_WRLCK | ||||
54 | O_ACCMODE | ||||
55 | O_ALIAS | ||||
56 | O_APPEND | ||||
57 | O_ASYNC | ||||
58 | O_BINARY | ||||
59 | O_CREAT | ||||
60 | O_DEFER | ||||
61 | O_DIRECT | ||||
62 | O_DIRECTORY | ||||
63 | O_DSYNC | ||||
64 | O_EXCL | ||||
65 | O_EXLOCK | ||||
66 | O_LARGEFILE | ||||
67 | O_NDELAY | ||||
68 | O_NOCTTY | ||||
69 | O_NOFOLLOW | ||||
70 | O_NOINHERIT | ||||
71 | O_NONBLOCK | ||||
72 | O_RANDOM | ||||
73 | O_RAW | ||||
74 | O_RDONLY | ||||
75 | O_RDWR | ||||
76 | O_RSRC | ||||
77 | O_RSYNC | ||||
78 | O_SEQUENTIAL | ||||
79 | O_SHLOCK | ||||
80 | O_SYNC | ||||
81 | O_TEMPORARY | ||||
82 | O_TEXT | ||||
83 | O_TRUNC | ||||
84 | O_WRONLY | ||||
85 | ); | ||||
86 | |||||
87 | # Other items we are prepared to export if requested | ||||
88 | 1 | 28µs | @EXPORT_OK = qw( | ||
89 | DN_ACCESS | ||||
90 | DN_ATTRIB | ||||
91 | DN_CREATE | ||||
92 | DN_DELETE | ||||
93 | DN_MODIFY | ||||
94 | DN_MULTISHOT | ||||
95 | DN_RENAME | ||||
96 | FAPPEND | ||||
97 | FASYNC | ||||
98 | FCREAT | ||||
99 | FDEFER | ||||
100 | FDSYNC | ||||
101 | FEXCL | ||||
102 | FLARGEFILE | ||||
103 | FNDELAY | ||||
104 | FNONBLOCK | ||||
105 | FRSYNC | ||||
106 | FSYNC | ||||
107 | FTRUNC | ||||
108 | F_GETLEASE | ||||
109 | F_GETSIG | ||||
110 | F_NOTIFY | ||||
111 | F_SETLEASE | ||||
112 | F_SETSIG | ||||
113 | LOCK_EX | ||||
114 | LOCK_MAND | ||||
115 | LOCK_NB | ||||
116 | LOCK_READ | ||||
117 | LOCK_RW | ||||
118 | LOCK_SH | ||||
119 | LOCK_UN | ||||
120 | LOCK_WRITE | ||||
121 | O_IGNORE_CTTY | ||||
122 | O_NOATIME | ||||
123 | O_NOLINK | ||||
124 | O_NOTRANS | ||||
125 | SEEK_CUR | ||||
126 | SEEK_END | ||||
127 | SEEK_SET | ||||
128 | S_IFSOCK S_IFBLK S_IFCHR S_IFIFO S_IFWHT S_ENFMT | ||||
129 | S_IREAD S_IWRITE S_IEXEC | ||||
130 | S_IRGRP S_IWGRP S_IXGRP S_IRWXG | ||||
131 | S_IROTH S_IWOTH S_IXOTH S_IRWXO | ||||
132 | S_IRUSR S_IWUSR S_IXUSR S_IRWXU | ||||
133 | S_ISUID S_ISGID S_ISVTX S_ISTXT | ||||
134 | _S_IFMT S_IFREG S_IFDIR S_IFLNK | ||||
135 | &S_ISREG &S_ISDIR &S_ISLNK &S_ISSOCK &S_ISBLK &S_ISCHR &S_ISFIFO | ||||
136 | &S_ISWHT &S_ISENFMT &S_IFMT &S_IMODE | ||||
137 | ); | ||||
138 | # Named groups of exports | ||||
139 | 1 | 25µs | %EXPORT_TAGS = ( | ||
140 | 'flock' => [qw(LOCK_SH LOCK_EX LOCK_NB LOCK_UN)], | ||||
141 | 'Fcompat' => [qw(FAPPEND FASYNC FCREAT FDEFER FDSYNC FEXCL FLARGEFILE | ||||
142 | FNDELAY FNONBLOCK FRSYNC FSYNC FTRUNC)], | ||||
143 | 'seek' => [qw(SEEK_SET SEEK_CUR SEEK_END)], | ||||
144 | 'mode' => [qw(S_ISUID S_ISGID S_ISVTX S_ISTXT | ||||
145 | _S_IFMT S_IFREG S_IFDIR S_IFLNK | ||||
146 | S_IFSOCK S_IFBLK S_IFCHR S_IFIFO S_IFWHT S_ENFMT | ||||
147 | S_IRUSR S_IWUSR S_IXUSR S_IRWXU | ||||
148 | S_IRGRP S_IWGRP S_IXGRP S_IRWXG | ||||
149 | S_IROTH S_IWOTH S_IXOTH S_IRWXO | ||||
150 | S_IREAD S_IWRITE S_IEXEC | ||||
151 | S_ISREG S_ISDIR S_ISLNK S_ISSOCK | ||||
152 | S_ISBLK S_ISCHR S_ISFIFO | ||||
153 | S_ISWHT S_ISENFMT | ||||
154 | S_IFMT S_IMODE | ||||
155 | )], | ||||
156 | ); | ||||
157 | |||||
158 | # Force the constants to become inlined | ||||
159 | # spent 342µs (11+331) within Fcntl::BEGIN@159 which was called:
# once (11µs+331µs) by IO::Seekable::BEGIN@12 at line 161 | ||||
160 | 1 | 341µs | 1 | 331µs | XSLoader::load 'Fcntl', $VERSION; # spent 331µs making 1 call to XSLoader::load |
161 | 1 | 505µs | 1 | 342µs | } # spent 342µs making 1 call to Fcntl::BEGIN@159 |
162 | |||||
163 | sub S_IFMT { @_ ? ( $_[0] & _S_IFMT() ) : _S_IFMT() } | ||||
164 | sub S_IMODE { $_[0] & 07777 } | ||||
165 | |||||
166 | sub S_ISREG { ( $_[0] & _S_IFMT() ) == S_IFREG() } | ||||
167 | sub S_ISDIR { ( $_[0] & _S_IFMT() ) == S_IFDIR() } | ||||
168 | sub S_ISLNK { ( $_[0] & _S_IFMT() ) == S_IFLNK() } | ||||
169 | sub S_ISSOCK { ( $_[0] & _S_IFMT() ) == S_IFSOCK() } | ||||
170 | sub S_ISBLK { ( $_[0] & _S_IFMT() ) == S_IFBLK() } | ||||
171 | sub S_ISCHR { ( $_[0] & _S_IFMT() ) == S_IFCHR() } | ||||
172 | sub S_ISFIFO { ( $_[0] & _S_IFMT() ) == S_IFIFO() } | ||||
173 | sub S_ISWHT { ( $_[0] & _S_IFMT() ) == S_IFWHT() } | ||||
174 | sub S_ISENFMT { ( $_[0] & _S_IFMT() ) == S_IFENFMT() } | ||||
175 | |||||
176 | sub AUTOLOAD { | ||||
177 | (my $constname = $AUTOLOAD) =~ s/.*:://; | ||||
178 | die "&Fcntl::constant not defined" if $constname eq 'constant'; | ||||
179 | my ($error, $val) = constant($constname); | ||||
180 | if ($error) { | ||||
181 | my (undef,$file,$line) = caller; | ||||
182 | die "$error at $file line $line.\n"; | ||||
183 | } | ||||
184 | 3 | 140µs | 2 | 65µs | # spent 40µs (16+25) within Fcntl::BEGIN@184 which was called:
# once (16µs+25µs) by IO::Seekable::BEGIN@12 at line 184 # spent 40µs making 1 call to Fcntl::BEGIN@184
# spent 25µs making 1 call to strict::unimport |
185 | *$AUTOLOAD = sub { $val }; | ||||
186 | goto &$AUTOLOAD; | ||||
187 | } | ||||
188 | |||||
189 | 1 | 37µs | 1; |