← Index
NYTProf Performance Profile   « line view »
For examples/Atom-timer.pl
  Run on Mon Aug 12 14:45:28 2013
Reported on Mon Aug 12 14:46:13 2013

Filename/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/5.18.0/strict.pm
StatementsExecuted 2789 statements in 1.89ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
185211.23ms1.23msstrict::::bitsstrict::bits
155128124544µs1.62msstrict::::importstrict::import
303018125µs271µsstrict::::unimportstrict::unimport
11115µs15µsstrict::::CORE:regcompstrict::CORE:regcomp (opcode)
1114µs4µ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
31500ns$strict::VERSION = "1.07";
4
5# Verify that we're called correctly so that strictures will work.
6131µs219µsunless ( __FILE__ =~ /(^|[\/\\])\Q${\__PACKAGE__}\E\.pmc?$/ ) {
# spent 15µs making 1 call to strict::CORE:regcomp # spent 4µ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
1214µsmy %bitmask = (
13refs => 0x00000002,
14subs => 0x00000200,
15vars => 0x00000400
16);
171600nsmy %explicit_bitmask = (
18refs => 0x00000020,
19subs => 0x00000040,
20vars => 0x00000080
21);
22
23
# spent 1.23ms within strict::bits which was called 185 times, avg 7µs/call: # 155 times (1.08ms+0s) by strict::import at line 44, avg 7µs/call # 30 times (146µs+0s) by strict::unimport at line 49, avg 5µs/call
sub bits {
2418535µs my $bits = 0;
251855µs my @wrong;
26185121µs foreach my $s (@_) {
2749699µs if (exists $bitmask{$s}) {
28496211µs $^H |= $explicit_bitmask{$s};
29 }
30 else { push @wrong, $s };
31496196µs $bits |= $bitmask{$s} || 0;
32 }
3318536µs if (@wrong) {
34 require Carp;
35 Carp::croak("Unknown 'strict' tag(s) '@wrong'");
36 }
37185405µs $bits;
38}
39
401800nsmy @default_bits = qw(refs subs vars);
41
42
# spent 1.62ms (544µs+1.08) within strict::import which was called 155 times, avg 10µs/call: # 26 times (72µs+168µs) by Moose::Exporter::__ANON__[/Users/dde/perl5/perlbrew/perls/5.18.0t/lib/site_perl/5.18.0/darwin-thread-multi-2level/Moose/Exporter.pm:519] at line 464 of Moose/Exporter.pm, avg 9µs/call # 3 times (10µs+19µs) by Moose::Exporter::import at line 782 of Moose/Exporter.pm, avg 10µs/call # once (4µs+15µs) by Sub::Exporter::Progressive::BEGIN@3 at line 3 of Sub/Exporter/Progressive.pm # once (4µs+16µs) by Moose::Meta::TypeConstraint::Enum::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Enum.pm # once (6µs+12µs) by Class::MOP::Deprecated::BEGIN@9 at line 9 of Class/MOP/Deprecated.pm # once (6µs+11µs) by Modern::Perl::BEGIN@9 at line 9 of Modern/Perl.pm # once (6µs+9µs) by Moose::Meta::Method::Accessor::Native::Array::clear::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/clear.pm # once (5µs+10µs) by re::BEGIN@4 at line 4 of re.pm # once (3µs+11µs) by IO::Handle::BEGIN@264 at line 264 of IO/Handle.pm # once (5µs+9µs) by Moose::Meta::Method::Accessor::Native::Array::delete::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/delete.pm # once (6µs+7µs) by mro::BEGIN@10 at line 10 of mro.pm # once (6µs+7µs) by Class::MOP::Object::BEGIN@10 at line 10 of Class/MOP/Object.pm # once (4µs+8µs) by Class::MOP::Attribute::BEGIN@10 at line 10 of Class/MOP/Attribute.pm # once (4µs+8µs) by Fcntl::BEGIN@58 at line 58 of Fcntl.pm # once (3µs+9µs) by Moose::Meta::TypeCoercion::Union::BEGIN@10 at line 10 of Moose/Meta/TypeCoercion/Union.pm # once (5µs+7µs) by Sub::Exporter::Progressive::BEGIN@23 at line 23 of Sub/Exporter/Progressive.pm # once (4µs+7µs) by Config::BEGIN@9 at line 9 of Config.pm # once (4µs+8µs) by Class::MOP::Method::Constructor::BEGIN@10 at line 10 of Class/MOP/Method/Constructor.pm # once (4µs+8µs) by Exporter::Heavy::BEGIN@3 at line 3 of Exporter/Heavy.pm # once (4µs+8µs) by Class::MOP::MiniTrait::BEGIN@9 at line 9 of Class/MOP/MiniTrait.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::Writer::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/Writer.pm # once (4µs+7µs) by Moose::Meta::Method::Augmented::BEGIN@9 at line 9 of Moose/Meta/Method/Augmented.pm # once (4µs+7µs) by Class::MOP::Method::Accessor::BEGIN@10 at line 10 of Class/MOP/Method/Accessor.pm # once (4µs+7µs) by Moose::Util::MetaRole::BEGIN@9 at line 9 of Moose/Util/MetaRole.pm # once (4µs+7µs) by Class::MOP::Method::Inlined::BEGIN@9 at line 9 of Class/MOP/Method/Inlined.pm # once (4µs+7µs) by Moose::Error::Util::BEGIN@4 at line 4 of Moose/Error/Util.pm # once (4µs+7µs) by Class::MOP::Class::Immutable::Trait::BEGIN@9 at line 9 of Class/MOP/Class/Immutable/Trait.pm # once (4µs+7µs) by Moose::Error::Default::BEGIN@9 at line 9 of Moose/Error/Default.pm # once (4µs+7µs) by IO::File::BEGIN@128 at line 128 of IO/File.pm # once (4µs+7µs) by Try::Tiny::BEGIN@11 at line 11 of Try/Tiny.pm # once (4µs+7µs) by Moose::Meta::Instance::BEGIN@10 at line 10 of Moose/Meta/Instance.pm # once (4µs+7µs) by List::Util::BEGIN@11 at line 11 of List/Util.pm # once (4µs+7µs) by Moose::Meta::Method::Overridden::BEGIN@9 at line 9 of Moose/Meta/Method/Overridden.pm # once (4µs+7µs) by Moose::Util::TypeConstraints::Builtins::BEGIN@9 at line 9 of Moose/Util/TypeConstraints/Builtins.pm # once (4µs+7µs) by Class::MOP::Class::BEGIN@10 at line 10 of Class/MOP/Class.pm # once (4µs+7µs) by Class::Load::XS::BEGIN@6 at line 6 of Class/Load/XS.pm # once (4µs+7µs) by Moose::Meta::Mixin::AttributeCore::BEGIN@9 at line 9 of Moose/Meta/Mixin/AttributeCore.pm # once (4µs+7µs) by Benchmark::BEGIN@3 at line 3 of Benchmark.pm # once (4µs+7µs) by Devel::GlobalDestruction::BEGIN@3 at line 3 of Devel/GlobalDestruction.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::set::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/set.pm # once (4µs+7µs) by Module::Implementation::BEGIN@9 at line 9 of Module/Implementation.pm # once (4µs+7µs) by Moose::Meta::Method::Meta::BEGIN@10 at line 10 of Moose/Meta/Method/Meta.pm # once (4µs+7µs) by Atom::BEGIN@1 at line 1 of namespace/autoclean.pm # once (4µs+7µs) by Moose::Meta::Method::BEGIN@9 at line 9 of Moose/Meta/Method.pm # once (4µs+7µs) by Class::MOP::Method::Wrapped::BEGIN@10 at line 10 of Class/MOP/Method/Wrapped.pm # once (4µs+7µs) by Class::MOP::Module::BEGIN@10 at line 10 of Class/MOP/Module.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native.pm # once (4µs+7µs) by Class::Load::BEGIN@1 at line 1 of Data/OptList.pm # once (4µs+7µs) by MooseX::Storage::BEGIN@1 at line 1 of String/RewritePrefix.pm # once (4µs+7µs) by Moose::Meta::Role::Method::Conflicting::BEGIN@10 at line 10 of Moose/Meta/Role/Method/Conflicting.pm # once (4µs+7µs) by Class::MOP::Method::Overload::BEGIN@10 at line 10 of Class/MOP/Method/Overload.pm # once (4µs+7µs) by Moose::Role::BEGIN@8 at line 8 of Moose/Role.pm # once (4µs+7µs) by Package::DeprecationManager::BEGIN@6 at line 6 of Package/DeprecationManager.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Writer::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Writer.pm # once (3µs+7µs) by Package::Stash::BEGIN@8 at line 8 of Package/Stash.pm # once (4µs+7µs) by Moose::Meta::Class::Immutable::Trait::BEGIN@9 at line 9 of Moose/Meta/Class/Immutable/Trait.pm # once (4µs+7µs) by Class::MOP::Method::Generated::BEGIN@10 at line 10 of Class/MOP/Method/Generated.pm # once (4µs+7µs) by Moose::Util::BEGIN@9 at line 9 of Moose/Util.pm # once (4µs+7µs) by Moose::Meta::TypeConstraint::Class::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Class.pm # once (4µs+7µs) by Moose::Meta::Role::Application::ToClass::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToClass.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Collection::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Collection.pm # once (4µs+6µs) by MRO::Compat::BEGIN@2 at line 2 of MRO/Compat.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::count::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/count.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::elements::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/elements.pm # once (4µs+7µs) by Time::HiRes::BEGIN@4 at line 4 of Time/HiRes.pm # once (3µs+7µs) by Moose::Meta::Role::Composite::BEGIN@9 at line 9 of Moose/Meta/Role/Composite.pm # once (3µs+7µs) by Package::Stash::XS::BEGIN@8 at line 8 of Package/Stash/XS.pm # once (4µs+7µs) by Moose::Meta::Role::Application::ToRole::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToRole.pm # once (4µs+7µs) by constant::BEGIN@3 at line 3 of constant.pm # once (4µs+7µs) by Class::MOP::Mixin::AttributeCore::BEGIN@9 at line 9 of Class/MOP/Mixin/AttributeCore.pm # once (3µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::push::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/push.pm # once (4µs+7µs) by Class::MOP::Mixin::HasMethods::BEGIN@9 at line 9 of Class/MOP/Mixin/HasMethods.pm # once (4µs+7µs) by Carp::BEGIN@4 at line 4 of Carp.pm # once (3µs+7µs) by Moose::Meta::TypeConstraint::DuckType::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/DuckType.pm # once (3µs+7µs) by Moose::Meta::TypeConstraint::Role::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Role.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Reader::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Reader.pm # once (4µs+7µs) by Moose::Meta::Method::Delegation::BEGIN@10 at line 10 of Moose/Meta/Method/Delegation.pm # once (3µs+7µs) by Params::Util::BEGIN@59 at line 59 of Params/Util.pm # once (3µs+7µs) by Moose::Meta::Role::Attribute::BEGIN@9 at line 9 of Moose/Meta/Role/Attribute.pm # once (3µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::get::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array/get.pm # once (4µs+7µs) by Class::Load::BEGIN@5 at line 5 of Class/Load.pm # once (3µs+7µs) by Moose::BEGIN@8 at line 8 of Moose.pm # once (3µs+7µs) by Moose::Meta::TypeCoercion::BEGIN@10 at line 10 of Moose/Meta/TypeCoercion.pm # once (4µs+7µs) by Moose::Meta::Method::Accessor::Native::Array::BEGIN@9 at line 9 of Moose/Meta/Method/Accessor/Native/Array.pm # once (4µs+7µs) by Moose::Meta::Class::BEGIN@10 at line 10 of Moose/Meta/Class.pm # once (3µs+7µs) by Moose::Meta::TypeConstraint::Registry::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Registry.pm # once (3µs+7µs) by Moose::Exporter::BEGIN@9 at line 9 of Moose/Exporter.pm # once (3µs+7µs) by Moose::Meta::Role::Application::RoleSummation::BEGIN@9 at line 9 of Moose/Meta/Role/Application/RoleSummation.pm # once (3µs+7µs) by Moose::Meta::TypeConstraint::Parameterized::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Parameterized.pm # once (4µs+7µs) by Moose::Meta::Role::Application::ToInstance::BEGIN@9 at line 9 of Moose/Meta/Role/Application/ToInstance.pm # once (3µs+7µs) by Moose::Meta::TypeConstraint::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint.pm # once (3µs+7µs) by Moose::Meta::Role::BEGIN@9 at line 9 of Moose/Meta/Role.pm # once (4µs+6µs) by Scalar::Util::BEGIN@9 at line 9 of Scalar/Util.pm # once (3µs+7µs) by Eval::Closure::BEGIN@8 at line 8 of Eval/Closure.pm # once (3µs+7µs) by Class::MOP::Package::BEGIN@10 at line 10 of Class/MOP/Package.pm # once (3µs+7µs) by Moose::Meta::Method::Constructor::BEGIN@10 at line 10 of Moose/Meta/Method/Constructor.pm # once (3µs+7µs) by Moose::Deprecated::BEGIN@9 at line 9 of Moose/Deprecated.pm # once (3µs+7µs) by Sub::Name::BEGIN@44 at line 44 of Sub/Name.pm # once (4µs+7µs) by Moose::Meta::Attribute::BEGIN@10 at line 10 of Moose/Meta/Attribute.pm # once (3µs+7µs) by Moose::Exporter::BEGIN@2.1 at line 2 of Sub/Exporter.pm # once (3µs+7µs) by Moose::Meta::Method::Destructor::BEGIN@10 at line 10 of Moose/Meta/Method/Destructor.pm # once (3µs+7µs) by IO::Seekable::BEGIN@99 at line 99 of IO/Seekable.pm # once (3µs+7µs) by Sub::Install::BEGIN@4 at line 4 of Sub/Install.pm # once (3µs+7µs) by Moose::Meta::Role::Method::BEGIN@10 at line 10 of Moose/Meta/Role/Method.pm # once (3µs+7µs) by Moose::Meta::TypeConstraint::Parameterizable::BEGIN@9 at line 9 of Moose/Meta/TypeConstraint/Parameterizable.pm # once (3µs+7µs) by Moose::Meta::Method::Accessor::BEGIN@10 at line 10 of Moose/Meta/Method/Accessor.pm # once (3µs+7µs) by Moose::Meta::Role::Application::BEGIN@9 at line 9 of Moose/Meta/Role/Application.pm # once (3µs+7µs) by Class::MOP::Mixin::HasAttributes::BEGIN@9 at line 9 of Class/MOP/Mixin/HasAttributes.pm # once (3µs+7µs) by List::MoreUtils::BEGIN@4 at line 4 of List/MoreUtils.pm # once (3µs+7µs) by Class::MOP::Instance::BEGIN@10 at line 10 of Class/MOP/Instance.pm # once (3µs+7µs) by Moose::Object::BEGIN@10 at line 10 of Moose/Object.pm # once (3µs+7µs) by B::Hooks::EndOfScope::XS::BEGIN@10 at line 10 of B/Hooks/EndOfScope/XS.pm # once (4µs+6µs) by B::BEGIN@9 at line 9 of B.pm # once (3µs+6µs) by B::Hooks::EndOfScope::BEGIN@10 at line 10 of B/Hooks/EndOfScope.pm # once (3µs+7µs) by Modern::Perl::import at line 42 of Modern/Perl.pm # once (3µs+6µs) by Class::MOP::BEGIN@10 at line 10 of Class/MOP.pm # once (3µs+6µs) by Moose::Meta::TypeConstraint::Union::BEGIN@10 at line 10 of Moose/Meta/TypeConstraint/Union.pm # once (3µs+6µs) by Class::MOP::Mixin::BEGIN@9 at line 9 of Class/MOP/Mixin.pm # once (3µs+7µs) by Moose::Meta::Role::Method::Required::BEGIN@10 at line 10 of Moose/Meta/Role/Method/Required.pm # once (3µs+6µs) by Variable::Magic::BEGIN@5 at line 5 of Variable/Magic.pm # once (3µs+6µs) by namespace::clean::BEGIN@4 at line 4 of namespace/clean.pm # once (3µs+6µs) by Class::MOP::Method::BEGIN@10 at line 10 of Class/MOP/Method.pm # once (3µs+6µs) by Class::MOP::Method::Meta::BEGIN@10 at line 10 of Class/MOP/Method/Meta.pm # once (3µs+6µs) by lib::BEGIN@8 at line 8 of lib.pm # once (3µs+6µs) by metaclass::BEGIN@10 at line 10 of metaclass.pm # once (3µs+6µs) by IO::BEGIN@7 at line 7 of IO.pm # once (3µs+5µs) by vars::BEGIN@8 at line 8 of vars.pm # once (4µs+5µs) by base::BEGIN@3 at line 3 of base.pm
sub import {
4315515µs shift;
44155586µs1551.08ms $^H |= bits(@_ ? @_ : @default_bits);
# spent 1.08ms making 155 calls to strict::bits, avg 7µs/call
45}
46
47
# spent 271µs (125+146) within strict::unimport which was called 30 times, avg 9µs/call: # once (5µs+6µs) by namespace::clean::BEGIN@149 at line 149 of namespace/clean.pm # once (6µs+5µs) by B::BEGIN@251 at line 251 of B.pm # once (5µs+6µs) by IO::Handle::BEGIN@631 at line 631 of IO/Handle.pm # once (5µs+5µs) by Class::MOP::Class::Immutable::Trait::BEGIN@36 at line 36 of Class/MOP/Class/Immutable/Trait.pm # once (5µs+5µs) by Moose::Object::BEGIN@85 at line 85 of Moose/Object.pm # once (4µs+6µs) by Benchmark::BEGIN@426 at line 426 of Benchmark.pm # once (4µs+5µs) by Carp::BEGIN@433 at line 433 of Carp.pm # once (4µs+5µs) by Moose::Exporter::BEGIN@716 at line 716 of Moose/Exporter.pm # once (4µs+5µs) by Moose::Exporter::BEGIN@321 at line 321 of Moose/Exporter.pm # once (4µs+5µs) by Moose::Exporter::BEGIN@132 at line 132 of Moose/Exporter.pm # once (4µs+5µs) by Class::MOP::Package::BEGIN@164 at line 164 of Class/MOP/Package.pm # once (4µs+5µs) by Sub::Install::BEGIN@184 at line 184 of Sub/Install.pm # once (4µs+5µs) by Moose::Util::TypeConstraints::BEGIN@68 at line 68 of Moose/Util/TypeConstraints.pm # once (4µs+5µs) by Module::Implementation::BEGIN@123 at line 123 of Module/Implementation.pm # once (5µs+5µs) by Sub::Exporter::Progressive::BEGIN@18 at line 18 of Sub/Exporter/Progressive.pm # once (4µs+5µs) by MRO::Compat::BEGIN@258 at line 258 of MRO/Compat.pm # once (5µs+4µs) by Carp::BEGIN@8 at line 8 of Carp.pm # once (4µs+5µs) by Config::BEGIN@47 at line 47 of Config.pm # once (4µs+5µs) by MRO::Compat::BEGIN@227 at line 227 of MRO/Compat.pm # once (4µs+5µs) by constant::BEGIN@28 at line 28 of constant.pm # once (4µs+4µs) by Time::HiRes::BEGIN@43 at line 43 of Time/HiRes.pm # once (4µs+5µs) by constant::BEGIN@116 at line 116 of constant.pm # once (4µs+4µs) by Carp::BEGIN@448 at line 448 of Carp.pm # once (4µs+4µs) by Class::MOP::Class::Immutable::Trait::BEGIN@46 at line 46 of Class/MOP/Class/Immutable/Trait.pm # once (4µs+5µs) by Moose::Exporter::BEGIN@726 at line 726 of Moose/Exporter.pm # once (4µs+5µs) by MRO::Compat::BEGIN@118 at line 118 of MRO/Compat.pm # once (4µs+5µs) by constant::BEGIN@54 at line 54 of constant.pm # once (4µs+4µs) by Carp::BEGIN@67 at line 67 of Carp.pm # once (3µs+4µs) by Carp::BEGIN@18 at line 18 of Carp.pm # once (4µs+4µs) by Exporter::Heavy::BEGIN@4 at line 4 of Exporter/Heavy.pm
sub unimport {
48303µs shift;
4930128µs30146µs $^H &= ~ bits(@_ ? @_ : @default_bits);
# spent 146µs making 30 calls to strict::bits, avg 5µs/call
50}
51
52112µs1;
53__END__
 
# spent 4µs within strict::CORE:match which was called: # once (4µs+0s) by Modern::Perl::BEGIN@9 at line 6
sub strict::CORE:match; # opcode
# spent 15µs within strict::CORE:regcomp which was called: # once (15µs+0s) by Modern::Perl::BEGIN@9 at line 6
sub strict::CORE:regcomp; # opcode