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

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/assembly.pm
StatementsExecuted 480967 statements in 1.30s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
5337921706ms706msinstaller::windows::assembly::::CORE:matchinstaller::windows::assembly::CORE:match (opcode)
111585ms1.33sinstaller::windows::assembly::::add_assembly_condition_into_component_tableinstaller::windows::assembly::add_assembly_condition_into_component_table
11118.0ms18.7msinstaller::windows::assembly::::BEGIN@33installer::windows::assembly::BEGIN@33
111449µs168msinstaller::windows::assembly::::create_msiassembly_tableinstaller::windows::assembly::create_msiassembly_table
111405µs409µsinstaller::windows::assembly::::BEGIN@30installer::windows::assembly::BEGIN@30
111313µs1.06msinstaller::windows::assembly::::create_msiassemblyname_tableinstaller::windows::assembly::create_msiassemblyname_table
3031224µs224µsinstaller::windows::assembly::::get_msiassembly_componentinstaller::windows::assembly::get_msiassembly_component
1011158µs554µsinstaller::windows::assembly::::get_msiassembly_featureinstaller::windows::assembly::get_msiassembly_feature
101158µs58µsinstaller::windows::assembly::::get_msiassembly_attributesinstaller::windows::assembly::get_msiassembly_attributes
101155µs55µsinstaller::windows::assembly::::get_msiassembly_filemanifestinstaller::windows::assembly::get_msiassembly_filemanifest
101140µs40µsinstaller::windows::assembly::::get_msiassembly_fileapplicationinstaller::windows::assembly::get_msiassembly_fileapplication
11116µs18µsinstaller::windows::assembly::::BEGIN@31installer::windows::assembly::BEGIN@31
11115µs16µsinstaller::windows::assembly::::BEGIN@32installer::windows::assembly::BEGIN@32
0000s0sinstaller::windows::assembly::::get_msiassembly_fileinstaller::windows::assembly::get_msiassembly_file
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::assembly;
29
30268µs2413µs
# spent 409µs (405+4) within installer::windows::assembly::BEGIN@30 which was called: # once (405µs+4µs) by installer::BEGIN@61 at line 30
use installer::files;
# spent 409µs making 1 call to installer::windows::assembly::BEGIN@30 # spent 4µs making 1 call to UNIVERSAL::import
31259µs220µs
# spent 18µs (16+2) within installer::windows::assembly::BEGIN@31 which was called: # once (16µs+2µs) by installer::BEGIN@61 at line 31
use installer::globals;
# spent 18µs making 1 call to installer::windows::assembly::BEGIN@31 # spent 2µs making 1 call to UNIVERSAL::import
32253µs218µs
# spent 16µs (15+1) within installer::windows::assembly::BEGIN@32 which was called: # once (15µs+1µs) by installer::BEGIN@61 at line 32
use installer::worker;
# spent 16µs making 1 call to installer::windows::assembly::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
3323.49ms218.7ms
# spent 18.7ms (18.0+689µs) within installer::windows::assembly::BEGIN@33 which was called: # once (18.0ms+689µs) by installer::BEGIN@61 at line 33
use installer::windows::idtglobal;
# spent 18.7ms making 1 call to installer::windows::assembly::BEGIN@33 # spent 8µs making 1 call to UNIVERSAL::import
34
35##############################################################
36# Returning the first module of a file from the
37# comma separated list of modules.
38##############################################################
39
40sub get_msiassembly_feature
41
# spent 554µs (158+396) within installer::windows::assembly::get_msiassembly_feature which was called 10 times, avg 55µs/call: # 10 times (158µs+396µs) by installer::windows::assembly::create_msiassembly_table at line 173, avg 55µs/call
{
4260168µs my ( $onefile ) = @_;
43
44 my $module = "";
45
46 if ( $onefile->{'modules'} ) { $module = $onefile->{'modules'}; }
47
48 # If modules contains a list of modules, only taking the first one.
49
501011µs if ( $module =~ /^\s*(.*?)\,/ ) { $module = $1; }
# spent 11µs making 10 calls to installer::windows::assembly::CORE:match, avg 1µs/call
51
52 # Attention: Maximum feature length is 38!
5310385µs installer::windows::idtglobal::shorten_feature_gid(\$module);
# spent 385µs making 10 calls to installer::windows::idtglobal::shorten_feature_gid, avg 38µs/call
54
55 return $module;
56}
57
58##############################################################
59# Returning the component of a file.
60##############################################################
61
62sub get_msiassembly_component
63
# spent 224µs within installer::windows::assembly::get_msiassembly_component which was called 30 times, avg 7µs/call: # 10 times (118µs+0s) by installer::windows::assembly::add_assembly_condition_into_component_table at line 276, avg 12µs/call # 10 times (57µs+0s) by installer::windows::assembly::create_msiassembly_table at line 172, avg 6µs/call # 10 times (49µs+0s) by installer::windows::assembly::create_msiassemblyname_table at line 213, avg 5µs/call
{
64120285µs my ( $onefile ) = @_;
65
66 my $component = "";
67
68 $component = $onefile->{'componentname'};
69
70 return $component;
71}
72
73##############################################################
74# Returning the file name as manifest file
75##############################################################
76
77sub get_msiassembly_filemanifest
78
# spent 55µs within installer::windows::assembly::get_msiassembly_filemanifest which was called 10 times, avg 5µs/call: # 10 times (55µs+0s) by installer::windows::assembly::create_msiassembly_table at line 174, avg 5µs/call
{
794077µs my ( $onefile ) = @_;
80
81 my $filemanifest = "";
82
83 $filemanifest = $onefile->{'uniquename'};
84
85 return $filemanifest;
86}
87
88
89##############################################################
90# Returning the file application
91##############################################################
92
93sub get_msiassembly_fileapplication
94
# spent 40µs within installer::windows::assembly::get_msiassembly_fileapplication which was called 10 times, avg 4µs/call: # 10 times (40µs+0s) by installer::windows::assembly::create_msiassembly_table at line 175, avg 4µs/call
{
953063µs my ( $onefile ) = @_;
96
97 my $fileapplication = "";
98
99 return $fileapplication;
100}
101
102##############################################################
103# Returning the file attributes
104##############################################################
105
106sub get_msiassembly_attributes
107
# spent 58µs within installer::windows::assembly::get_msiassembly_attributes which was called 10 times, avg 6µs/call: # 10 times (58µs+0s) by installer::windows::assembly::create_msiassembly_table at line 176, avg 6µs/call
{
1084081µs my ( $onefile ) = @_;
109
110 my $fileattributes = "";
111
112 if ( $onefile->{'Attributes'} ne "" ) { $fileattributes = $onefile->{'Attributes'}; }
113
114 return $fileattributes;
115}
116
117##############################################################
118# Returning the file object for the msiassembly table.
119##############################################################
120
121sub get_msiassembly_file
122{
123 my ( $filesref, $filename ) = @_;
124
125 my $foundfile = 0;
126 my $onefile;
127
128 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
129 {
130 $onefile = ${$filesref}[$i];
131 my $name = $onefile->{'Name'};
132
133 if ( $name eq $filename )
134 {
135 $foundfile = 1;
136 last;
137 }
138 }
139
140 # It does not need to exist. For example products that do not contain the libraries.
141 if (! $foundfile ) { $onefile = ""; }
142
143 return $onefile;
144}
145
146####################################################################################
147# Creating the file MsiAssembly.idt dynamically
148# Content:
149# Component_ Feature_ File_Manifest File_Application Attributes
150# s72 s38 S72 S72 I2
151# MsiAssembly Component_
152####################################################################################
153
154sub create_msiassembly_table
155
# spent 168ms (449µs+167) within installer::windows::assembly::create_msiassembly_table which was called: # once (449µs+167ms) by installer::run at line 1534 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
156970µs my ($filesref, $basedir) = @_;
157
1581165ms $installer::globals::msiassemblyfiles = installer::worker::collect_all_items_with_special_flag($filesref, "ASSEMBLY");
159
160 my @msiassemblytable = ();
161
162132µs installer::windows::idtglobal::write_idt_header(\@msiassemblytable, "msiassembly");
# spent 32µs making 1 call to installer::windows::idtglobal::write_idt_header
163
164 # Registering all libraries listed in $installer::globals::msiassemblyfiles
165
16690243µs for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ )
167 {
168 my $onefile = ${$installer::globals::msiassemblyfiles}[$i];
169
170 my %msiassembly = ();
171
1721057µs $msiassembly{'Component_'} = get_msiassembly_component($onefile);
# spent 57µs making 10 calls to installer::windows::assembly::get_msiassembly_component, avg 6µs/call
17310554µs $msiassembly{'Feature_'} = get_msiassembly_feature($onefile);
# spent 554µs making 10 calls to installer::windows::assembly::get_msiassembly_feature, avg 55µs/call
1741055µs $msiassembly{'File_Manifest'} = get_msiassembly_filemanifest($onefile);
# spent 55µs making 10 calls to installer::windows::assembly::get_msiassembly_filemanifest, avg 5µs/call
1751040µs $msiassembly{'File_Application'} = get_msiassembly_fileapplication($onefile);
# spent 40µs making 10 calls to installer::windows::assembly::get_msiassembly_fileapplication, avg 4µs/call
1761058µs $msiassembly{'Attributes'} = get_msiassembly_attributes($onefile);
# spent 58µs making 10 calls to installer::windows::assembly::get_msiassembly_attributes, avg 6µs/call
177
178 my $oneline = $msiassembly{'Component_'} . "\t" . $msiassembly{'Feature_'} . "\t" .
179 $msiassembly{'File_Manifest'} . "\t" . $msiassembly{'File_Application'} . "\t" .
180 $msiassembly{'Attributes'} . "\n";
181
182 push(@msiassemblytable, $oneline);
183 }
184
185 # Saving the file
186
187 my $msiassemblytablename = $basedir . $installer::globals::separator . "MsiAssem.idt";
18811.15ms installer::files::save_file($msiassemblytablename ,\@msiassemblytable);
# spent 1.15ms making 1 call to installer::files::save_file
189 my $infoline = "Created idt file: $msiassemblytablename\n";
190 push(@installer::globals::logfileinfo, $infoline);
191}
192
193####################################################################################
194# Creating the file MsiAssemblyName.idt dynamically
195# Content:
196# Component_ Name Value
197# s72 s255 s255
198# MsiAssemblyName Component_ Name
199####################################################################################
200
201sub create_msiassemblyname_table
202
# spent 1.06ms (313µs+751µs) within installer::windows::assembly::create_msiassemblyname_table which was called: # once (313µs+751µs) by installer::run at line 1535 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
203860µs my ($filesref, $basedir) = @_;
204
205 my @msiassemblynametable = ();
206
207118µs installer::windows::idtglobal::write_idt_header(\@msiassemblynametable, "msiassemblyname");
# spent 18µs making 1 call to installer::windows::idtglobal::write_idt_header
208
2098094µs for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ )
210 {
211 my $onefile = ${$installer::globals::msiassemblyfiles}[$i];
212
2131049µs my $component = get_msiassembly_component($onefile);
# spent 49µs making 10 calls to installer::windows::assembly::get_msiassembly_component, avg 5µs/call
214 my $oneline = "";
215
216 # Order: (Assembly)name, publicKeyToken, version, culture.
217
2182027µs if ( $onefile->{'Assemblyname'} )
219 {
220 $oneline = $component . "\t" . "name" . "\t" . $onefile->{'Assemblyname'} . "\n";
221 push(@msiassemblynametable, $oneline);
222 }
223
2242026µs if ( $onefile->{'PublicKeyToken'} )
225 {
226 $oneline = $component . "\t" . "publicKeyToken" . "\t" . $onefile->{'PublicKeyToken'} . "\n";
227 push(@msiassemblynametable, $oneline);
228 }
229
2302025µs if ( $onefile->{'Version'} )
231 {
232 $oneline = $component . "\t" . "version" . "\t" . $onefile->{'Version'} . "\n";
233 push(@msiassemblynametable, $oneline);
234 }
235
2362024µs if ( $onefile->{'Culture'} )
237 {
238 $oneline = $component . "\t" . "culture" . "\t" . $onefile->{'Culture'} . "\n";
239 push(@msiassemblynametable, $oneline);
240 }
241
2422026µs if ( $onefile->{'ProcessorArchitecture'} )
243 {
244 $oneline = $component . "\t" . "processorArchitecture" . "\t" . $onefile->{'ProcessorArchitecture'} . "\n";
245 push(@msiassemblynametable, $oneline);
246 }
247 }
248
249 # Saving the file
250
251 my $msiassemblynametablename = $basedir . $installer::globals::separator . "MsiAsseN.idt";
2521684µs installer::files::save_file($msiassemblynametablename ,\@msiassemblynametable);
# spent 684µs making 1 call to installer::files::save_file
253 my $infoline = "Created idt file: $msiassemblynametablename\n";
254 push(@installer::globals::logfileinfo, $infoline);
255
256}
257
258####################################################################################
259# setting an installation condition for the assembly libraries saved in
260# @installer::globals::msiassemblynamecontent
261####################################################################################
262
263sub add_assembly_condition_into_component_table
264
# spent 1.33s (585ms+749ms) within installer::windows::assembly::add_assembly_condition_into_component_table which was called: # once (585ms+749ms) by installer::run at line 1536 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
26574.09ms my ($filesref, $basedir) = @_;
266
267 my $componenttablename = $basedir . $installer::globals::separator . "Componen.idt";
268139.7ms my $componenttable = installer::files::read_file($componenttablename);
# spent 39.7ms making 1 call to installer::files::read_file
269 my $changed = 0;
270 my $infoline = "";
271
2723073.7ms for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ )
273 {
274 my $onefile = ${$installer::globals::msiassemblyfiles}[$i];
275
27610118µs my $filecomponent = get_msiassembly_component($onefile);
# spent 118µs making 10 calls to installer::windows::assembly::get_msiassembly_component, avg 12µs/call
277
278106738960ms for ( my $j = 0; $j <= $#{$componenttable}; $j++ )
279 {
280 my $oneline = ${$componenttable}[$j];
281
282373513253ms53369706ms if ( $oneline =~ /(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)/ )
# spent 706ms making 53369 calls to installer::windows::assembly::CORE:match, avg 13µs/call
283 {
284 my $component = $1;
285 my $componentid = $2;
286 my $directory = $3;
287 my $attributes = $4;
288 my $condition = $5;
289 my $keypath = $6;
290
29190142µs if ( $component eq $filecomponent )
292 {
293 # setting the condition
294
295 $condition = "DOTNET_SUFFICIENT=1";
296 $oneline = $component . "\t" . $componentid . "\t" . $directory . "\t" . $attributes . "\t" . $condition . "\t" . $keypath . "\n";
297 ${$componenttable}[$j] = $oneline;
298 $changed = 1;
299 $infoline = "Changing $componenttablename :\n";
300 push(@installer::globals::logfileinfo, $infoline);
301 $infoline = $oneline;
302 push(@installer::globals::logfileinfo, $infoline);
303 last;
304 }
305 }
306 }
307 }
308
309316µs if ( $changed )
310 {
311 # Saving the file
31214.00ms installer::files::save_file($componenttablename ,$componenttable);
# spent 4.00ms making 1 call to installer::files::save_file
313 $infoline = "Saved idt file: $componenttablename\n";
314 push(@installer::globals::logfileinfo, $infoline);
315 }
316}
317
31817µs1;
 
# spent 706ms within installer::windows::assembly::CORE:match which was called 53379 times, avg 13µs/call: # 53369 times (706ms+0s) by installer::windows::assembly::add_assembly_condition_into_component_table at line 282, avg 13µs/call # 10 times (11µs+0s) by installer::windows::assembly::get_msiassembly_feature at line 50, avg 1µs/call
sub installer::windows::assembly::CORE:match; # opcode