• J
    perf tools: Add support to parse event group syntax · 89efb029
    Jiri Olsa 提交于
    Adding scanner/parser bits to parse event groups.
    
    The grammar for group is:
      groups:      groups ',' group | group
      group:       group_name '{' events '}' group_mod
      group_name:  name | empty
      group_mod:   ':' group_mods | empty
      group_mods:  event_mod
    
    It's possible to use standard event modifier as a modifier
    for group. It'll be used as an update to existing event
    modifiers.
    
    It's necessary to use quoting ("'\) when specifying group on
    command line, since {} characters are interpreted by most of
    the shells.
    
    It is now possible to specify groups in event syntax like:
    
      '{cycles,faults}'
       - anonymous group
    
      'group1{cycles,faults}
       - group with name 'group1'
    
      '{cycles,faults}:k
       - anonymous group with event modifier 'k'
    
      '{cpu-clock,task-clock},{minor-faults,major-faults}'
       - two anonymous groups
    
    The grouping functionality itself is coming shortly.
    Reviewed-by: NNamhyung Kim <namhyung@kernel.org>
    Signed-off-by: NJiri Olsa <jolsa@redhat.com>
    Acked-by: NPeter Zijlstra <peterz@infradead.org>
    Cc: Andi Kleen <andi@firstfloor.org>
    Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ulrich Drepper <drepper@gmail.com>
    Link: http://lkml.kernel.org/n/tip-p4j8bnvo879uokum4k4zk5q6@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    89efb029
parse-events.h 3.3 KB