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

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/removefile.pm
StatementsExecuted 2670 statements in 4.80ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1113.72ms5.10msinstaller::windows::removefile::::create_removefile_tableinstaller::windows::removefile::create_removefile_table
111376µs380µsinstaller::windows::removefile::::BEGIN@30installer::windows::removefile::BEGIN@30
21119µs19µsinstaller::windows::removefile::::get_removefile_filekeyinstaller::windows::removefile::get_removefile_filekey
11116µs18µsinstaller::windows::removefile::::BEGIN@32installer::windows::removefile::BEGIN@32
11114µs16µsinstaller::windows::removefile::::BEGIN@31installer::windows::removefile::BEGIN@31
21111µs11µsinstaller::windows::removefile::::get_removefile_componentinstaller::windows::removefile::get_removefile_component
21110µs10µsinstaller::windows::removefile::::get_removefile_dirpropertyinstaller::windows::removefile::get_removefile_dirproperty
2119µs9µsinstaller::windows::removefile::::get_removefile_filenameinstaller::windows::removefile::get_removefile_filename
1116µs6µsinstaller::windows::removefile::::get_removefile_installmodeinstaller::windows::removefile::get_removefile_installmode
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org. If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28package installer::windows::removefile;
29
30263µs2384µs
# spent 380µs (376+4) within installer::windows::removefile::BEGIN@30 which was called: # once (376µs+4µs) by installer::BEGIN@78 at line 30
use installer::files;
# spent 380µs making 1 call to installer::windows::removefile::BEGIN@30 # spent 4µs making 1 call to UNIVERSAL::import
31254µs219µs
# spent 16µs (14+3) within installer::windows::removefile::BEGIN@31 which was called: # once (14µs+3µs) by installer::BEGIN@78 at line 31
use installer::globals;
# spent 16µs making 1 call to installer::windows::removefile::BEGIN@31 # spent 3µs making 1 call to UNIVERSAL::import
322905µs221µs
# spent 18µs (16+3) within installer::windows::removefile::BEGIN@32 which was called: # once (16µs+3µs) by installer::BEGIN@78 at line 32
use installer::windows::idtglobal;
# spent 18µs making 1 call to installer::windows::removefile::BEGIN@32 # spent 3µs making 1 call to UNIVERSAL::import
33
34########################################################################
35# Returning the FileKey for a folderitem for removefile table.
36########################################################################
37
38sub get_removefile_filekey
39
# spent 19µs within installer::windows::removefile::get_removefile_filekey which was called 2 times, avg 10µs/call: # 2 times (19µs+0s) by installer::windows::removefile::create_removefile_table at line 127, avg 10µs/call
{
40828µs my ($folderitem) = @_;
41
42 # returning the unique identifier
43
44 my $identifier = "remove_" . $folderitem->{'directory'};
45
46 $identifier = lc($identifier);
47
48 return $identifier;
49}
50
51########################################################################
52# Returning the Component for a folderitem for removefile table.
53########################################################################
54
55sub get_removefile_component
56
# spent 11µs within installer::windows::removefile::get_removefile_component which was called 2 times, avg 5µs/call: # 2 times (11µs+0s) by installer::windows::removefile::create_removefile_table at line 128, avg 5µs/call
{
57418µs my ($folderitem) = @_;
58
59 return $folderitem->{'component'};
60}
61
62########################################################################
63# Returning the FileName for a folderitem for removefile table.
64########################################################################
65
66sub get_removefile_filename
67
# spent 9µs within installer::windows::removefile::get_removefile_filename which was called 2 times, avg 4µs/call: # 2 times (9µs+0s) by installer::windows::removefile::create_removefile_table at line 129, avg 4µs/call
{
68416µs my ($folderitem) = @_;
69
70 # return nothing: The assigned directory will be removed
71
72 return "";
73}
74
75########################################################################
76# Returning the DirProperty for a folderitem for removefile table.
77########################################################################
78
79sub get_removefile_dirproperty
80
# spent 10µs within installer::windows::removefile::get_removefile_dirproperty which was called 2 times, avg 5µs/call: # 2 times (10µs+0s) by installer::windows::removefile::create_removefile_table at line 130, avg 5µs/call
{
81420µs my ($folderitem) = @_;
82
83 return $folderitem->{'directory'};
84}
85
86########################################################################
87# Returning the InstallMode for a folderitem for removefile table.
88########################################################################
89
90sub get_removefile_installmode
91
# spent 6µs within installer::windows::removefile::get_removefile_installmode which was called: # once (6µs+0s) by installer::windows::removefile::create_removefile_table at line 133
{
92210µs my ($folderitem) = @_;
93
94 # always returning "2": The file is only removed, if the assigned
95 # component is removed. Name: msidbRemoveFileInstallModeOnRemove
96
97 return 2;
98}
99
100###########################################################################################################
101# Creating the file RemoveFi.idt dynamically
102# Content:
103# FileKey Component_ FileName DirProperty InstallMode
104###########################################################################################################
105
106sub create_removefile_table
107
# spent 5.10ms (3.72+1.38) within installer::windows::removefile::create_removefile_table which was called: # once (3.72ms+1.38ms) by installer::run at line 1531 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
10826413.67ms my ($folderitemsref, $basedir) = @_;
109
110 # Only the directories created for the FolderItems have to be deleted
111 # with the information in the table RemoveFile
112
113 my @directorycollector = ();
114
115 for ( my $i = 0; $i <= $#{$folderitemsref}; $i++ )
116 {
117 my $onelink = ${$folderitemsref}[$i];
118
119 if ( $onelink->{'used'} == 0 ) { next; }
120
121 next if grep {$_ eq $onelink->{'directory'}} @directorycollector;
122
123 push(@directorycollector, $onelink->{'directory'});
124
125 my %removefile = ();
126
127219µs $removefile{'FileKey'} = get_removefile_filekey($onelink);
# spent 19µs making 2 calls to installer::windows::removefile::get_removefile_filekey, avg 10µs/call
128211µs $removefile{'Component_'} = get_removefile_component($onelink);
# spent 11µs making 2 calls to installer::windows::removefile::get_removefile_component, avg 5µs/call
12929µs $removefile{'FileName'} = get_removefile_filename($onelink);
# spent 9µs making 2 calls to installer::windows::removefile::get_removefile_filename, avg 4µs/call
130210µs $removefile{'DirProperty'} = get_removefile_dirproperty($onelink);
# spent 10µs making 2 calls to installer::windows::removefile::get_removefile_dirproperty, avg 5µs/call
131 # fdo#44565 do not remove empty Desktop folder
132 if ( $removefile{'DirProperty'} eq $installer::globals::desktopfolder ) { next; }
13316µs $removefile{'InstallMode'} = get_removefile_installmode($onelink);
134
135 my $oneline = $removefile{'FileKey'} . "\t" . $removefile{'Component_'} . "\t" . $removefile{'FileName'} . "\t"
136 . $removefile{'DirProperty'} . "\t" . $removefile{'InstallMode'} . "\n";
137
138 push(@installer::globals::removefiletable, $oneline);
139 }
140
141 # Saving the file
142
143 my $removefiletablename = $basedir . $installer::globals::separator . "RemoveFi.idt";
14411.32ms installer::files::save_file($removefiletablename ,\@installer::globals::removefiletable);
# spent 1.32ms making 1 call to installer::files::save_file
145 my $infoline = "Created idt file: $removefiletablename\n";
146 push(@installer::globals::logfileinfo, $infoline);
147
148}
149
15017µs1;