Re: [PATCH] perf_counter: tools: Rework event parsing

From: Ingo Molnar
Date: Wed Jul 01 2009 - 04:25:52 EST



* Paul Mackerras <paulus@xxxxxxxxx> wrote:

> This reworks the parser for event descriptors to make it more
> consistent in what it accepts. It is now structured as a recursive
> descent parser for the following grammar:
>
> events ::= event ( ("," | space) space* event )*
> event ::= ( raw_event | numeric_event | symbolic_event |
> generic_hw_event ) [ event_modifier ]
> raw_event ::= "r" hex_number
> numeric_event ::= number ":" number
> number ::= decimal_number | "0x" hex_number | "0" octal_number
> symbolic_event ::= string_from_event_symbols_array
> generic_hw_event::= cache_type ( "-" ( cache_op | cache_result ) )*
> event_modifier ::= ":" ( "u" | "k" | "h" )+

Very nice changes, thanks Paul!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/