stats: add option to disable alignment spaces in stats.txt file
authorCiro Santilli <ciro.santilli@arm.com>
Mon, 16 Mar 2020 18:02:26 +0000 (18:02 +0000)
committerCiro Santilli <ciro.santilli@arm.com>
Fri, 26 Jun 2020 11:20:28 +0000 (11:20 +0000)
commit182effa27381e8a6b8d470a671066cafb21a8a28
tree0d544be755837c67e72c760620fe245f57cefb90
parentacb771be9109966f39035242de030a2027376208
stats: add option to disable alignment spaces in stats.txt file

The alignment spaces in stats.txt takes up a lot of space and increases
simulation time, this commit adds the option to disable them with:

--stats-file stats.txt?spaces=False

Sample old lines with ?desc=False:

system.cpu.op_class::FloatMultAcc                   0      0.00%     65.92%
system.cpu.op_class::FloatDiv                       0      0.00%     65.92%

Sample new lines with ?desc=False;spaces=False:

system.cpu.op_class::FloatMultAcc 0 0.00% 65.92%
system.cpu.op_class::FloatDiv 0 0.00% 65.92%

On a 1000 dumpstats m5op loop spaces=False reduces:

* size: from 38MB to 20MB
* time: from 4.5s to 3.5s

Change-Id: Ib738b996b5646c329094cf61aaa1d977e844e759
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28627
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/stats/text.cc
src/base/stats/text.hh
src/python/m5/stats/__init__.py