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

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/inifile.pm
StatementsExecuted 429110 statements in 522ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
911445ms445msinstaller::windows::inifile::::file_is_part_of_productinstaller::windows::inifile::file_is_part_of_product
71174.7ms74.7msinstaller::windows::inifile::::get_profile_for_profileiteminstaller::windows::inifile::get_profile_for_profileitem
111867µs521msinstaller::windows::inifile::::create_inifile_tableinstaller::windows::inifile::create_inifile_table
111374µs377µsinstaller::windows::inifile::::BEGIN@30installer::windows::inifile::BEGIN@30
11114µs16µsinstaller::windows::inifile::::BEGIN@31installer::windows::inifile::BEGIN@31
11113µs16µsinstaller::windows::inifile::::BEGIN@32installer::windows::inifile::BEGIN@32
11113µs16µsinstaller::windows::inifile::::BEGIN@33installer::windows::inifile::BEGIN@33
0000s0sinstaller::windows::inifile::::profile_has_patch_flaginstaller::windows::inifile::profile_has_patch_flag
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::inifile;
29
30262µs2379µs
# spent 377µs (374+3) within installer::windows::inifile::BEGIN@30 which was called: # once (374µs+3µs) by installer::BEGIN@72 at line 30
use installer::exiter;
# spent 377µs making 1 call to installer::windows::inifile::BEGIN@30 # spent 3µs making 1 call to UNIVERSAL::import
31253µs218µs
# spent 16µs (14+2) within installer::windows::inifile::BEGIN@31 which was called: # once (14µs+2µs) by installer::BEGIN@72 at line 31
use installer::files;
# spent 16µs making 1 call to installer::windows::inifile::BEGIN@31 # spent 2µs making 1 call to UNIVERSAL::import
32251µs218µs
# spent 16µs (13+3) within installer::windows::inifile::BEGIN@32 which was called: # once (13µs+3µs) by installer::BEGIN@72 at line 32
use installer::globals;
# spent 16µs making 1 call to installer::windows::inifile::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
3321.09ms218µs
# spent 16µs (13+3) within installer::windows::inifile::BEGIN@33 which was called: # once (13µs+3µs) by installer::BEGIN@72 at line 33
use installer::windows::idtglobal;
# spent 16µs making 1 call to installer::windows::inifile::BEGIN@33 # spent 3µs making 1 call to UNIVERSAL::import
34
35####################################################
36# Setting the profile for a special profileitem
37####################################################
38
39sub get_profile_for_profileitem
40
# spent 74.7ms within installer::windows::inifile::get_profile_for_profileitem which was called 7 times, avg 10.7ms/call: # 7 times (74.7ms+0s) by installer::windows::inifile::create_inifile_table at line 118, avg 10.7ms/call
{
412874.7ms my ($profileid, $filesref) = @_;
42
43 my ($profile) = grep {$_->{gid} eq $profileid} @{$filesref};
44 if (! defined $profile) {
45 installer::exiter::exit_program("ERROR: Could not find file $profileid in list of files!", "get_profile_for_profileitem");
46 }
47
48 return $profile;
49}
50
51####################################################
52# Checking whether profile is included in patch
53####################################################
54
55sub profile_has_patch_flag
56{
57 my ($profile) = @_;
58
59 my $in_patch = 0;
60
61 my $styles = "";
62 if ( $profile->{'Styles'} ) { $styles = $profile->{'Styles'}; }
63 if ( $styles =~ /\bPATCH\b/ ) { $in_patch = 1; }
64
65 return $in_patch;
66}
67
68####################################################
69# Checking whether profile is part of product
70####################################################
71
72sub file_is_part_of_product
73
# spent 445ms within installer::windows::inifile::file_is_part_of_product which was called 9 times, avg 49.4ms/call: # 9 times (445ms+0s) by installer::windows::inifile::create_inifile_table at line 116, avg 49.4ms/call
{
74428945445ms my ($profilegid, $filesref) = @_;
75
76 my $part_of_product = 0;
77
78 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
79 {
80 $onefile = ${$filesref}[$i];
81 my $filegid = $onefile->{'gid'};
82
83 if ( $filegid eq $profilegid )
84 {
85 $part_of_product = 1;
86 last;
87 }
88 }
89
90 return $part_of_product;
91}
92
93###########################################################################################################
94# Creating the file IniFile.idt dynamically
95# Content:
96# IniFile\tFileName\tDirProperty\tSection\tKey\tValue\tAction\tComponent_
97###########################################################################################################
98
99sub create_inifile_table
100
# spent 521ms (867µs+521) within installer::windows::inifile::create_inifile_table which was called: # once (867µs+521ms) by installer::run at line 1521 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
101128640µs my ($inifiletableentries, $filesref, $basedir) = @_;
102
103 my @inifiletable = ();
104
105121µs installer::windows::idtglobal::write_idt_header(\@inifiletable, "inifile");
# spent 21µs making 1 call to installer::windows::idtglobal::write_idt_header
106
107 for ( my $i = 0; $i <= $#{$inifiletableentries}; $i++ )
108 {
109 my $profileitem = ${$inifiletableentries}[$i];
110
111 my $profileid = $profileitem->{'ProfileID'};
112
113 # Is this profile part of the product? This is not sure, for example in patch process.
114 # If the profile is not part of the product, this ProfileItem must be ignored.
115
1169445ms if ( ! file_is_part_of_product($profileid, $filesref) ) { next; }
# spent 445ms making 9 calls to installer::windows::inifile::file_is_part_of_product, avg 49.4ms/call
117
118774.7ms my $profile = get_profile_for_profileitem($profileid, $filesref);
# spent 74.7ms making 7 calls to installer::windows::inifile::get_profile_for_profileitem, avg 10.7ms/call
119
120 if (( $installer::globals::patch ) && ( ! profile_has_patch_flag($profile) )) { next; }
121
122 my %inifile = ();
123
124 $inifile{'IniFile'} = $profileitem->{'Inifiletablekey'};
125 $inifile{'FileName'} = $profile->{'Name'};
126 $inifile{'DirProperty'} = $profile->{'uniquedirname'};
127 $inifile{'Section'} = $profileitem->{'Section'};
128 $inifile{'Key'} = $profileitem->{'Key'};
129 $inifile{'Value'} = $profileitem->{'Value'};
130 $inifile{'Action'} = $profileitem->{'Inifiletableaction'};
131 $inifile{'Component_'} = $profile->{'componentname'};
132
133 my $oneline = $inifile{'IniFile'} . "\t" . $inifile{'FileName'} . "\t" . $inifile{'DirProperty'} . "\t"
134 . $inifile{'Section'} . "\t" . $inifile{'Key'} . "\t" . $inifile{'Value'} . "\t"
135 . $inifile{'Action'} . "\t" . $inifile{'Component_'} . "\n";
136
137 push(@inifiletable, $oneline);
138 }
139
140 # Saving the file
141
142 my $inifiletablename = $basedir . $installer::globals::separator . "IniFile.idt";
14311.18ms installer::files::save_file($inifiletablename ,\@inifiletable);
# spent 1.18ms making 1 call to installer::files::save_file
144 my $infoline = "Created idt file: $inifiletablename\n";
145 push(@installer::globals::logfileinfo, $infoline);
146
147}
148
14916µs1;