From e08809ba075d92e60f669fc62c48128e06c834fb Mon Sep 17 00:00:00 2001 From: Andrew Vagin Date: Thu, 6 Oct 2011 12:18:44 +0400 Subject: [PATCH 3/3] perf: add scripts for collecting D-state statistics Signed-off-by: Andrew Vagin --- .../perf/scripts/python/bin/task-in-d-state-record | 2 ++ .../perf/scripts/python/bin/task-in-d-state-report | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-) create mode 100644 tools/perf/scripts/python/bin/task-in-d-state-record create mode 100644 tools/perf/scripts/python/bin/task-in-d-state-report diff --git a/tools/perf/scripts/python/bin/task-in-d-state-record b/tools/perf/scripts/python/bin/task-in-d-state-record new file mode 100644 index 0000000..d70bed0 --- /dev/null +++ b/tools/perf/scripts/python/bin/task-in-d-state-record @@ -0,0 +1,2 @@ +#!/bin/bash +perf record -ag -e sched:sched_switch --filter "prev_state == 2" -e sched:sched_stat_iowait -e sched:sched_process_exit $@ diff --git a/tools/perf/scripts/python/bin/task-in-d-state-report b/tools/perf/scripts/python/bin/task-in-d-state-report new file mode 100644 index 0000000..f1ab71e --- /dev/null +++ b/tools/perf/scripts/python/bin/task-in-d-state-report @@ -0,0 +1,6 @@ +#!/bin/bash +# description: D-state statistics +# args: +perf inject -s -i perf.data -o perf.data.d || exit +perf report -i perf.data.d || exit +unlink perf.data.d -- 1.7.1