diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-12-19 16:08:53 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2013-12-20 14:11:35 +0530 |
commit | ed3bcd832bbbf189432a031d19897d10d8eed54d (patch) | |
tree | 959efccf377f974df6ea80f3436e44a006095767 /common | |
parent | 1e31c33d89088a4c605274b1f29167a8d9e17852 (diff) |
is-cpu-isolated: Don't read between continuous ticks
Sometimes ticks occur continuously within a interval of 5-10 milliseconds. So,
skip them before starting a new reading.
Change-Id: I92104dfcca2c520cff2bc869ea691f3cbc764bb1
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'common')
-rwxr-xr-x | common/scripts/is-cpu-isolated.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index c1802aa..19fa9b6 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -61,13 +61,16 @@ get_isolation_duration() { do let x=x+1 - old_count=$new_count; - T1=$T2 isdebug echo "Start Time in seconds: ${T1}" - # sometimes there are continuous ticks, skip them. - sleep 1 + # sometimes there are continuous ticks, skip them by sleeping for 100 ms. + sleep .1 + + # get count again after continuous ticks are skiped + old_count=$(get_tick_count) + new_count=$old_count + while [ $new_count -eq $old_count ] do |