1
1
The files array was also storing $phase.prof. This was leading to
$phase.prof's output getting dumped into itself again and again. Updated
code to initialise files array with files other than $phase.prof.

Signed-off-by: Ninad Prabhukhanolkar <ninadchess96@gmail.com>
Этот коммит содержится в:
Ninad Prabhukhanolkar 2018-04-26 15:01:11 +05:30
родитель edb8fe8e4b
Коммит 1518d7e003

Просмотреть файл

@ -53,12 +53,13 @@ foreach $id (sort {$a <=> $b} keys %phaseid) {
sub aggregate{ sub aggregate{
$phase = $_[0]; $phase = $_[0];
#Aggregating all files of given phase in files array.This should be done
# before creating $phase.prof to avoid adding $phase.prof to files array
@files = glob ($phase."*");
print "Building $phase.prof\n"; print "Building $phase.prof\n";
open OUT,">$phase.prof"; open OUT,">$phase.prof";
@files = glob ($phase."*");
foreach $file ( @files) { foreach $file ( @files) {
open IN,$file; open IN,$file;