← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Sun Aug 5 15:24:32 2012
Reported on Sun Aug 5 15:24:47 2012

Filename/usr/lib/perl5/5.12.4/warnings/register.pm
StatementsExecuted 273 statements in 2.60ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
4442.25ms2.54mswarnings::register::::importwarnings::register::import
821293µs293µ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
316µsour $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
2414µsrequire warnings;
25
26sub mkMask
27
# spent 293µs within warnings::register::mkMask which was called 8 times, avg 37µs/call: # 4 times (171µs+0s) by warnings::register::import at line 40, avg 43µs/call # 4 times (122µs+0s) by warnings::register::import at line 46, avg 30µs/call
{
2832362µs my ($bit) = @_;
29 my $mask = "";
30
31 vec($mask, $bit, 1) = 1;
32 return $mask;
33}
34
35sub import
36
# spent 2.54ms (2.25+293µs) within warnings::register::import which was called 4 times, avg 635µs/call: # once (585µs+73µs) by vars::BEGIN@7 at line 7 of vars.pm # once (569µs+67µs) by overload::BEGIN@145 at line 145 of overload.pm # once (551µs+85µs) by Tie::Hash::BEGIN@189 at line 189 of Tie/Hash.pm # once (541µs+68µs) by constant::BEGIN@4 at line 4 of constant.pm
{
372382.21ms shift;
38 my $package = (caller(0))[0];
39 if (! defined $warnings::Bits{$package}) {
404171µs $warnings::Bits{$package} = mkMask($warnings::LAST_BIT);
# spent 171µs making 4 calls to warnings::register::mkMask, avg 43µ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 }
464122µs $warnings::DeadBits{$package} = mkMask($warnings::LAST_BIT);
# spent 122µs making 4 calls to warnings::register::mkMask, avg 30µs/call
47 vec($warnings::DeadBits{'all'}, $warnings::LAST_BIT++, 1) = 1;
48 }
49}
50
51116µs1;