Profile of warnings/register.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For xt/tapper-mcp-scheduler-with-db-longrun.t
Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:34 2012

Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/5.12.3/warnings/register.pm
Statements | Executed 708 statements in 703µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
10 | 10 | 10 | 604µs | 682µs | warnings::register::::importwarnings::register::import
20 | 2 | 1 | 78µs | 78µs | warnings::register::::mkMaskwarnings::register::mkMask

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package warnings::register;
2 |  |  |  |  |
3 | 1 | 400ns |  |  | our $VERSION = '1.01';
4 |  |  |  |  |
5 |  |  |  |  | =pod
6 |  |  |  |  |
7 |  |  |  |  | =head1 NAME
8 |  |  |  |  |
9 |  |  |  |  | warnings::register - warnings import function
10 |  |  |  |  |
11 |  |  |  |  | =head1 SYNOPSIS
12 |  |  |  |  |
13 |  |  |  |  | use warnings::register;
14 |  |  |  |  |
15 |  |  |  |  | =head1 DESCRIPTION
16 |  |  |  |  |
17 |  |  |  |  | Creates a warnings category with the same name as the current package.
18 |  |  |  |  |
19 |  |  |  |  | See L<warnings> and L<perllexwarn> for more information on this module's
20 |  |  |  |  | usage.
21 |  |  |  |  |
22 |  |  |  |  | =cut
23 |  |  |  |  |
24 | 1 | 300ns |  |  | require warnings;
25 |  |  |  |  |
26 |  |  |  |  | sub mkMask
27 |  |  |  |  | # spent 78µs within warnings::register::mkMask which was called 20 times, avg 4µs/call: # 10 times (56µs+0s) by warnings::register::import at line 40, avg 6µs/call # 10 times (22µs+0s) by warnings::register::import at line 46, avg 2µs/call {
28 | 80 | 110µs |  |  | my ($bit) = @_;
29 |  |  |  |  | my $mask = "";
30 |  |  |  |  |
31 |  |  |  |  | vec($mask, $bit, 1) = 1;
32 |  |  |  |  | return $mask;
33 |  |  |  |  | }
34 |  |  |  |  |
35 |  |  |  |  | sub import
36 |  |  |  |  | # spent 682µs (604+78) within warnings::register::import which was called 10 times, avg 68µs/call: # once (67µs+10µs) by Class::Struct::BEGIN@8 at line 8 of Class/Struct.pm # once (68µs+7µs) by File::Find::BEGIN@5 at line 5 of File/Find.pm # once (65µs+8µs) by File::stat::BEGIN@6 at line 6 of File/stat.pm # once (65µs+7µs) by Socket::BEGIN@649 at line 649 of Socket.pm # once (62µs+8µs) by IO::Select::BEGIN@10 at line 10 of IO/Select.pm # once (59µs+8µs) by Tie::Hash::BEGIN@189 at line 189 of Tie/Hash.pm # once (58µs+7µs) by MooseX::Traits::BEGIN@7 at line 7 of MooseX/Traits.pm # once (56µs+8µs) by constant::BEGIN@4 at line 4 of constant.pm # once (53µs+7µs) by overload::BEGIN@145 at line 145 of overload.pm # once (52µs+7µs) by vars::BEGIN@7 at line 7 of vars.pm {
37 | 625 | 590µs |  |  | shift;
38 |  |  |  |  | my $package = (caller(0))[0];
39 |  |  |  |  | if (! defined $warnings::Bits{$package}) {
40 |  |  | 10 | 56µs | $warnings::Bits{$package} = mkMask($warnings::LAST_BIT); # spent 56µs making 10 calls to warnings::register::mkMask, avg 6µs/call
41 |  |  |  |  | vec($warnings::Bits{'all'}, $warnings::LAST_BIT, 1) = 1;
42 |  |  |  |  | $warnings::Offsets{$package} = $warnings::LAST_BIT ++;
43 |  |  |  |  | foreach my $k (keys %warnings::Bits) {
44 |  |  |  |  | vec($warnings::Bits{$k}, $warnings::LAST_BIT, 1) = 0;
45 |  |  |  |  | }
46 |  |  | 10 | 22µs | $warnings::DeadBits{$package} = mkMask($warnings::LAST_BIT); # spent 22µs making 10 calls to warnings::register::mkMask, avg 2µs/call
47 |  |  |  |  | vec($warnings::DeadBits{'all'}, $warnings::LAST_BIT++, 1) = 1;
48 |  |  |  |  | }
49 |  |  |  |  | }
50 |  |  |  |  |
51 | 1 | 2µs |  |  | 1;