← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:36 2012

Filename/usr/lib/perl5/5.14/i686-cygwin-threads-64int/IO/Seekable.pm
StatementsExecuted 83233 statements in 480ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
29825102180ms347msIO::Seekable::::seekIO::Seekable::seek
2982511168ms168msIO::Seekable::::CORE:seekIO::Seekable::CORE:seek (opcode)
117835262.1ms70.9msIO::Seekable::::tellIO::Seekable::tell
11783118.76ms8.76msIO::Seekable::::CORE:tellIO::Seekable::CORE:tell (opcode)
1116.80ms11.8msIO::Seekable::::BEGIN@101IO::Seekable::BEGIN@101
1113.57ms5.53msIO::Seekable::::BEGIN@104IO::Seekable::BEGIN@104
111239µs239µsIO::Seekable::::BEGIN@97IO::Seekable::BEGIN@97
11116µs24µsIO::Seekable::::BEGIN@99IO::Seekable::BEGIN@99
11115µs88µsIO::Seekable::::BEGIN@98IO::Seekable::BEGIN@98
0000s0sIO::Seekable::::sysseekIO::Seekable::sysseek
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#
2
3package IO::Seekable;
4
5=head1 NAME
6
7IO::Seekable - supply seek based methods for I/O objects
8
9=head1 SYNOPSIS
10
11 use IO::Seekable;
12 package IO::Something;
13 @ISA = qw(IO::Seekable);
14
15=head1 DESCRIPTION
16
17C<IO::Seekable> does not have a constructor of its own as it is intended to
18be inherited by other C<IO::Handle> based objects. It provides methods
19which allow seeking of the file descriptors.
20
21=over 4
22
23=item $io->getpos
24
25Returns an opaque value that represents the current position of the
26IO::File, or C<undef> if this is not possible (eg an unseekable stream such
27as a terminal, pipe or socket). If the fgetpos() function is available in
28your C library it is used to implements getpos, else perl emulates getpos
29using C's ftell() function.
30
31=item $io->setpos
32
33Uses the value of a previous getpos call to return to a previously visited
34position. Returns "0 but true" on success, C<undef> on failure.
35
36=back
37
38See L<perlfunc> for complete descriptions of each of the following
39supported C<IO::Seekable> methods, which are just front ends for the
40corresponding built-in functions:
41
42=over 4
43
44=item $io->seek ( POS, WHENCE )
45
46Seek the IO::File to position POS, relative to WHENCE:
47
48=over 8
49
50=item WHENCE=0 (SEEK_SET)
51
52POS is absolute position. (Seek relative to the start of the file)
53
54=item WHENCE=1 (SEEK_CUR)
55
56POS is an offset from the current position. (Seek relative to current)
57
58=item WHENCE=2 (SEEK_END)
59
60POS is an offset from the end of the file. (Seek relative to end)
61
62=back
63
64The SEEK_* constants can be imported from the C<Fcntl> module if you
65don't wish to use the numbers C<0> C<1> or C<2> in your code.
66
67Returns C<1> upon success, C<0> otherwise.
68
69=item $io->sysseek( POS, WHENCE )
70
71Similar to $io->seek, but sets the IO::File's position using the system
72call lseek(2) directly, so will confuse most perl IO operators except
73sysread and syswrite (see L<perlfunc> for full details)
74
75Returns the new position, or C<undef> on failure. A position
76of zero is returned as the string C<"0 but true">
77
78=item $io->tell
79
80Returns the IO::File's current position, or -1 on error.
81
82=back
83
84=head1 SEE ALSO
85
86L<perlfunc>,
87L<perlop/"I/O Operators">,
88L<IO::Handle>
89L<IO::File>
90
91=head1 HISTORY
92
93Derived from FileHandle.pm by Graham Barr E<lt>gbarr@pobox.comE<gt>
94
95=cut
96
972189µs1239µs
# spent 239µs within IO::Seekable::BEGIN@97 which was called: # once (239µs+0s) by IO::File::BEGIN@133 at line 97
use 5.006_001;
# spent 239µs making 1 call to IO::Seekable::BEGIN@97
98257µs2160µs
# spent 88µs (15+72) within IO::Seekable::BEGIN@98 which was called: # once (15µs+72µs) by IO::File::BEGIN@133 at line 98
use Carp;
# spent 88µs making 1 call to IO::Seekable::BEGIN@98 # spent 72µs making 1 call to Exporter::import
99285µs231µs
# spent 24µs (16+8) within IO::Seekable::BEGIN@99 which was called: # once (16µs+8µs) by IO::File::BEGIN@133 at line 99
use strict;
# spent 24µs making 1 call to IO::Seekable::BEGIN@99 # spent 8µs making 1 call to strict::import
1001500nsour($VERSION, @EXPORT, @ISA);
10122.62ms111.8ms
# spent 11.8ms (6.80+4.96) within IO::Seekable::BEGIN@101 which was called: # once (6.80ms+4.96ms) by IO::File::BEGIN@133 at line 101
use IO::Handle ();
# spent 11.8ms making 1 call to IO::Seekable::BEGIN@101
102# XXX we can't get these from IO::Handle or we'll get prototype
103# mismatch warnings on C<use POSIX; use IO::File;> :-(
10423.25ms26.10ms
# spent 5.53ms (3.57+1.97) within IO::Seekable::BEGIN@104 which was called: # once (3.57ms+1.97ms) by IO::File::BEGIN@133 at line 104
use Fcntl qw(SEEK_SET SEEK_CUR SEEK_END);
# spent 5.53ms making 1 call to IO::Seekable::BEGIN@104 # spent 570µs making 1 call to Exporter::import
10511µsrequire Exporter;
106
10713µs@EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END);
108124µs@ISA = qw(Exporter);
109
11011µs$VERSION = "1.10";
111134µs$VERSION = eval $VERSION;
# spent 6µs executing statements in string eval
112
113
# spent 347ms (180+168) within IO::Seekable::seek which was called 29825 times, avg 12µs/call: # 9982 times (65.2ms+49.5ms) by Archive::Zip::ZipFileMember::_seekToLocalHeader at line 68 of Archive/Zip/ZipFileMember.pm, avg 11µs/call # 8601 times (50.4ms+65.5ms) by Archive::Zip::ZipFileMember::_skipLocalFileHeader at line 156 of Archive/Zip/ZipFileMember.pm, avg 13µs/call # 8601 times (48.7ms+35.9ms) by Archive::Zip::ZipFileMember::rewindData at line 399 of Archive/Zip/ZipFileMember.pm, avg 10µs/call # 1381 times (7.47ms+9.81ms) by Archive::Zip::ZipFileMember::_become at line 108 of Archive/Zip/ZipFileMember.pm, avg 13µs/call # 210 times (1.28ms+1.70ms) by Archive::Zip::Archive::_findEndOfCentralDirectory at line 663 of Archive/Zip/Archive.pm, avg 14µs/call # 210 times (1.30ms+1.50ms) by Archive::Zip::Archive::_findEndOfCentralDirectory at line 676 of Archive/Zip/Archive.pm, avg 13µs/call # 210 times (1.46ms+1.11ms) by Archive::Zip::Archive::readFromFileHandle at line 579 of Archive/Zip/Archive.pm, avg 12µs/call # 210 times (1.32ms+1.02ms) by Archive::Zip::Archive::_findEndOfCentralDirectory at line 690 of Archive/Zip/Archive.pm, avg 11µs/call # 210 times (1.22ms+878µs) by Archive::Zip::Archive::readFromFileHandle at line 589 of Archive/Zip/Archive.pm, avg 10µs/call # 210 times (1.16ms+925µs) by Archive::Zip::Archive::_readEndOfCentralDirectory at line 624 of Archive/Zip/Archive.pm, avg 10µs/call
sub seek {
11459650387ms @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
11529825168ms seek($_[0], $_[1], $_[2]);
# spent 168ms making 29825 calls to IO::Seekable::CORE:seek, avg 6µs/call
116}
117
118sub sysseek {
119 @_ == 3 or croak 'usage: $io->sysseek(POS, WHENCE)';
120 sysseek($_[0], $_[1], $_[2]);
121}
122
123
# spent 70.9ms (62.1+8.76) within IO::Seekable::tell which was called 11783 times, avg 6µs/call: # 8601 times (45.9ms+6.65ms) by Archive::Zip::ZipFileMember::_skipLocalFileHeader at line 169 of Archive/Zip/ZipFileMember.pm, avg 6µs/call # 1381 times (7.06ms+911µs) by Archive::Zip::ZipFileMember::_become at line 105 of Archive/Zip/ZipFileMember.pm, avg 6µs/call # 1381 times (6.79ms+881µs) by Archive::Zip::ZipFileMember::_readLocalFileHeader at line 240 of Archive/Zip/ZipFileMember.pm, avg 6µs/call # 210 times (1.27ms+188µs) by Archive::Zip::Archive::_findEndOfCentralDirectory at line 666 of Archive/Zip/Archive.pm, avg 7µs/call # 210 times (1.06ms+125µs) by Archive::Zip::Archive::readFromFileHandle at line 584 of Archive/Zip/Archive.pm, avg 6µs/call
sub tell {
1242356686.1ms @_ == 1 or croak 'usage: $io->tell()';
125117838.76ms tell($_[0]);
# spent 8.76ms making 11783 calls to IO::Seekable::CORE:tell, avg 743ns/call
126}
127
128124µs1;
 
# spent 168ms within IO::Seekable::CORE:seek which was called 29825 times, avg 6µs/call: # 29825 times (168ms+0s) by IO::Seekable::seek at line 115, avg 6µs/call
sub IO::Seekable::CORE:seek; # opcode
# spent 8.76ms within IO::Seekable::CORE:tell which was called 11783 times, avg 743ns/call: # 11783 times (8.76ms+0s) by IO::Seekable::tell at line 125, avg 743ns/call
sub IO::Seekable::CORE:tell; # opcode