Profile of Class/XSAccessor/Heavy.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For bin/dpath
Run on Tue Jun 5 15:31:33 2012
Reported on Tue Jun 5 15:31:41 2012

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/x86_64-linux-thread-multi/Class/XSAccessor/Heavy.pm
Statements | Executed 175 statements in 2.58ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
16 | 2 | 2 | 587µs | 959µs | Class::XSAccessor::Heavy::::check_sub_existenceClass::XSAccessor::Heavy::check_sub_existence
16 | 1 | 1 | 372µs | 372µs | Class::XSAccessor::Heavy::::CORE:substClass::XSAccessor::Heavy::CORE:subst (opcode)
1 | 1 | 1 | 69µs | 69µs | Class::XSAccessor::Heavy::::BEGIN@4Class::XSAccessor::Heavy::BEGIN@4
1 | 1 | 1 | 37µs | 48µs | Class::XSAccessor::Heavy::::BEGIN@5Class::XSAccessor::Heavy::BEGIN@5
1 | 1 | 1 | 32µs | 84µs | Class::XSAccessor::Heavy::::BEGIN@27Class::XSAccessor::Heavy::BEGIN@27
1 | 1 | 1 | 30µs | 81µs | Class::XSAccessor::Heavy::::BEGIN@30Class::XSAccessor::Heavy::BEGIN@30
1 | 1 | 1 | 30µs | 175µs | Class::XSAccessor::Heavy::::BEGIN@7Class::XSAccessor::Heavy::BEGIN@7
1 | 1 | 1 | 27µs | 47µs | Class::XSAccessor::Heavy::::BEGIN@6Class::XSAccessor::Heavy::BEGIN@6

Call graph for these subroutines as a Graphviz dot language file.

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | package # hide from PAUSE
2 |  |  |  |  | Class::XSAccessor::Heavy;
3 |  |  |  |  |
4 | 2 | 173µs | 1 | 69µs | # spent 69µs within Class::XSAccessor::Heavy::BEGIN@4 which was called: # once (69µs+0s) by Class::XSAccessor::BEGIN@6 at line 4 use 5.008; # spent 69µs making 1 call to Class::XSAccessor::Heavy::BEGIN@4
5 | 2 | 90µs | 2 | 60µs | # spent 48µs (37+12) within Class::XSAccessor::Heavy::BEGIN@5 which was called: # once (37µs+12µs) by Class::XSAccessor::BEGIN@6 at line 5 use strict; # spent 48µs making 1 call to Class::XSAccessor::Heavy::BEGIN@5 # spent 12µs making 1 call to strict::import
6 | 2 | 88µs | 2 | 67µs | # spent 47µs (27+20) within Class::XSAccessor::Heavy::BEGIN@6 which was called: # once (27µs+20µs) by Class::XSAccessor::BEGIN@6 at line 6 use warnings; # spent 47µs making 1 call to Class::XSAccessor::Heavy::BEGIN@6 # spent 20µs making 1 call to warnings::import
7 | 2 | 605µs | 2 | 320µs | # spent 175µs (30+145) within Class::XSAccessor::Heavy::BEGIN@7 which was called: # once (30µs+145µs) by Class::XSAccessor::BEGIN@6 at line 7 use Carp; # spent 175µs making 1 call to Class::XSAccessor::Heavy::BEGIN@7 # spent 145µs making 1 call to Exporter::import
8 |  |  |  |  |
9 | 1 | 2µs |  |  | our $VERSION = '1.13';
10 | 1 | 4µs |  |  | our @CARP_NOT = qw(
11 |  |  |  |  | Class::XSAccessor
12 |  |  |  |  | Class::XSAccessor::Array
13 |  |  |  |  | );
14 |  |  |  |  |
15 |  |  |  |  | # TODO Move more duplicated code from XSA and XSA::Array here
16 |  |  |  |  |
17 |  |  |  |  |
18 |  |  |  |  | # spent 959µs (587+372) within Class::XSAccessor::Heavy::check_sub_existence which was called 16 times, avg 60µs/call: # 9 times (339µs+257µs) by Class::XSAccessor::_generate_method at line 79 of Class/XSAccessor.pm, avg 66µs/call # 7 times (248µs+115µs) by Class::XSAccessor::Array::_generate_method at line 61 of Class/XSAccessor/Array.pm, avg 52µs/call sub check_sub_existence {
19 | 144 | 925µs |  |  | my $subname = shift;
20 |  |  |  |  |
21 |  |  |  |  | my $sub_package = $subname;
22 |  |  | 16 | 372µs | $sub_package =~ s/([^:]+)$// or die; # spent 372µs making 16 calls to Class::XSAccessor::Heavy::CORE:subst, avg 23µs/call
23 |  |  |  |  | my $bare_subname = $1;
24 |  |  |  |  |
25 |  |  |  |  | my $sym;
26 |  |  |  |  | {
27 | 2 | 164µs | 2 | 137µs | # spent 84µs (32+52) within Class::XSAccessor::Heavy::BEGIN@27 which was called: # once (32µs+52µs) by Class::XSAccessor::BEGIN@6 at line 27 no strict 'refs'; # spent 84µs making 1 call to Class::XSAccessor::Heavy::BEGIN@27 # spent 52µs making 1 call to strict::unimport
28 | 16 | 93µs |  |  | $sym = \%{"$sub_package"};
29 |  |  |  |  | }
30 | 2 | 419µs | 2 | 131µs | # spent 81µs (30+50) within Class::XSAccessor::Heavy::BEGIN@30 which was called: # once (30µs+50µs) by Class::XSAccessor::BEGIN@6 at line 30 no warnings; # spent 81µs making 1 call to Class::XSAccessor::Heavy::BEGIN@30 # spent 50µs making 1 call to warnings::unimport
31 |  |  |  |  | local *s = $sym->{$bare_subname};
32 |  |  |  |  | my $coderef = *s{CODE};
33 |  |  |  |  | if ($coderef) {
34 |  |  |  |  | $sub_package =~ s/::$//;
35 |  |  |  |  | Carp::croak("Cannot replace existing subroutine '$bare_subname' in package '$sub_package' with an XS implementation. If you wish to force a replacement, add the 'replace => 1' parameter to the arguments of 'use ".(caller())[0]."'.");
36 |  |  |  |  | }
37 |  |  |  |  | }
38 |  |  |  |  |
39 | 1 | 14µs |  |  | 1;
40 |  |  |  |  |
41 |  |  |  |  | __END__
|  |  |  |  | # spent 372µs within Class::XSAccessor::Heavy::CORE:subst which was called 16 times, avg 23µs/call: # 16 times (372µs+0s) by Class::XSAccessor::Heavy::check_sub_existence at line 22, avg 23µs/call sub Class::XSAccessor::Heavy::CORE:subst; # opcode