tools lib traceevent: Add sched_switch plugin
authorJiri Olsa <jolsa@redhat.com>
Tue, 3 Dec 2013 13:09:31 +0000 (14:09 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 4 Dec 2013 18:31:11 +0000 (15:31 -0300)
commit83e815ee1c6b5fdb570374404ab44b24c1325ccb
tree61790020deddb0d43eff3c5db55bb38274ea172c
parentde705e2e88442c0c5dc6ec8c1f3fb1931def102e
tools lib traceevent: Add sched_switch plugin

Backporting sched_switch plugin.

Backported from Steven Rostedt's trace-cmd repo (HEAD 0f2c2fb):
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git

This plugin adds fields resolving for sched:sched_switch tracepoint
event.

The diff of 'perf script' output generated by old and new code:
(data was generated by 'perf record -e sched:sched_switch -a')

  --- script.sched_switch.old
  +++ script.sched_switch.new
  -            perf   577 [002] 30965.311852: sched:sched_switch: prev_comm=perf prev_pid=577 prev_prio=120 prev_state=S ==> next_comm=swapper/2 next_pid=0 next_prio=120
  +            perf   577 [002] 30965.311852: sched:sched_switch: perf:577 [120] S ==> swapper/2:0 [120]

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1386076182-14484-18-git-send-email-jolsa@redhat.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/Makefile
tools/lib/traceevent/plugin_sched_switch.c [new file with mode: 0644]