← Index
NYTProf Performance Profile   « block view • line view • sub view »
For -e
  Run on Wed Nov 17 21:45:08 2010
Reported on Wed Nov 17 22:10:12 2010

Filename/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm
StatementsExecuted 575 statements in 24.4ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
14332.00ms2.67msMoose::Meta::Method::Accessor::Native::::_inline_check_argument_countMoose::Meta::Method::Accessor::Native::_inline_check_argument_count
38321.84ms6.56msMoose::Meta::Method::Accessor::Native::::_slot_access_can_be_inlinedMoose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined
14111.28ms7.13msMoose::Meta::Method::Accessor::Native::::__ANON__[:106]Moose::Meta::Method::Accessor::Native::__ANON__[:106]
1411882µs7.54msMoose::Meta::Method::Accessor::Native::::__ANON__[:136]Moose::Meta::Method::Accessor::Native::__ANON__[:136]
1411799µs72.9msMoose::Meta::Method::Accessor::Native::::_initialize_bodyMoose::Meta::Method::Accessor::Native::_initialize_body
1422675µs817µsMoose::Meta::Method::Accessor::Native::::_inline_curried_argumentsMoose::Meta::Method::Accessor::Native::_inline_curried_arguments
4211445µs445µsMoose::Meta::Method::Accessor::Native::::root_typesMoose::Meta::Method::Accessor::Native::root_types
11178µs95µsMoose::Meta::Method::Accessor::Native::::BEGIN@3Moose::Meta::Method::Accessor::Native::BEGIN@3
71157µs57µsMoose::Meta::Method::Accessor::Native::::_minimum_argumentsMoose::Meta::Method::Accessor::Native::_minimum_arguments
11148µs698µsMoose::Meta::Method::Accessor::Native::::BEGIN@144Moose::Meta::Method::Accessor::Native::BEGIN@144
11145µs14.6msMoose::Meta::Method::Accessor::Native::::BEGIN@13Moose::Meta::Method::Accessor::Native::BEGIN@13
11140µs106µsMoose::Meta::Method::Accessor::Native::::BEGIN@4Moose::Meta::Method::Accessor::Native::BEGIN@4
11139µs204µsMoose::Meta::Method::Accessor::Native::::BEGIN@6Moose::Meta::Method::Accessor::Native::BEGIN@6
11139µs206µsMoose::Meta::Method::Accessor::Native::::BEGIN@7Moose::Meta::Method::Accessor::Native::BEGIN@7
31124µs24µsMoose::Meta::Method::Accessor::Native::::_maximum_argumentsMoose::Meta::Method::Accessor::Native::_maximum_arguments
0000s0sMoose::Meta::Method::Accessor::Native::::__ANON__[:114]Moose::Meta::Method::Accessor::Native::__ANON__[:114]
0000s0sMoose::Meta::Method::Accessor::Native::::__ANON__[:33]Moose::Meta::Method::Accessor::Native::__ANON__[:33]
0000s0sMoose::Meta::Method::Accessor::Native::::__ANON__[:41]Moose::Meta::Method::Accessor::Native::__ANON__[:41]
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moose::Meta::Method::Accessor::Native;
2
33104µs2113µs
# spent 95µs (78+18) within Moose::Meta::Method::Accessor::Native::BEGIN@3 which was called: # once (78µs+18µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 3
use strict;
# spent 95µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@3 # spent 18µs making 1 call to strict::import
43123µs2173µs
# spent 106µs (40+67) within Moose::Meta::Method::Accessor::Native::BEGIN@4 which was called: # once (40µs+67µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 4
use warnings;
# spent 106µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@4 # spent 67µs making 1 call to warnings::import
5
63110µs2369µs
# spent 204µs (39+165) within Moose::Meta::Method::Accessor::Native::BEGIN@6 which was called: # once (39µs+165µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 6
use Carp qw( confess );
# spent 204µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@6 # spent 165µs making 1 call to Exporter::import
73236µs2373µs
# spent 206µs (39+167) within Moose::Meta::Method::Accessor::Native::BEGIN@7 which was called: # once (39µs+167µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 7
use Scalar::Util qw( blessed weaken );
# spent 206µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@7 # spent 167µs making 1 call to Exporter::import
8
914µsour $VERSION = '1.19';
10179µs$VERSION = eval $VERSION;
# spent 11µs executing statements in string eval
1113µsour $AUTHORITY = 'cpan:STEVAN';
12
1332.40ms229.1ms
# spent 14.6ms (45µs+14.5) within Moose::Meta::Method::Accessor::Native::BEGIN@13 which was called: # once (45µs+14.5ms) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 13
use Moose::Role;
# spent 14.6ms making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@13 # spent 14.5ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:456]
14
15around new => sub {
161121.31ms my $orig = shift;
17 my $class = shift;
18 my %options = @_;
19
20 exists $options{curried_arguments}
21 || ( $options{curried_arguments} = [] );
22
23 ( $options{curried_arguments}
24 && ( 'ARRAY' eq ref $options{curried_arguments} ) )
25 || confess
26 'You must supply a curried_arguments which is an ARRAY reference';
27
2814160µs $options{definition_context} = $options{attribute}->definition_context;
# spent 160µs making 14 calls to Class::MOP::Mixin::AttributeCore::definition_context, avg 11µs/call
29
30 $options{accessor_type} = 'native';
31
321487.7ms return $class->$orig(%options);
# spent 87.7ms making 14 calls to Class::MOP::Method::Accessor::new, avg 6.26ms/call
33122µs1379µs};
# spent 379µs making 1 call to Moose::Role::around
34
35around _new => sub {
365612.1ms shift;
37 my $class = shift;
38 my $options = @_ == 1 ? $_[0] : {@_};
39
40 return bless $options, $class;
41119µs1272µs};
# spent 272µs making 1 call to Moose::Role::around
42
4342589µs
# spent 445µs within Moose::Meta::Method::Accessor::Native::root_types which was called 42 times, avg 11µs/call: # 42 times (445µs+0s) by Moose::Meta::Method::Accessor::Native::Writer::_is_root_type at line 110 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 11µs/call
sub root_types { (shift)->{'root_types'} }
44
45
# spent 72.9ms (799µs+72.1) within Moose::Meta::Method::Accessor::Native::_initialize_body which was called 14 times, avg 5.21ms/call: # 14 times (799µs+72.1ms) by Class::MOP::Method::Accessor::new at line 39 of Class/MOP/Method/Accessor.pm, avg 5.21ms/call
sub _initialize_body {
4642780µs my $self = shift;
47
482872.1ms $self->{'body'} = $self->_eval_code( $self->_generate_method );
# spent 40.0ms making 10 calls to Moose::Meta::Method::Accessor::Native::Writer::_generate_method, avg 4.00ms/call # spent 26.4ms making 14 calls to Moose::Meta::Method::Accessor::_eval_code, avg 1.89ms/call # spent 5.67ms making 4 calls to Moose::Meta::Method::Accessor::Native::Reader::_generate_method, avg 1.42ms/call
49
50 return;
51}
52
53
# spent 817µs (675+142) within Moose::Meta::Method::Accessor::Native::_inline_curried_arguments which was called 14 times, avg 58µs/call: # 10 times (501µs+102µs) by Moose::Meta::Method::Accessor::Native::Writer::_generate_method at line 31 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 60µs/call # 4 times (174µs+40µs) by Moose::Meta::Method::Accessor::Native::Reader::_generate_method at line 26 of Moose/Meta/Method/Accessor/Native/Reader.pm, avg 53µs/call
sub _inline_curried_arguments {
5428651µs my $self = shift;
55
5614142µs return q{} unless @{ $self->curried_arguments };
# spent 142µs making 14 calls to Moose::Meta::Method::Delegation::curried_arguments, avg 10µs/call
57
58 return 'unshift @_, @curried;'
59}
60
61
# spent 2.67ms (2.00+670µs) within Moose::Meta::Method::Accessor::Native::_inline_check_argument_count which was called 14 times, avg 190µs/call: # 8 times (1.13ms+384µs) by Moose::Meta::Method::Accessor::Native::Writer::_writer_core at line 47 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 189µs/call # 4 times (639µs+192µs) by Moose::Meta::Method::Accessor::Native::Reader::_reader_core at line 42 of Moose/Meta/Method/Accessor/Native/Reader.pm, avg 208µs/call # 2 times (226µs+94µs) by Class::MOP::Class:::around at line 37 of Moose/Meta/Method/Accessor/Native/Hash/set.pm, avg 160µs/call
sub _inline_check_argument_count {
62981.64ms my $self = shift;
63
64 my $code = q{};
65
6614117µs if ( my $min = $self->_minimum_arguments ) {
67558µs my $err_msg = sprintf(
# spent 58µs making 5 calls to Moose::Meta::Method::Delegation::delegate_to_method, avg 12µs/call
68 q{"Cannot call %s without at least %s argument%s"},
69 $self->delegate_to_method,
70 $min,
71 ( $min == 1 ? q{} : 's' )
72 );
73
74591µs $code
# spent 91µs making 5 calls to Moose::Meta::Method::_inline_throw_error, avg 18µs/call
75 .= "\n"
76 . $self->_inline_throw_error($err_msg)
77 . " unless \@_ >= $min;";
78 }
79
8014126µs if ( defined( my $max = $self->_maximum_arguments ) ) {
819109µs my $err_msg = sprintf(
# spent 109µs making 9 calls to Moose::Meta::Method::Delegation::delegate_to_method, avg 12µs/call
82 q{"Cannot call %s with %s argument%s"},
83 $self->delegate_to_method,
84 ( $max ? "more than $max" : 'any' ),
85 ( $max == 1 ? q{} : 's' )
86 );
87
889168µs $code
# spent 168µs making 9 calls to Moose::Meta::Method::_inline_throw_error, avg 19µs/call
89 .= "\n"
90 . $self->_inline_throw_error($err_msg)
91 . " if \@_ > $max;";
92 }
93
94 return $code;
95}
96
977105µs
# spent 57µs within Moose::Meta::Method::Accessor::Native::_minimum_arguments which was called 7 times, avg 8µs/call: # 7 times (57µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 66, avg 8µs/call
sub _minimum_arguments { 0 }
98340µs
# spent 24µs within Moose::Meta::Method::Accessor::Native::_maximum_arguments which was called 3 times, avg 8µs/call: # 3 times (24µs+0s) by Moose::Meta::Method::Accessor::Native::_inline_check_argument_count at line 80, avg 8µs/call
sub _maximum_arguments { undef }
99
100
# spent 7.13ms (1.28+5.85) within Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:106] which was called 14 times, avg 509µs/call: # 14 times (1.28ms+5.85ms) by Class::MOP::Class::__ANON__::SERIAL::10::_inline_get or Class::MOP::Class::__ANON__::SERIAL::12::_inline_get or Class::MOP::Class::__ANON__::SERIAL::13::_inline_get or Class::MOP::Class::__ANON__::SERIAL::16::_inline_get or Class::MOP::Class::__ANON__::SERIAL::17::_inline_get or Class::MOP::Class::__ANON__::SERIAL::18::_inline_get or Class::MOP::Class::__ANON__::SERIAL::20::_inline_get or Class::MOP::Class::__ANON__::SERIAL::21::_inline_get or Class::MOP::Class::__ANON__::SERIAL::22::_inline_get or Class::MOP::Class::__ANON__::SERIAL::6::_inline_get or Class::MOP::Class::__ANON__::SERIAL::7::_inline_get or Class::MOP::Class::__ANON__::SERIAL::9::_inline_get at line 36 of Moose/Meta/Method/Overridden.pm, avg 509µs/call
override _inline_get => sub {
10128577µs my ( $self, $instance ) = @_;
102
103285.85ms return $self->_slot_access_can_be_inlined
# spent 2.97ms making 14 calls to Moose::Role::super, avg 212µs/call # spent 2.87ms making 14 calls to Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined, avg 205µs/call
104 ? super()
105 : "${instance}->\$reader";
106118µs1528µs};
# spent 528µs making 1 call to Moose::Role::override
107
108override _inline_store => sub {
109 my ( $self, $instance, $value ) = @_;
110
111 return $self->_slot_access_can_be_inlined
112 ? super()
113 : "${instance}->\$writer($value)";
114119µs1416µs};
# spent 416µs making 1 call to Moose::Role::override
115
116
# spent 7.54ms (882µs+6.66) within Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:136] which was called 14 times, avg 538µs/call: # 14 times (882µs+6.66ms) by Class::MOP::Class::__ANON__::SERIAL::10::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::12::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::13::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::16::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::17::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::18::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::20::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::21::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::22::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::6::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::7::_eval_environment or Class::MOP::Class::__ANON__::SERIAL::9::_eval_environment at line 36 of Moose/Meta/Method/Overridden.pm, avg 538µs/call
override _eval_environment => sub {
11756814µs my $self = shift;
118
119144.43ms my $env = super();
# spent 4.43ms making 14 calls to Moose::Role::super, avg 316µs/call
120
12114159µs $env->{'@curried'} = $self->curried_arguments;
# spent 159µs making 14 calls to Moose::Meta::Method::Delegation::curried_arguments, avg 11µs/call
122
123142.07ms return $env if $self->_slot_access_can_be_inlined;
# spent 2.07ms making 14 calls to Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined, avg 148µs/call
124
125 my $reader = $self->associated_attribute->get_read_method_ref;
126 $reader = $reader->body if blessed $reader;
127
128 $env->{'$reader'} = \$reader;
129
130 my $writer = $self->associated_attribute->get_write_method_ref;
131 $writer = $writer->body if blessed $writer;
132
133 $env->{'$writer'} = \$writer;
134
135 return $env;
136120µs1405µs};
# spent 405µs making 1 call to Moose::Role::override
137
138
# spent 6.56ms (1.84+4.72) within Moose::Meta::Method::Accessor::Native::_slot_access_can_be_inlined which was called 38 times, avg 173µs/call: # 14 times (980µs+1.89ms) by Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:106] at line 103, avg 205µs/call # 14 times (482µs+1.59ms) by Moose::Meta::Method::Accessor::Native::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Moose/Meta/Method/Accessor/Native.pm:136] at line 123, avg 148µs/call # 10 times (373µs+1.24ms) by Moose::Meta::Method::Accessor::Native::Writer::_inline_set_new_value at line 161 of Moose/Meta/Method/Accessor/Native/Writer.pm, avg 161µs/call
sub _slot_access_can_be_inlined {
139762.42ms my $self = shift;
140
141764.72ms return $self->is_inline && $self->_instance_is_inlinable;
# spent 4.31ms making 38 calls to Moose::Meta::Method::Accessor::_instance_is_inlinable, avg 113µs/call # spent 410µs making 38 calls to Class::MOP::Method::Generated::is_inline, avg 11µs/call
142}
143
1443126µs21.35ms
# spent 698µs (48+650) within Moose::Meta::Method::Accessor::Native::BEGIN@144 which was called: # once (48µs+650µs) by Class::MOP::__ANON__[/home/doy/perl5/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux/Class/MOP.pm:118] at line 144
no Moose::Role;
# spent 698µs making 1 call to Moose::Meta::Method::Accessor::Native::BEGIN@144 # spent 650µs making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:557]
145
146156µs1;