Filename | /usr/share/perl/5.10/warnings/register.pm |
Statements | Executed 543 statements in 974µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
8 | 8 | 8 | 824µs | 949µs | import | warnings::register::
16 | 2 | 1 | 126µs | 126µs | mkMask | warnings::register::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package warnings::register; | ||||
2 | |||||
3 | 1 | 700ns | our $VERSION = '1.01'; | ||
4 | |||||
5 | 1 | 500ns | require warnings; | ||
6 | |||||
7 | sub mkMask | ||||
8 | { | ||||
9 | 16 | 18µs | my ($bit) = @_; | ||
10 | 16 | 14µs | my $mask = ""; | ||
11 | |||||
12 | 16 | 40µs | vec($mask, $bit, 1) = 1; | ||
13 | 16 | 100µs | return $mask; | ||
14 | } | ||||
15 | |||||
16 | sub import | ||||
17 | # spent 949µs (824+126) within warnings::register::import which was called 8 times, avg 119µs/call:
# once (165µs+24µs) by overload::BEGIN@139 at line 139 of overload.pm
# once (132µs+23µs) by Socket::BEGIN@7 at line 7 of Socket.pm
# once (127µs+22µs) by constant::BEGIN@4 at line 4 of constant.pm
# once (88µs+13µs) by Cache::Memcached::BEGIN@22 at line 1 of (eval 9)[fields.pm:6]
# once (83µs+12µs) by IO::Select::BEGIN@10 at line 10 of IO/Select.pm
# once (83µs+11µs) by Tie::Hash::BEGIN@6 at line 6 of Tie/Hash.pm
# once (76µs+11µs) by Hash::Util::BEGIN@7 at line 7 of Hash/Util.pm
# once (70µs+9µs) by vars::BEGIN@7 at line 7 of vars.pm | ||||
18 | 8 | 8µs | shift; | ||
19 | 8 | 44µs | my $package = (caller(0))[0]; | ||
20 | 8 | 61µs | if (! defined $warnings::Bits{$package}) { | ||
21 | 8 | 37µs | 8 | 82µs | $warnings::Bits{$package} = mkMask($warnings::LAST_BIT); # spent 82µs making 8 calls to warnings::register::mkMask, avg 10µs/call |
22 | 8 | 20µs | vec($warnings::Bits{'all'}, $warnings::LAST_BIT, 1) = 1; | ||
23 | 8 | 19µs | $warnings::Offsets{$package} = $warnings::LAST_BIT ++; | ||
24 | 8 | 141µs | foreach my $k (keys %warnings::Bits) { | ||
25 | 404 | 409µs | vec($warnings::Bits{$k}, $warnings::LAST_BIT, 1) = 0; | ||
26 | } | ||||
27 | 8 | 34µs | 8 | 43µs | $warnings::DeadBits{$package} = mkMask($warnings::LAST_BIT); # spent 43µs making 8 calls to warnings::register::mkMask, avg 5µs/call |
28 | 8 | 24µs | vec($warnings::DeadBits{'all'}, $warnings::LAST_BIT++, 1) = 1; | ||
29 | } | ||||
30 | } | ||||
31 | |||||
32 | 1 | 4µs | 1; |