Profile of Scalar/Util.pm

← Index
NYTProf Performance Profile «block view•line view•sub view»
For t/app_dpath.t
Run on Tue Jun 5 15:25:28 2012
Reported on Tue Jun 5 15:26:03 2012

Filename | /home/ss5/perl5/perlbrew/perls/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi/Scalar/Util.pm
Statements | Executed 13 statements in 1.53ms

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
991 | 6 | 2 | 3.09ms | 3.09ms | Scalar::Util::::refaddrScalar::Util::refaddr (xsub)
342 | 5 | 3 | 1.42ms | 1.42ms | Scalar::Util::::blessedScalar::Util::blessed (xsub)
216 | 2 | 1 | 933µs | 933µs | Scalar::Util::::weakenScalar::Util::weaken (xsub)
36 | 2 | 2 | 194µs | 194µs | Scalar::Util::::reftypeScalar::Util::reftype (xsub)
1 | 1 | 1 | 68µs | 79µs | Scalar::Util::::BEGIN@9Scalar::Util::BEGIN@9
0 | 0 | 0 | 0s | 0s | Scalar::Util::::export_failScalar::Util::export_fail

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

Line | State ments | Time on line | Calls | Time in subs | Code
--- | --- | --- | --- | --- | ---
1 |  |  |  |  | # Scalar::Util.pm
2 |  |  |  |  | #
3 |  |  |  |  | # Copyright (c) 1997-2007 Graham Barr <gbarr@pobox.com>. All rights reserved.
4 |  |  |  |  | # This program is free software; you can redistribute it and/or
5 |  |  |  |  | # modify it under the same terms as Perl itself.
6 |  |  |  |  |
7 |  |  |  |  | package Scalar::Util;
8 |  |  |  |  |
9 | 2 | 1.05ms | 2 | 91µs | # spent 79µs (68+11) within Scalar::Util::BEGIN@9 which was called: # once (68µs+11µs) by Test::Deep::Cache::Simple::BEGIN@7 at line 9 use strict; # spent 79µs making 1 call to Scalar::Util::BEGIN@9 # spent 12µs making 1 call to strict::import
10 | 1 | 2µs |  |  | require Exporter;
11 | 1 | 330µs |  |  | require List::Util; # List::Util loads the XS
12 |  |  |  |  |
13 | 1 | 22µs |  |  | our @ISA = qw(Exporter);
14 | 1 | 8µs |  |  | our @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype);
15 | 1 | 2µs |  |  | our $VERSION = "1.25";
16 | 1 | 75µs |  |  | $VERSION = eval $VERSION; # spent 7µs executing statements in string eval
17 |  |  |  |  |
18 | 1 | 1µs |  |  | our @EXPORT_FAIL;
19 |  |  |  |  |
20 | 1 | 2µs |  |  | unless (defined &weaken) {
21 |  |  |  |  | push @EXPORT_FAIL, qw(weaken);
22 |  |  |  |  | }
23 | 1 | 1µs |  |  | unless (defined &isweak) {
24 |  |  |  |  | push @EXPORT_FAIL, qw(isweak isvstring);
25 |  |  |  |  | }
26 | 1 | 800ns |  |  | unless (defined &isvstring) {
27 |  |  |  |  | push @EXPORT_FAIL, qw(isvstring);
28 |  |  |  |  | }
29 |  |  |  |  |
30 |  |  |  |  | sub export_fail {
31 |  |  |  |  | if (grep { /^(?:weaken|isweak)$/ } @_ ) {
32 |  |  |  |  | require Carp;
33 |  |  |  |  | Carp::croak("Weak references are not implemented in the version of perl");
34 |  |  |  |  | }
35 |  |  |  |  |
36 |  |  |  |  | if (grep { /^isvstring$/ } @_ ) {
37 |  |  |  |  | require Carp;
38 |  |  |  |  | Carp::croak("Vstrings are not implemented in the version of perl");
39 |  |  |  |  | }
40 |  |  |  |  |
41 |  |  |  |  | @_;
42 |  |  |  |  | }
43 |  |  |  |  |
44 | 1 | 32µs |  |  | 1;
45 |  |  |  |  |
46 |  |  |  |  | __END__
|  |  |  |  | # spent 1.42ms within Scalar::Util::blessed which was called 342 times, avg 4µs/call: # 144 times (614µs+0s) by Test::Deep::wrap at line 346 of Test/Deep.pm, avg 4µs/call # 144 times (612µs+0s) by Test::Deep::descend at line 275 of Test/Deep.pm, avg 4µs/call # 18 times (73µs+0s) by Test::Deep::Blessed::descend at line 25 of Test/Deep/Blessed.pm, avg 4µs/call # 18 times (64µs+0s) by Test::Deep::class_base at line 394 of Test/Deep.pm, avg 4µs/call # 18 times (54µs+0s) by Test::Deep::Ref::test_class at line 17 of Test/Deep/Ref.pm, avg 3µs/call sub Scalar::Util::blessed; # xsub
|  |  |  |  | # spent 3.09ms within Scalar::Util::refaddr which was called 991 times, avg 3µs/call: # 648 times (1.90ms+0s) by Test::Deep::Cache::Simple::fn_get_key at line 79 of Test/Deep/Cache/Simple.pm, avg 3µs/call # 108 times (417µs+0s) by Test::Deep::descend at line 296 of Test/Deep.pm, avg 4µs/call # 108 times (366µs+0s) by Test::Deep::descend at line 321 of Test/Deep.pm, avg 3µs/call # 108 times (326µs+0s) by Test::Deep::descend at line 297 of Test/Deep.pm, avg 3µs/call # 18 times (57µs+0s) by Test::Deep::wrap at line 358 of Test/Deep.pm, avg 3µs/call # once (26µs+0s) by main::BEGIN@8 at line 34 of Test/Deep.pm sub Scalar::Util::refaddr; # xsub
|  |  |  |  | # spent 194µs within Scalar::Util::reftype which was called 36 times, avg 5µs/call: # 18 times (105µs+0s) by Test::Deep::RefType::descend at line 24 of Test/Deep/RefType.pm, avg 6µs/call # 18 times (88µs+0s) by Test::Deep::class_base at line 396 of Test/Deep.pm, avg 5µs/call sub Scalar::Util::reftype; # xsub
|  |  |  |  | # spent 933µs within Scalar::Util::weaken which was called 216 times, avg 4µs/call: # 108 times (505µs+0s) by Test::Deep::Cache::Simple::add at line 42 of Test/Deep/Cache/Simple.pm, avg 5µs/call # 108 times (428µs+0s) by Test::Deep::Cache::Simple::add at line 43 of Test/Deep/Cache/Simple.pm, avg 4µs/call sub Scalar::Util::weaken; # xsub