← Index
NYTProf Performance Profile   « block view • line view • sub view »
For 05.Domain_and_Item.t
  Run on Tue May 4 17:21:41 2010
Reported on Tue May 4 17:22:48 2010

File /usr/local/lib/perl5/5.10.1/warnings/register.pm
Statements Executed 472
Statement Execution Time 479µs
Subroutines — ordered by exclusive time
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
777482µs544µswarnings::register::::importwarnings::register::import
142162µs62µswarnings::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
1package warnings::register;
2
31600nsour $VERSION = '1.01';
4
5=pod
6
7=head1 NAME
8
9warnings::register - warnings import function
10
11=head1 SYNOPSIS
12
13 use warnings::register;
14
15=head1 DESCRIPTION
16
17Creates a warnings category with the same name as the current package.
18
19See L<warnings> and L<perllexwarn> for more information on this module's
20usage.
21
22=cut
23
241300nsrequire warnings;
25
26sub mkMask
27
# spent 62µs within warnings::register::mkMask which was called 14 times, avg 4µs/call: # 7 times (45µs+0s) by warnings::register::import at line 40, avg 6µs/call # 7 times (16µs+0s) by warnings::register::import at line 46, avg 2µs/call
{
285683µs my ($bit) = @_;
29 my $mask = "";
30
31 vec($mask, $bit, 1) = 1;
32 return $mask;
33}
34
35sub import
36
# spent 544µs (482+62) within warnings::register::import which was called 7 times, avg 78µs/call: # once (115µs+13µs) by IO::Select::BEGIN@10 at line 10 of IO/Select.pm # once (68µs+8µs) by File::Find::BEGIN@5 at line 5 of File/Find.pm # once (65µs+8µs) by constant::BEGIN@4 at line 4 of constant.pm # once (62µs+8µs) by Socket::BEGIN@179 at line 179 of Socket.pm # once (60µs+10µs) by overload::BEGIN@139 at line 139 of overload.pm # once (58µs+8µs) by Tie::Hash::BEGIN@189 at line 189 of Tie/Hash.pm # once (54µs+6µs) by vars::BEGIN@7 at line 7 of vars.pm
{
372172µs shift;
38 my $package = (caller(0))[0];
3942174µs if (! defined $warnings::Bits{$package}) {
40 $warnings::Bits{$package} = mkMask($warnings::LAST_BIT);
# spent 45µs making 7 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) {
44350142µs vec($warnings::Bits{$k}, $warnings::LAST_BIT, 1) = 0;
45 }
46 $warnings::DeadBits{$package} = mkMask($warnings::LAST_BIT);
# spent 16µs making 7 calls to warnings::register::mkMask, avg 2µs/call
47 vec($warnings::DeadBits{'all'}, $warnings::LAST_BIT++, 1) = 1;
48 }
49}
50
5117µs1;