From fb3ec439b61183b8eaa817878f3b5701a9b891b8 Mon Sep 17 00:00:00 2001 From: Juri Lelli Date: Fri, 18 Nov 2016 16:51:18 +0000 Subject: rt-app: convert log header to fixed width spaces 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 Acked-by: Vincent Guittot --- 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 7caee7d..ac69a53 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 442771f..71c04d0 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); -- cgit v1.2.3