git://git.jankratochvil.net
/
massrebuild.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99eb7ee
)
dtneededsize: +duplicate commons size
author
Jan Kratochvil
<jan.kratochvil@redhat.com>
Sun, 6 Sep 2020 11:22:17 +0000
(13:22 +0200)
committer
Jan Kratochvil
<jan.kratochvil@redhat.com>
Sun, 6 Sep 2020 11:22:17 +0000
(13:22 +0200)
dtneededsize
patch
|
blob
|
history
diff --git
a/dtneededsize
b/dtneededsize
index
0b15cc5
..
1caeb10
100755
(executable)
--- a/
dtneededsize
+++ b/
dtneededsize
@@
-112,6
+112,7
@@
find {
#}
my $dwzsizeall=0;
#}
my $dwzsizeall=0;
+my $dwzsizeduplall=0;
my $dtsizeall=0;
my $computed=0;
BINFN: for my $binfn (@DEBUG) {
my $dtsizeall=0;
my $computed=0;
BINFN: for my $binfn (@DEBUG) {
@@
-151,6
+152,7
@@
BINFN: for my $binfn (@DEBUG) {
}
#warn Dumper $binfn,\%l;
my $dwzsizetot=0;
}
#warn Dumper $binfn,\%l;
my $dwzsizetot=0;
+ my $dwzsizedupltot=0;
my $dtsizetot=0;
my %dwzcommons;
for my $l (keys(%l)) {
my $dtsizetot=0;
my %dwzcommons;
for my $l (keys(%l)) {
@@
-169,23
+171,27
@@
BINFN: for my $binfn (@DEBUG) {
my $dwzsize=$ref->[1];
die if !defined $dwzsize;
$dwzsizetot+=$dwzsize;
my $dwzsize=$ref->[1];
die if !defined $dwzsize;
$dwzsizetot+=$dwzsize;
+ $dwzsizedupltot+=$dwzsize;
$computed++;
my $dwzcommon=$ref->[0];
next if $dwzcommon eq "nodwzcommon";
die if $dwzcommon eq "isdwzcommon";
$computed++;
my $dwzcommon=$ref->[0];
next if $dwzcommon eq "nodwzcommon";
die if $dwzcommon eq "isdwzcommon";
-
next if
$dwzcommons{$dwzcommon}++;
+
my $duplicate=
$dwzcommons{$dwzcommon}++;
my $dwzcommonref=$D{$dwzcommon};
die if !$dwzcommonref;
die if $dwzcommonref->[0] ne "isdwzcommon";
die if $dwzcommonref->[2] ne "NA";
my $dwzcommonsize=$dwzcommonref->[1];
my $dwzcommonref=$D{$dwzcommon};
die if !$dwzcommonref;
die if $dwzcommonref->[0] ne "isdwzcommon";
die if $dwzcommonref->[2] ne "NA";
my $dwzcommonsize=$dwzcommonref->[1];
- $dwzsizetot+=$dwzcommonsize;
+ $dwzsizetot+=$dwzcommonsize if !$duplicate;
+ $dwzsizedupltot+=$dwzcommonsize;
}
print "$binfn: dwzsizetot=$dwzsizetot dtsizetot=$dtsizetot\n";
warn "$binfn: ".Dumper(\%dwzcommons);
$dwzsizeall+=$dwzsizetot;
}
print "$binfn: dwzsizetot=$dwzsizetot dtsizetot=$dtsizetot\n";
warn "$binfn: ".Dumper(\%dwzcommons);
$dwzsizeall+=$dwzsizetot;
+ $dwzsizeduplall+=$dwzsizedupltot;
$dtsizeall+=$dtsizetot;
# warn "$binfn done\n".Dumper([sort keys(%l)]);
}
$dtsizeall+=$dtsizetot;
# warn "$binfn done\n".Dumper([sort keys(%l)]);
}
-print "dwzsizeall=$dwzsizeall dtsizeall=$dtsizeall =".$dwzsizeall/$dtsizeall."\n";
-print "computed=$computed of DEBUG=".(0+@DEBUG)."\n";
+print "dwzsizeall =$dwzsizeall" ." dtsizeall=$dtsizeall =".$dwzsizeall /$dtsizeall."\n";
+print "dwzsizeduplall=$dwzsizeduplall"." dtsizeall=$dtsizeall =".$dwzsizeduplall/$dtsizeall."\n";
+print "computed=$computed of DEBUG=".(0+@DEBUG)." =".$computed/@DEBUG."\n";