• Jiri Olsa's avatar
    perf: Factor out auxiliary events notification · 52d857a8
    Jiri Olsa authored
    Add perf_event_aux() function to send out all types of
    auxiliary events - mmap, task, comm events. For each type
    there's match and output functions defined and used as
    callbacks during perf_event_aux processing.
    
    This way we can centralize the pmu/context iterating and
    event matching logic. Also since lot of the code was
    duplicated, this patch reduces the .text size about 2kB
    on my setup:
    
      snipped output from 'objdump -x kernel/events/core.o'
    
      before:
      Idx Name          Size
        0 .text         0000d313
    
      after:
      Idx Name          Size
        0 .text         0000cad3
    Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
    Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Link: http://lkml.kernel.org/r/1367857638-27631-3-git-send-email-jolsa@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    52d857a8
core.c 174 KB