tools lib traceevent: handle the '->' operator

Hi Ramkumar,

On Mon, 17 Mar 2014 18:26:35 -0400, Ramkumar Ramachandra wrote:
> perf test emits the following warning:
>
>   $ perf test
>    5: parse events tests
>     ...
>     Warning: unknown op '->'
>     ...
>
> Add the operator to the checks.

Hmm.. AFAIK we don't support the '->' operator so I think it's an error
in the callsite.  Where do you see the message though?  I couldn't find
it on my setup.

I'd also like to add following patch to see the location of parse
failure easily.

Thanks,
Namhyung

From 70e1120eb7a505c22bdbe5d0b0f6ad9484219778 Mon Sep 17 00:00:00 2001
From: Namhyung Kim <namhyung@kernel.org>
Date: Tue, 18 Mar 2014 16:45:58 +0900
Subject: [PATCH] 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>
MAINTAINERS: add tools/lib/traceevent/ to perf subsystem

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
tools lib traceevent: field_is_long() includes unsigned long

Note in the comment that field_is_long() also checks for "unsigned
long" and "unsigned long long" in addition to "long long".

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
perf test: squelch warnings about undefined sizeof

perf test emits the following warnings on the parse events test:

  $ perf test
   5: parse events tests
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    Warning: function sizeof not defined
    ...

Squelch the warnings by explicitly ignoring the sizeof function.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>