Profile of Class/XSAccessor/Heavy.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For xt/tapper-mcp-scheduler-with-db-longrun.t
Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:59 2012

Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/x86_64-linux/Class/XSAccessor/Heavy.pm
Statements | Executed 21 statements in 247µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 20µs | 20µs | Class::XSAccessor::Heavy::::BEGIN@4Class::XSAccessor::Heavy::BEGIN@4
1 | 1 | 1 | 8µs | 18µs | Class::XSAccessor::Heavy::::BEGIN@30Class::XSAccessor::Heavy::BEGIN@30
1 | 1 | 1 | 7µs | 15µs | Class::XSAccessor::Heavy::::BEGIN@6Class::XSAccessor::Heavy::BEGIN@6
1 | 1 | 1 | 7µs | 39µs | Class::XSAccessor::Heavy::::BEGIN@7Class::XSAccessor::Heavy::BEGIN@7
1 | 1 | 1 | 7µs | 17µs | Class::XSAccessor::Heavy::::BEGIN@27Class::XSAccessor::Heavy::BEGIN@27
1 | 1 | 1 | 6µs | 9µs | Class::XSAccessor::Heavy::::BEGIN@5Class::XSAccessor::Heavy::BEGIN@5
0 | 0 | 0 | 0s | 0s | Class::XSAccessor::Heavy::::check_sub_existenceClass::XSAccessor::Heavy::check_sub_existence

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 | 3 | 28µs | 1 | 20µs | # spent 20µs within Class::XSAccessor::Heavy::BEGIN@4 which was called: # once (20µs+0s) by Class::XSAccessor::BEGIN@6 at line 4 use 5.008; # spent 20µs making 1 call to Class::XSAccessor::Heavy::BEGIN@4
5 | 3 | 17µs | 2 | 11µs | # spent 9µs (6+2) within Class::XSAccessor::Heavy::BEGIN@5 which was called: # once (6µs+2µs) by Class::XSAccessor::BEGIN@6 at line 5 use strict; # spent 9µs making 1 call to Class::XSAccessor::Heavy::BEGIN@5 # spent 2µs making 1 call to strict::import
6 | 3 | 16µs | 2 | 22µs | # spent 15µs (7+8) within Class::XSAccessor::Heavy::BEGIN@6 which was called: # once (7µs+8µs) by Class::XSAccessor::BEGIN@6 at line 6 use warnings; # spent 15µs making 1 call to Class::XSAccessor::Heavy::BEGIN@6 # spent 8µs making 1 call to warnings::import
7 | 3 | 77µs | 2 | 71µs | # spent 39µs (7+32) within Class::XSAccessor::Heavy::BEGIN@7 which was called: # once (7µs+32µs) by Class::XSAccessor::BEGIN@6 at line 7 use Carp; # spent 39µs making 1 call to Class::XSAccessor::Heavy::BEGIN@7 # spent 32µs making 1 call to Exporter::import
8 |  |  |  |  |
9 | 1 | 500ns |  |  | our $VERSION = '1.13';
10 | 1 | 900ns |  |  | 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 |  |  |  |  | sub check_sub_existence {
19 |  |  |  |  | my $subname = shift;
20 |  |  |  |  |
21 |  |  |  |  | my $sub_package = $subname;
22 |  |  |  |  | $sub_package =~ s/([^:]+)$// or die;
23 |  |  |  |  | my $bare_subname = $1;
24 |  |  |  |  |
25 |  |  |  |  | my $sym;
26 |  |  |  |  | {
27 | 3 | 30µs | 2 | 28µs | # spent 17µs (7+11) within Class::XSAccessor::Heavy::BEGIN@27 which was called: # once (7µs+11µs) by Class::XSAccessor::BEGIN@6 at line 27 no strict 'refs'; # spent 17µs making 1 call to Class::XSAccessor::Heavy::BEGIN@27 # spent 10µs making 1 call to strict::unimport
28 |  |  |  |  | $sym = \%{"$sub_package"};
29 |  |  |  |  | }
30 | 3 | 74µs | 2 | 28µs | # spent 18µs (8+10) within Class::XSAccessor::Heavy::BEGIN@30 which was called: # once (8µs+10µs) by Class::XSAccessor::BEGIN@6 at line 30 no warnings; # spent 18µs making 1 call to Class::XSAccessor::Heavy::BEGIN@30 # spent 10µ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 | 3µs |  |  | 1;
40 |  |  |  |  |
41 |  |  |  |  | __END__