On 18-Nov 16:47, Juri Lelli wrote:
On 18/11/16 17:33, Vincent Guittot wrote:
On 18 November 2016 at 17:26, Juri Lelli juri.lelli@arm.com wrote:
On 18/11/16 16:34, Vincent Guittot wrote:
On 17 November 2016 at 17:34, Juri Lelli juri.lelli@arm.com wrote:
[...]
@@ -557,7 +563,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 %10s\n",
replacing tab with space breaks the cpufreq_governor_efficiency script
I'm not very familiar with the script, but does this fix it?
doc/examples/cpufreq_governor_efficiency/dvfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
This can be further simplified using a single awk command to: a) skip all header line (assuming they start by #) b) printing the third column of all the following pair numbered lines
which is something like:
LOGFILE=rt-app_$1_run$3us_sleep$4us.log for i in $(awk '/^#/{HC++; next;} {SN=NR-HC+1; if(SN%2){print $3}}' $LOGFILE)
where I've used: HC (HeaderCount) : counter of header line SN (SampleNumber) : counter of samples lines NR (Line Number) : awk's predefined line number variable