← 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:30 2012

Filename/usr/lib/perl5/5.14/i686-cygwin-threads-64int/File/Spec/Cygwin.pm
StatementsExecuted 179853 statements in 628ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1998321357ms962msFile::Spec::Cygwin::::canonpathFile::Spec::Cygwin::canonpath
998722117ms718msFile::Spec::Cygwin::::catdirFile::Spec::Cygwin::catdir
99961164.3ms97.4msFile::Spec::Cygwin::::file_name_is_absoluteFile::Spec::Cygwin::file_name_is_absolute
399662136.4ms36.4msFile::Spec::Cygwin::::CORE:substFile::Spec::Cygwin::CORE:subst (opcode)
99961133.0ms33.0msFile::Spec::Cygwin::::CORE:matchFile::Spec::Cygwin::CORE:match (opcode)
111192µs197µsFile::Spec::Cygwin::::BEGIN@3File::Spec::Cygwin::BEGIN@3
11115µs80µsFile::Spec::Cygwin::::BEGIN@4File::Spec::Cygwin::BEGIN@4
0000s0sFile::Spec::Cygwin::::case_tolerantFile::Spec::Cygwin::case_tolerant
0000s0sFile::Spec::Cygwin::::tmpdirFile::Spec::Cygwin::tmpdir
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package File::Spec::Cygwin;
2
3267µs2202µs
# spent 197µs (192+5) within File::Spec::Cygwin::BEGIN@3 which was called: # once (192µs+5µs) by File::Copy::BEGIN@13 at line 3
use strict;
# spent 197µs making 1 call to File::Spec::Cygwin::BEGIN@3 # spent 6µs making 1 call to strict::import
421.11ms2145µs
# spent 80µs (15+65) within File::Spec::Cygwin::BEGIN@4 which was called: # once (15µs+65µs) by File::Copy::BEGIN@13 at line 4
use vars qw(@ISA $VERSION);
# spent 80µs making 1 call to File::Spec::Cygwin::BEGIN@4 # spent 65µs making 1 call to vars::import
513.19msrequire File::Spec::Unix;
6
712µs$VERSION = '3.33';
8124µs$VERSION = eval $VERSION;
# spent 5µs executing statements in string eval
9
10115µs@ISA = qw(File::Spec::Unix);
11
12=head1 NAME
13
14File::Spec::Cygwin - methods for Cygwin file specs
15
16=head1 SYNOPSIS
17
18 require File::Spec::Cygwin; # Done internally by File::Spec if needed
19
20=head1 DESCRIPTION
21
22See L<File::Spec> and L<File::Spec::Unix>. This package overrides the
23implementation of these methods, not the semantics.
24
25This module is still in beta. Cygwin-knowledgeable folks are invited
26to offer patches and suggestions.
27
28=cut
29
30=pod
31
32=over 4
33
34=item canonpath
35
36Any C<\> (backslashes) are converted to C</> (forward slashes),
37and then File::Spec::Unix canonpath() is called on the result.
38
39=cut
40
41
# spent 962ms (357+605) within File::Spec::Cygwin::canonpath which was called 19983 times, avg 48µs/call: # 9996 times (174ms+276ms) by File::Spec::Unix::rel2abs at line 460 of File/Spec/Unix.pm, avg 45µs/call # 9987 times (183ms+328ms) by File::Spec::Unix::catdir at line 86 of File/Spec/Unix.pm, avg 51µs/call
sub canonpath {
42119898394ms my($self,$path) = @_;
43 return unless defined $path;
44
451998321.7ms $path =~ s|\\|/|g;
# spent 21.7ms making 19983 calls to File::Spec::Cygwin::CORE:subst, avg 1µs/call
46
47 # Handle network path names beginning with double slash
48 my $node = '';
491998314.8ms if ( $path =~ s@^(//[^/]+)(?:/|\z)@/@s ) {
# spent 14.8ms making 19983 calls to File::Spec::Cygwin::CORE:subst, avg 739ns/call
50 $node = $1;
51 }
5219983568ms return $node . $self->SUPER::canonpath($path);
# spent 568ms making 19983 calls to File::Spec::Unix::canonpath, avg 28µs/call
53}
54
55
# spent 718ms (117+601) within File::Spec::Cygwin::catdir which was called 9987 times, avg 72µs/call: # 9982 times (117ms+601ms) by Archive::Zip::_asLocalName at line 549 of Archive/Zip.pm, avg 72µs/call # 5 times (65µs+339µs) by File::Spec::Unix::rel2abs at line 457 of File/Spec/Unix.pm, avg 81µs/call
sub catdir {
5639948117ms my $self = shift;
57 return unless @_;
58
59 # Don't create something that looks like a //network/path
60 if ($_[0] and ($_[0] eq '/' or $_[0] eq '\\')) {
61 shift;
62 return $self->SUPER::catdir('', @_);
63 }
64
659987601ms $self->SUPER::catdir(@_);
# spent 601ms making 9987 calls to File::Spec::Unix::catdir, avg 60µs/call
66}
67
68=pod
69
70=item file_name_is_absolute
71
72True is returned if the file name begins with C<drive_letter:>,
73and if not, File::Spec::Unix file_name_is_absolute() is called.
74
75=cut
76
77
78
# spent 97.4ms (64.3+33.2) within File::Spec::Cygwin::file_name_is_absolute which was called 9996 times, avg 10µs/call: # 9996 times (64.3ms+33.2ms) by File::Spec::Unix::rel2abs at line 444 of File/Spec/Unix.pm, avg 10µs/call
sub file_name_is_absolute {
7919997113ms my ($self,$file) = @_;
80999633.0ms return 1 if $file =~ m{^([a-z]:)?[\\/]}is; # C:/test
# spent 33.0ms making 9996 calls to File::Spec::Cygwin::CORE:match, avg 3µs/call
815205µs return $self->SUPER::file_name_is_absolute($file);
# spent 205µs making 5 calls to File::Spec::Unix::file_name_is_absolute, avg 41µs/call
82}
83
84=item tmpdir (override)
85
86Returns a string representation of the first existing directory
87from the following list:
88
89 $ENV{TMPDIR}
90 /tmp
91 $ENV{'TMP'}
92 $ENV{'TEMP'}
93 C:/temp
94
95Since Perl 5.8.0, if running under taint mode, and if the environment
96variables are tainted, they are not used.
97
98=cut
99
1001500nsmy $tmpdir;
101sub tmpdir {
102 return $tmpdir if defined $tmpdir;
103 $tmpdir = $_[0]->_tmpdir( $ENV{TMPDIR}, "/tmp", $ENV{'TMP'}, $ENV{'TEMP'}, 'C:/temp' );
104}
105
106=item case_tolerant
107
108Override Unix. Cygwin case-tolerance depends on managed mount settings and
109as with MsWin32 on GetVolumeInformation() $ouFsFlags == FS_CASE_SENSITIVE,
110indicating the case significance when comparing file specifications.
111Default: 1
112
113=cut
114
115sub case_tolerant {
116 return 1 unless $^O eq 'cygwin'
117 and defined &Cygwin::mount_flags;
118
119 my $drive = shift;
120 if (! $drive) {
121 my @flags = split(/,/, Cygwin::mount_flags('/cygwin'));
122 my $prefix = pop(@flags);
123 if (! $prefix || $prefix eq 'cygdrive') {
124 $drive = '/cygdrive/c';
125 } elsif ($prefix eq '/') {
126 $drive = '/c';
127 } else {
128 $drive = "$prefix/c";
129 }
130 }
131 my $mntopts = Cygwin::mount_flags($drive);
132 if ($mntopts and ($mntopts =~ /,managed/)) {
133 return 0;
134 }
135 eval { require Win32API::File; } or return 1;
136 my $osFsType = "\0"x256;
137 my $osVolName = "\0"x256;
138 my $ouFsFlags = 0;
139 Win32API::File::GetVolumeInformation($drive, $osVolName, 256, [], [], $ouFsFlags, $osFsType, 256 );
140 if ($ouFsFlags & Win32API::File::FS_CASE_SENSITIVE()) { return 0; }
141 else { return 1; }
142}
143
144=back
145
146=head1 COPYRIGHT
147
148Copyright (c) 2004,2007 by the Perl 5 Porters. All rights reserved.
149
150This program is free software; you can redistribute it and/or modify
151it under the same terms as Perl itself.
152
153=cut
154
155118µs1;
 
# spent 33.0ms within File::Spec::Cygwin::CORE:match which was called 9996 times, avg 3µs/call: # 9996 times (33.0ms+0s) by File::Spec::Cygwin::file_name_is_absolute at line 80, avg 3µs/call
sub File::Spec::Cygwin::CORE:match; # opcode
# spent 36.4ms within File::Spec::Cygwin::CORE:subst which was called 39966 times, avg 912ns/call: # 19983 times (21.7ms+0s) by File::Spec::Cygwin::canonpath at line 45, avg 1µs/call # 19983 times (14.8ms+0s) by File::Spec::Cygwin::canonpath at line 49, avg 739ns/call
sub File::Spec::Cygwin::CORE:subst; # opcode