Messages in this thread Patch in this message | | | From | Andrew Vagin <> | Subject | [PATCH 4/4] perf: add scripts for profiling sleep times | Date | Thu, 3 Nov 2011 01:59:44 +0300 |
| |
E.g.: # ./perf script record sched-stat -- -e sched:sched_stat_sleep & # ./foo; # killall -SIGINT perf ./perf script report sched-stat
Signed-off-by: Andrew Vagin <avagin@openvz.org> --- tools/perf/scripts/python/bin/sched-stat-record | 2 ++ tools/perf/scripts/python/bin/sched-stat-report | 6 ++++++ 2 files changed, 8 insertions(+), 0 deletions(-) create mode 100644 tools/perf/scripts/python/bin/sched-stat-record create mode 100644 tools/perf/scripts/python/bin/sched-stat-report
diff --git a/tools/perf/scripts/python/bin/sched-stat-record b/tools/perf/scripts/python/bin/sched-stat-record new file mode 100644 index 0000000..b9873d9 --- /dev/null +++ b/tools/perf/scripts/python/bin/sched-stat-record @@ -0,0 +1,2 @@ +#!/bin/bash +perf record -ag -e sched:sched_switch --filter "prev_state == 1 || prev_state == 2" -e sched:sched_process_exit ${@/--/} diff --git a/tools/perf/scripts/python/bin/sched-stat-report b/tools/perf/scripts/python/bin/sched-stat-report new file mode 100644 index 0000000..d225a37 --- /dev/null +++ b/tools/perf/scripts/python/bin/sched-stat-report @@ -0,0 +1,6 @@ +#!/bin/bash +# description: profiling sleep times +# args: -e sched:sched_stat_[smth] +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
| |