← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:42:38 2010
Reported on Wed Nov 17 22:07:16 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/5.10.1/strict.pm
StatementsExecuted 613 statements in 7.62ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1831161143.23ms3.30msstrict::::importstrict::import
2631952µs952µsstrict::::bitsstrict::bits
272716918µs1.73msstrict::::unimportstrict::unimport
11162µs62µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
11122µs22µsstrict::::CORE:matchstrict::CORE:match (opcode)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package strict;
2
314µs$strict::VERSION = "1.04";
4
5# Verify that we're called correctly so that strictures will work.
61168µs284µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 62µs making 1 call to strict::CORE:regcomp # spent 22µs making 1 call to strict::CORE:match
7 # Can't use Carp, since Carp uses us!
8 my (undef, $f, $l) = caller;
9 die("Incorrect use of pragma '${\__PACKAGE__}' at $f line $l.\n");
10}
11
1219µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
17
18
# spent 952µs within strict::bits which was called 26 times, avg 37µs/call: # 23 times (813µs+0s) by strict::unimport at line 41, avg 35µs/call # 2 times (78µs+0s) by strict::import at line 36, avg 39µs/call # once (61µs+0s) by Moose::BEGIN@2 at line 32
sub bits {
192682µs my $bits = 0;
202659µs my @wrong;
2126177µs foreach my $s (@_) {
222993µs push @wrong, $s unless exists $bitmask{$s};
2329257µs $bits |= $bitmask{$s} || 0;
24 }
252659µs if (@wrong) {
26 require Carp;
27 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
28 }
2926494µs $bits;
30}
31
32112µs161µsmy $default_bits = bits(qw(refs subs vars));
# spent 61µs making 1 call to strict::bits
33
34
# spent 3.30ms (3.23+78µs) within strict::import which was called 183 times, avg 18µs/call: # 66 times (1.01ms+0s) by Moose::Exporter::__ANON__[/home/doy/coding/src/Moose/blib/lib//Moose/Exporter.pm:456] at line 413 of Moose/Exporter.pm, avg 15µs/call # 3 times (53µs+0s) by Moose::Exporter::import at line 647 of Moose/Exporter.pm, avg 18µs/call # once (32µs+40µs) by vars::BEGIN@8 at line 8 of vars.pm # once (33µs+37µs) by base::BEGIN@3 at line 3 of base.pm # once (52µs+0s) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm # once (28µs+0s) by Moose::Meta::TypeConstraint::Union::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Union.pm # once (25µs+0s) by Class::MOP::Deprecated::BEGIN@3 at line 3 of Class/MOP/Deprecated.pm # once (25µs+0s) by Memoize::BEGIN@34 at line 34 of Memoize.pm # once (24µs+0s) by Moose::Object::BEGIN@4 at line 4 of Moose/Object.pm # once (23µs+0s) by Class::MOP::Class::BEGIN@4 at line 4 of Class/MOP/Class.pm # once (22µs+0s) by Eval::Closure::BEGIN@5 at line 5 of Eval/Closure.pm # once (22µs+0s) by Moose::BEGIN@2 at line 2 of Moose.pm # once (22µs+0s) by Moose::Meta::Method::Augmented::BEGIN@3 at line 3 of Moose/Meta/Method/Augmented.pm # once (21µs+0s) by Moose::Meta::Method::Accessor::Native::Array::elements::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Array/elements.pm # once (20µs+0s) by Moose::Meta::Role::Application::RoleSummation::BEGIN@3 at line 3 of Moose/Meta/Role/Application/RoleSummation.pm # once (20µs+0s) by Class::MOP::Method::Constructor::BEGIN@4 at line 4 of Class/MOP/Method/Constructor.pm # once (20µs+0s) by Moose::Meta::Method::Accessor::Native::Array::clear::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Array/clear.pm # once (20µs+0s) by re::BEGIN@4 at line 4 of re.pm # once (20µs+0s) by Moose::Util::MetaRole::BEGIN@3 at line 3 of Moose/Util/MetaRole.pm # once (20µs+0s) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (19µs+0s) by AutoLoader::BEGIN@3 at line 3 of AutoLoader.pm # once (19µs+0s) by Class::MOP::Attribute::BEGIN@4 at line 4 of Class/MOP/Attribute.pm # once (19µs+0s) by Moose::Meta::TypeConstraint::Class::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Class.pm # once (19µs+0s) by namespace::clean::BEGIN@1 at line 1 of B/Hooks/EndOfScope.pm # once (19µs+0s) by Moose::Meta::Mixin::AttributeCore::BEGIN@3 at line 3 of Moose/Meta/Mixin/AttributeCore.pm # once (19µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::values::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Hash/values.pm # once (19µs+0s) by Class::MOP::Method::Accessor::BEGIN@4 at line 4 of Class/MOP/Method/Accessor.pm # once (19µs+0s) by Moose::Meta::Method::Delegation::BEGIN@4 at line 4 of Moose/Meta/Method/Delegation.pm # once (19µs+0s) by Class::MOP::MiniTrait::BEGIN@3 at line 3 of Class/MOP/MiniTrait.pm # once (19µs+0s) by Hash::Util::FieldHash::Compat::BEGIN@5 at line 5 of Hash/Util/FieldHash/Compat.pm # once (19µs+0s) by Moose::Meta::Method::Accessor::Native::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native.pm # once (19µs+0s) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (19µs+0s) by Data::UUID::LibUUID::BEGIN@5 at line 5 of Data/UUID/LibUUID.pm # once (19µs+0s) by Moose::Meta::Method::Destructor::BEGIN@4 at line 4 of Moose/Meta/Method/Destructor.pm # once (19µs+0s) by Moose::Meta::Role::Composite::BEGIN@3 at line 3 of Moose/Meta/Role/Composite.pm # once (19µs+0s) by Class::MOP::Mixin::HasMethods::BEGIN@3 at line 3 of Class/MOP/Mixin/HasMethods.pm # once (19µs+0s) by Moose::Meta::Method::Overridden::BEGIN@3 at line 3 of Moose/Meta/Method/Overridden.pm # once (19µs+0s) by Class::MOP::Mixin::HasAttributes::BEGIN@3 at line 3 of Class/MOP/Mixin/HasAttributes.pm # once (19µs+0s) by Moose::Meta::Method::Meta::BEGIN@4 at line 4 of Moose/Meta/Method/Meta.pm # once (19µs+0s) by Set::Object::BEGIN@497 at line 497 of Set/Object.pm # once (19µs+0s) by Moose::Meta::TypeConstraint::DuckType::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/DuckType.pm # once (19µs+0s) by Config::BEGIN@9 at line 9 of Config.pm # once (19µs+0s) by Moose::Meta::Role::Method::Conflicting::BEGIN@4 at line 4 of Moose/Meta/Role/Method/Conflicting.pm # once (19µs+0s) by KiokuDB::LiveObjects::Guard::BEGIN@3 at line 3 of KiokuDB/LiveObjects/Guard.pm # once (18µs+0s) by Class::MOP::Method::Wrapped::BEGIN@4 at line 4 of Class/MOP/Method/Wrapped.pm # once (18µs+0s) by Moose::Meta::Role::BEGIN@4 at line 4 of Moose/Meta/Role.pm # once (18µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (18µs+0s) by Moose::Util::BEGIN@3 at line 3 of Moose/Util.pm # once (18µs+0s) by Data::OptList::BEGIN@3 at line 3 of Data/OptList.pm # once (18µs+0s) by Moose::Meta::Attribute::BEGIN@4 at line 4 of Moose/Meta/Attribute.pm # once (18µs+0s) by Class::MOP::Method::BEGIN@4 at line 4 of Class/MOP/Method.pm # once (18µs+0s) by Moose::Meta::Method::Constructor::BEGIN@4 at line 4 of Moose/Meta/Method/Constructor.pm # once (18µs+0s) by Tie::ToObject::BEGIN@5 at line 5 of Tie/ToObject.pm # once (18µs+0s) by Moose::Meta::Class::Immutable::Trait::BEGIN@3 at line 3 of Moose/Meta/Class/Immutable/Trait.pm # once (18µs+0s) by Class::MOP::Package::BEGIN@4 at line 4 of Class/MOP/Package.pm # once (18µs+0s) by Class::MOP::Method::Generated::BEGIN@4 at line 4 of Class/MOP/Method/Generated.pm # once (18µs+0s) by Moose::Meta::Role::Method::BEGIN@4 at line 4 of Moose/Meta/Role/Method.pm # once (18µs+0s) by Moose::Meta::Role::Attribute::BEGIN@3 at line 3 of Moose/Meta/Role/Attribute.pm # once (18µs+0s) by Moose::Meta::Method::Accessor::Native::Hash::keys::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Hash/keys.pm # once (18µs+0s) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Parameterized.pm # once (18µs+0s) by Config::BEGIN@5 at line 5 of Config_heavy.pl # once (18µs+0s) by Moose::Meta::Method::Accessor::Native::Array::Writer::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Array/Writer.pm # once (18µs+0s) by Class::MOP::Class::Immutable::Trait::BEGIN@3 at line 3 of Class/MOP/Class/Immutable/Trait.pm # once (18µs+0s) by Moose::Meta::Instance::BEGIN@4 at line 4 of Moose/Meta/Instance.pm # once (18µs+0s) by Scope::Guard::BEGIN@3 at line 3 of Scope/Guard.pm # once (18µs+0s) by Devel::GlobalDestruction::BEGIN@5 at line 5 of Devel/GlobalDestruction.pm # once (18µs+0s) by Moose::Meta::Role::Application::ToInstance::BEGIN@3 at line 3 of Moose/Meta/Role/Application/ToInstance.pm # once (18µs+0s) by Moose::Error::Default::BEGIN@3 at line 3 of Moose/Error/Default.pm # once (18µs+0s) by Moose::Meta::TypeCoercion::BEGIN@4 at line 4 of Moose/Meta/TypeCoercion.pm # once (18µs+0s) by Class::MOP::Method::Inlined::BEGIN@3 at line 3 of Class/MOP/Method/Inlined.pm # once (18µs+0s) by Moose::Meta::TypeCoercion::Union::BEGIN@4 at line 4 of Moose/Meta/TypeCoercion/Union.pm # once (18µs+0s) by Moose::Role::BEGIN@2 at line 2 of Moose/Role.pm # once (18µs+0s) by Moose::Meta::Method::Accessor::Native::Reader::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Reader.pm # once (18µs+0s) by Moose::Meta::TypeConstraint::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint.pm # once (18µs+0s) by List::Util::BEGIN@11 at line 11 of List/Util.pm # once (18µs+0s) by Try::Tiny::BEGIN@3 at line 3 of Try/Tiny.pm # once (18µs+0s) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Array.pm # once (18µs+0s) by Class::MOP::Mixin::AttributeCore::BEGIN@3 at line 3 of Class/MOP/Mixin/AttributeCore.pm # once (18µs+0s) by Moose::Meta::Role::Application::BEGIN@3 at line 3 of Moose/Meta/Role/Application.pm # once (18µs+0s) by Moose::Meta::TypeConstraint::Role::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Role.pm # once (18µs+0s) by Moose::Meta::TypeConstraint::Registry::BEGIN@4 at line 4 of Moose/Meta/TypeConstraint/Registry.pm # once (18µs+0s) by Moose::Deprecated::BEGIN@3 at line 3 of Moose/Deprecated.pm # once (18µs+0s) by Moose::Meta::TypeConstraint::Enum::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Enum.pm # once (18µs+0s) by Class::MOP::Module::BEGIN@4 at line 4 of Class/MOP/Module.pm # once (18µs+0s) by Moose::Meta::Role::Application::ToRole::BEGIN@3 at line 3 of Moose/Meta/Role/Application/ToRole.pm # once (18µs+0s) by Sub::Name::BEGIN@44 at line 44 of Sub/Name.pm # once (18µs+0s) by Variable::Magic::BEGIN@5 at line 5 of Variable/Magic.pm # once (18µs+0s) by Moose::Util::TypeConstraints::OptimizedConstraints::BEGIN@3 at line 3 of Moose/Util/TypeConstraints/OptimizedConstraints.pm # once (18µs+0s) by Moose::Meta::Role::Method::Required::BEGIN@4 at line 4 of Moose/Meta/Role/Method/Required.pm # once (17µs+0s) by Package::Stash::BEGIN@5 at line 5 of Package/Stash.pm # once (17µs+0s) by Moose::Meta::Method::Accessor::Native::Collection::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Collection.pm # once (17µs+0s) by Sub::Identify::BEGIN@3 at line 3 of Sub/Identify.pm # once (17µs+0s) by Moose::Meta::Method::Accessor::Native::Array::push::BEGIN@3 at line 3 of Moose/Meta/Method/Accessor/Native/Array/push.pm # once (17µs+0s) by Moose::Meta::Method::Accessor::BEGIN@4 at line 4 of Moose/Meta/Method/Accessor.pm # once (17µs+0s) by Package::Stash::XS::BEGIN@5 at line 5 of Package/Stash/XS.pm # once (17µs+0s) by Moose::Meta::Class::BEGIN@4 at line 4 of Moose/Meta/Class.pm # once (17µs+0s) by Eval::Closure::BEGIN@2.1 at line 2 of Sub/Exporter.pm # once (17µs+0s) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (17µs+0s) by Class::MOP::Object::BEGIN@4 at line 4 of Class/MOP/Object.pm # once (17µs+0s) by Moose::Exporter::BEGIN@3 at line 3 of Moose/Exporter.pm # once (17µs+0s) by Class::MOP::BEGIN@4 at line 4 of Class/MOP.pm # once (17µs+0s) by Hash::Util::FieldHash::BEGIN@4 at line 4 of Hash/Util/FieldHash.pm # once (17µs+0s) by Time::HiRes::BEGIN@3 at line 3 of Time/HiRes.pm # once (17µs+0s) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@3 at line 3 of Moose/Meta/TypeConstraint/Parameterizable.pm # once (17µs+0s) by Class::MOP::Mixin::BEGIN@3 at line 3 of Class/MOP/Mixin.pm # once (17µs+0s) by Moose::Meta::Role::Application::ToClass::BEGIN@3 at line 3 of Moose/Meta/Role/Application/ToClass.pm # once (17µs+0s) by MRO::Compat::BEGIN@2 at line 2 of MRO/Compat.pm # once (17µs+0s) by metaclass::BEGIN@4 at line 4 of metaclass.pm # once (17µs+0s) by constant::BEGIN@3 at line 3 of constant.pm # once (16µs+0s) by mro::BEGIN@10 at line 10 of mro.pm # once (16µs+0s) by Class::MOP::Method::Meta::BEGIN@4 at line 4 of Class/MOP/Method/Meta.pm # once (16µs+0s) by Package::DeprecationManager::BEGIN@6 at line 6 of Package/DeprecationManager.pm # once (16µs+0s) by Class::MOP::Instance::BEGIN@4 at line 4 of Class/MOP/Instance.pm # once (16µs+0s) by Moose::Meta::Method::BEGIN@3 at line 3 of Moose/Meta/Method.pm # once (15µs+0s) by namespace::clean::BEGIN@11 at line 11 of namespace/clean.pm # once (15µs+0s) by Sub::Install::BEGIN@4 at line 4 of Sub/Install.pm
sub import {
35183526µs shift;
361834.73ms278µs $^H |= @_ ? bits(@_) : $default_bits;
# spent 78µs making 2 calls to strict::bits, avg 39µs/call
37}
38
39
# spent 1.73ms (918µs+813µs) within strict::unimport which was called 27 times, avg 64µs/call: # once (68µs+33µs) by MRO::Compat::BEGIN@256 at line 256 of MRO/Compat.pm # once (55µs+37µs) by Config::BEGIN@35 at line 35 of Config.pm # once (41µs+38µs) by Class::MOP::Module::BEGIN@64 at line 64 of Class/MOP/Module.pm # once (39µs+37µs) by Moose::Exporter::BEGIN@567 at line 567 of Moose/Exporter.pm # once (39µs+37µs) by Carp::BEGIN@300 at line 300 of Carp/Heavy.pm # once (38µs+37µs) by Moose::Object::BEGIN@83 at line 83 of Moose/Object.pm # once (37µs+37µs) by Moose::Exporter::BEGIN@272 at line 272 of Moose/Exporter.pm # once (38µs+36µs) by Moose::Exporter::BEGIN@120 at line 120 of Moose/Exporter.pm # once (36µs+39µs) by Sub::Install::BEGIN@184 at line 184 of Sub/Install.pm # once (37µs+36µs) by AutoLoader::BEGIN@138 at line 138 of AutoLoader.pm # once (35µs+36µs) by Time::HiRes::BEGIN@42 at line 42 of Time/HiRes.pm # once (35µs+35µs) by constant::BEGIN@101 at line 101 of constant.pm # once (34µs+35µs) by Class::MOP::Class::Immutable::Trait::BEGIN@36 at line 36 of Class/MOP/Class/Immutable/Trait.pm # once (34µs+35µs) by Moose::Util::TypeConstraints::BEGIN@66 at line 66 of Moose/Util/TypeConstraints.pm # once (33µs+35µs) by constant::BEGIN@38 at line 38 of constant.pm # once (34µs+34µs) by MRO::Compat::BEGIN@225 at line 225 of MRO/Compat.pm # once (30µs+37µs) by AutoLoader::BEGIN@30 at line 30 of AutoLoader.pm # once (30µs+36µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm # once (31µs+34µs) by MRO::Compat::BEGIN@116 at line 116 of MRO/Compat.pm # once (30µs+34µs) by Class::MOP::Class::BEGIN@468 at line 468 of Class/MOP/Class.pm # once (29µs+33µs) by Moose::Meta::Role::BEGIN@636 at line 636 of Moose/Meta/Role.pm # once (31µs+31µs) by AutoLoader::BEGIN@186 at line 186 of AutoLoader.pm # once (25µs+29µs) by Moose::Exporter::BEGIN@577 at line 577 of Moose/Exporter.pm # once (26µs+0s) by Memoize::BEGIN@97 at line 97 of Memoize.pm # once (20µs+0s) by Memoize::BEGIN@228 at line 228 of Memoize.pm # once (17µs+0s) by Memoize::BEGIN@293 at line 293 of Memoize.pm # once (15µs+0s) by Memoize::BEGIN@330 at line 330 of Memoize.pm
sub unimport {
402778µs shift;
4127845µs23813µs $^H &= ~ (@_ ? bits(@_) : $default_bits);
# spent 813µs making 23 calls to strict::bits, avg 35µs/call
42}
43
44131µs1;
45__END__
 
# spent 22µs within strict::CORE:match which was called: # once (22µs+0s) by Moose::BEGIN@2 at line 6
sub strict::CORE:match; # opcode
# spent 62µs within strict::CORE:regcomp which was called: # once (62µs+0s) by Moose::BEGIN@2 at line 6
sub strict::CORE:regcomp; # opcode