perf tools: Reconstruct sw event with modifiers from perf_event_attr
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 11 Jun 2012 17:36:20 +0000 (14:36 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 19 Jun 2012 16:06:20 +0000 (13:06 -0300)
commit335c2f5d25319b208fb8b444e6f3099a806a33bf
treeb936f6b770a35e81a49465eb40edc8338745b341
parent0b668bc9a74ce1bd3b8c5fd93e8d85ed955e11fe
perf tools: Reconstruct sw event with modifiers from perf_event_attr

  [root@sandy ~]# perf record -e task-clock:u -a usleep 1
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.482 MB perf.data (~21073 samples) ]
  [root@sandy ~]#

Before:

  [root@sandy ~]# perf evlist
  task-clock
  [root@sandy ~]#

After:

  [root@sandy ~]# perf evlist
  task-clock:u
  [root@sandy ~]#

Ditto for other tools.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-97ltkmj7v23kyhflltf6iz5n@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/parse-events.c