Convert thread logs header to fixed width spaces to improve readability (of both logs and code).
Also, update cpufreq_governor_efficiency script accordingly.
Signed-off-by: Juri Lelli juri.lelli@arm.com --- doc/examples/cpufreq_governor_efficiency/dvfs.sh | 2 +- src/rt-app.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/doc/examples/cpufreq_governor_efficiency/dvfs.sh b/doc/examples/cpufreq_governor_efficiency/dvfs.sh index 7caee7d437f7..ac69a53086e2 100755 --- a/doc/examples/cpufreq_governor_efficiency/dvfs.sh +++ b/doc/examples/cpufreq_governor_efficiency/dvfs.sh @@ -32,7 +32,7 @@ if [ $1 ] ; then sum=0 loop=0 overrun=0 - for i in $(cat rt-app_$1_run$3us_sleep$4us.log | sed '1d;n;d' | sed '1d' |cut -f 3); do + for i in $(cat rt-app_$1_run$3us_sleep$4us.log | sed '1d;n;d' | sed '1d' | awk '{print $3}'); do loop=$(expr $loop + 1) sum=$(expr $sum + $i) if [ $4 -le $i ] ; then diff --git a/src/rt-app.c b/src/rt-app.c index 442771f553f9..71c04d0639b9 100644 --- a/src/rt-app.c +++ b/src/rt-app.c @@ -557,7 +557,9 @@ void *thread_body(void *arg)
log_notice("[%d] starting thread ...\n", data->ind);
- fprintf(data->log_handler, "#idx\tperf\trun\tperiod\tstart\t\tend\t\trel_st\n"); + fprintf(data->log_handler, "%s %8s %8s %8s %15s %15s %15s\n", + "#idx", "perf", "run", "period", + "start", "end", "rel_st");
if (opts.ftrace) log_ftrace(ft_data.marker_fd, "[%d] starts", data->ind);