Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tools: Allow events with dot

The Intel events use a dot to separate event name and unit mask. Allow
dot in names in the scanner, and remove special handling of dot as EOF.
Also remove the hack in jevents to replace dot with underscore. This way
dotted events can be specified directly by the user.

I'm not fully sure this change to the scanner is correct (what was the
dot special case good for?), but I haven't found anything that breaks
with it so far at least.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/1433921123-25327-8-git-send-email-sukadev@linux.vnet.ibm.com
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Andi Kleen and committed by
Arnaldo Carvalho de Melo
5b021ddf 70c646e0

+2 -3
+2 -3
tools/perf/util/parse-events.l
··· 119 119 num_dec [0-9]+ 120 120 num_hex 0x[a-fA-F0-9]+ 121 121 num_raw_hex [a-fA-F0-9]+ 122 - name [a-zA-Z_*?][a-zA-Z0-9_*?]* 123 - name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?]* 122 + name [a-zA-Z_*?][a-zA-Z0-9_*?.]* 123 + name_minus [a-zA-Z_*?][a-zA-Z0-9\-_*?.]* 124 124 /* If you add a modifier you need to update check_modifier() */ 125 125 modifier_event [ukhpGHSDI]+ 126 126 modifier_bp [rwx]{1,3} ··· 165 165 return PE_EVENT_NAME; 166 166 } 167 167 168 - . | 169 168 <<EOF>> { 170 169 BEGIN(INITIAL); 171 170 REWIND(0);