← Index
NYTProf Performance Profile   « line view »
For split.pl
  Run on Thu Apr 20 02:05:47 2023
Reported on Thu Apr 20 18:31:09 2023

Filename/usr/lib/x86_64-linux-gnu/perl/5.36/Time/HiRes.pm
StatementsExecuted 43 statements in 626µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
22220µs26µsTime::HiRes::::AUTOLOADTime::HiRes::AUTOLOAD
22216µs181µsTime::HiRes::::importTime::HiRes::import
11113µs13µsTime::HiRes::::BEGIN@3Time::HiRes::BEGIN@3
1116µs10µsTime::HiRes::::BEGIN@70Time::HiRes::BEGIN@70
1114µs6µsTime::HiRes::::BEGIN@4Time::HiRes::BEGIN@4
2114µs4µsTime::HiRes::::CORE:substTime::HiRes::CORE:subst (opcode)
1112µs2µsTime::HiRes::::clock_gettimeTime::HiRes::clock_gettime (xsub)
2112µs2µsTime::HiRes::::constantTime::HiRes::constant (xsub)
1111µs1µsTime::HiRes::::BEGIN@7Time::HiRes::BEGIN@7
2111µs1µsTime::HiRes::::__ANON__[:71]Time::HiRes::__ANON__[:71]
0000s0sTime::HiRes::::tv_intervalTime::HiRes::tv_interval
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Time::HiRes;
2
3234µs113µs
# spent 13µs within Time::HiRes::BEGIN@3 which was called: # once (13µs+0s) by Capture::Tiny::BEGIN@1 at line 3
{ use 5.006; }
# spent 13µs making 1 call to Time::HiRes::BEGIN@3
4319µs28µs
# spent 6µs (4+2) within Time::HiRes::BEGIN@4 which was called: # once (4µs+2µs) by Capture::Tiny::BEGIN@1 at line 4
use strict;
# spent 6µs making 1 call to Time::HiRes::BEGIN@4 # spent 2µs making 1 call to strict::import
5
61400nsrequire Exporter;
72165µs11µs
# spent 1µs within Time::HiRes::BEGIN@7 which was called: # once (1µs+0s) by Capture::Tiny::BEGIN@1 at line 7
use XSLoader ();
# spent 1µs making 1 call to Time::HiRes::BEGIN@7
8
916µsour @ISA = qw(Exporter);
10
111100nsour @EXPORT = qw( );
12# More or less this same list is in Makefile.PL. Should unify.
1313µsour @EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval
14 getitimer setitimer nanosleep clock_gettime clock_getres
15 clock clock_nanosleep
16 CLOCKS_PER_SEC
17 CLOCK_BOOTTIME
18 CLOCK_HIGHRES
19 CLOCK_MONOTONIC
20 CLOCK_MONOTONIC_COARSE
21 CLOCK_MONOTONIC_FAST
22 CLOCK_MONOTONIC_PRECISE
23 CLOCK_MONOTONIC_RAW
24 CLOCK_PROCESS_CPUTIME_ID
25 CLOCK_PROF
26 CLOCK_REALTIME
27 CLOCK_REALTIME_COARSE
28 CLOCK_REALTIME_FAST
29 CLOCK_REALTIME_PRECISE
30 CLOCK_REALTIME_RAW
31 CLOCK_SECOND
32 CLOCK_SOFTTIME
33 CLOCK_THREAD_CPUTIME_ID
34 CLOCK_TIMEOFDAY
35 CLOCK_UPTIME
36 CLOCK_UPTIME_COARSE
37 CLOCK_UPTIME_FAST
38 CLOCK_UPTIME_PRECISE
39 CLOCK_UPTIME_RAW
40 CLOCK_VIRTUAL
41 ITIMER_PROF
42 ITIMER_REAL
43 ITIMER_REALPROF
44 ITIMER_VIRTUAL
45 TIMER_ABSTIME
46 d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
47 d_nanosleep d_clock_gettime d_clock_getres
48 d_clock d_clock_nanosleep d_hires_stat
49 d_futimens d_utimensat d_hires_utime
50 stat lstat utime
51 );
52
531200nsour $VERSION = '1.9770';
541100nsour $XS_VERSION = $VERSION;
5519µs$VERSION = eval $VERSION;
# spent 2µs executing statements in string eval
56
57our $AUTOLOAD;
58
# spent 26µs (20+6) within Time::HiRes::AUTOLOAD which was called 2 times, avg 13µs/call: # once (12µs+4µs) by Time::HiRes::import at line 79 # once (8µs+2µs) by IPC::Cmd::BEGIN@5 at line 44 of IPC/Cmd.pm
sub AUTOLOAD {
592300ns my $constname;
6029µs24µs ($constname = $AUTOLOAD) =~ s/.*:://;
# spent 4µs making 2 calls to Time::HiRes::CORE:subst, avg 2µs/call
61 # print "AUTOLOAD: constname = $constname ($AUTOLOAD)\n";
622700ns die "&Time::HiRes::constant not defined" if $constname eq 'constant';
6325µs22µs my ($error, $val) = constant($constname);
# spent 2µs making 2 calls to Time::HiRes::constant, avg 900ns/call
64 # print "AUTOLOAD: error = $error, val = $val\n";
652500ns if ($error) {
66 my (undef,$file,$line) = caller;
67 die "$error at $file line $line.\n";
68 }
69 {
704205µs215µs
# spent 10µs (6+5) within Time::HiRes::BEGIN@70 which was called: # once (6µs+5µs) by Capture::Tiny::BEGIN@1 at line 70
no strict 'refs';
# spent 10µs making 1 call to Time::HiRes::BEGIN@70 # spent 5µs making 1 call to strict::unimport
7147µs
# spent 1µs within Time::HiRes::__ANON__[/usr/lib/x86_64-linux-gnu/perl/5.36/Time/HiRes.pm:71] which was called 2 times, avg 550ns/call: # 2 times (1µs+0s) by IPC::Cmd::BEGIN@5 or Time::HiRes::import at line 73, avg 550ns/call
*$AUTOLOAD = sub { $val };
72 }
7325µs21µs goto &$AUTOLOAD;
# spent 1µs making 2 calls to Time::HiRes::__ANON__[Time/HiRes.pm:71], avg 550ns/call
74}
75
76
# spent 181µs (16+164) within Time::HiRes::import which was called 2 times, avg 90µs/call: # once (10µs+126µs) by Capture::Tiny::BEGIN@1 at line 1 of (eval 22)[Capture/Tiny.pm:257] # once (6µs+38µs) by IPC::Cmd::BEGIN@5 at line 38 of IPC/Cmd.pm
sub import {
772600ns my $this = shift;
7821µs for my $i (@_) {
7914µs116µs if (($i eq 'clock_getres' && !&d_clock_getres) ||
# spent 16µs making 1 call to Time::HiRes::AUTOLOAD
80 ($i eq 'clock_gettime' && !&d_clock_gettime) ||
81 ($i eq 'clock_nanosleep' && !&d_clock_nanosleep) ||
82 ($i eq 'clock' && !&d_clock) ||
83 ($i eq 'nanosleep' && !&d_nanosleep) ||
84 ($i eq 'usleep' && !&d_usleep) ||
85 ($i eq 'utime' && !&d_hires_utime) ||
86 ($i eq 'ualarm' && !&d_ualarm)) {
87 require Carp;
88 Carp::croak("Time::HiRes::$i(): unimplemented in this platform");
89 }
90 }
9128µs223µs Time::HiRes->export_to_level(1, $this, @_);
# spent 23µs making 2 calls to Exporter::export_to_level, avg 12µs/call
92}
93
941136µs1131µsXSLoader::load( 'Time::HiRes', $XS_VERSION );
# spent 131µs making 1 call to XSLoader::load
95
96# Preloaded methods go here.
97
98sub tv_interval {
99 # probably could have been done in C
100 my ($a, $b) = @_;
101 $b = [gettimeofday()] unless defined($b);
102 (${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000);
103}
104
105# Autoload methods go after =cut, and are processed by the autosplit program.
106
10718µs1;
108__END__
 
# spent 4µs within Time::HiRes::CORE:subst which was called 2 times, avg 2µs/call: # 2 times (4µs+0s) by Time::HiRes::AUTOLOAD at line 60, avg 2µs/call
sub Time::HiRes::CORE:subst; # opcode
# spent 2µs within Time::HiRes::clock_gettime which was called: # once (2µs+0s) by IPC::Cmd::BEGIN@5 at line 44 of IPC/Cmd.pm
sub Time::HiRes::clock_gettime; # xsub
# spent 2µs within Time::HiRes::constant which was called 2 times, avg 900ns/call: # 2 times (2µs+0s) by Time::HiRes::AUTOLOAD at line 63, avg 900ns/call
sub Time::HiRes::constant; # xsub