tools lib traceevent: Print event name when show warning if possible
authorNamhyung Kim <namhyung@kernel.org>
Wed, 19 Mar 2014 01:22:53 +0000 (10:22 +0900)
committerJiri Olsa <jolsa@redhat.com>
Mon, 14 Apr 2014 10:55:00 +0000 (12:55 +0200)
commit3388cc3eb848154d0f2a0cd01542201d0d0fdad7
tree2b8f0e84d8e69f75618507da2a1356a8433aa9d4
parent5e09714b0e877d5d062530aae4061074d864243f
tools lib traceevent: Print event name when show warning if possible

It's sometimes useful to know where the parse failure was occurred.  Add
do_warning_event() macro to see the failing event.

It now shows the messages like below:

  $ perf test 5
   5: parse events tests                                     :  Warning: [kvmmmu:kvm_mmu_get_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_sync_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_unsync_page] bad op token {
    Warning: [kvmmmu:kvm_mmu_prepare_zap_page] bad op token {
    Warning: [kvmmmu:fast_page_fault] function is_writable_pte not defined
    Warning: [xen:xen_mmu_ptep_modify_prot_commit] function sizeof not defined
    Warning: [xen:xen_mmu_ptep_modify_prot_start] function sizeof not defined
    Warning: [xen:xen_mmu_set_pgd] function sizeof not defined
    Warning: [xen:xen_mmu_set_pud] function sizeof not defined
    Warning: [xen:xen_mmu_set_pmd] function sizeof not defined
    ...

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1395192174-26273-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
tools/lib/traceevent/event-parse.c