Filename | /usr/share/perl/5.10/warnings/register.pm |
Statements | Executed 402 statements in 843µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
6 | 6 | 6 | 714µs | 822µs | import | warnings::register::
12 | 2 | 1 | 109µs | 109µs | mkMask | warnings::register::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package warnings::register; | ||||
2 | |||||
3 | 1 | 1µs | our $VERSION = '1.01'; | ||
4 | |||||
5 | 1 | 700ns | require warnings; | ||
6 | |||||
7 | sub mkMask | ||||
8 | { | ||||
9 | 48 | 155µs | my ($bit) = @_; | ||
10 | my $mask = ""; | ||||
11 | |||||
12 | vec($mask, $bit, 1) = 1; | ||||
13 | return $mask; | ||||
14 | } | ||||
15 | |||||
16 | sub import | ||||
17 | # spent 822µs (714+109) within warnings::register::import which was called 6 times, avg 137µs/call:
# once (144µs+21µs) by Tie::Hash::BEGIN@6 at line 6 of Tie/Hash.pm
# once (140µs+24µs) by overload::BEGIN@139 at line 139 of overload.pm
# once (138µs+21µs) by constant::BEGIN@4 at line 4 of constant.pm
# once (124µs+15µs) by vars::BEGIN@7 at line 7 of vars.pm
# once (91µs+14µs) by IO::Select::BEGIN@10 at line 10 of IO/Select.pm
# once (77µs+12µs) by Socket::BEGIN@7 at line 7 of Socket.pm | ||||
18 | 18 | 94µs | shift; | ||
19 | my $package = (caller(0))[0]; | ||||
20 | 36 | 226µs | if (! defined $warnings::Bits{$package}) { | ||
21 | 6 | 72µs | $warnings::Bits{$package} = mkMask($warnings::LAST_BIT); # spent 72µs making 6 calls to warnings::register::mkMask, avg 12µs/call | ||
22 | vec($warnings::Bits{'all'}, $warnings::LAST_BIT, 1) = 1; | ||||
23 | $warnings::Offsets{$package} = $warnings::LAST_BIT ++; | ||||
24 | foreach my $k (keys %warnings::Bits) { | ||||
25 | 297 | 359µs | vec($warnings::Bits{$k}, $warnings::LAST_BIT, 1) = 0; | ||
26 | } | ||||
27 | 6 | 37µs | $warnings::DeadBits{$package} = mkMask($warnings::LAST_BIT); # spent 37µs making 6 calls to warnings::register::mkMask, avg 6µs/call | ||
28 | vec($warnings::DeadBits{'all'}, $warnings::LAST_BIT++, 1) = 1; | ||||
29 | } | ||||
30 | } | ||||
31 | |||||
32 | 1 | 5µs | 1; |