• Frederic Weisbecker's avatar
    perf: Export software-only event group characteristic as a flag · d6f962b5
    Frederic Weisbecker authored
    Before scheduling an event group, we first check if a group can go
    on. We first check if the group is made of software only events
    first, in which case it is enough to know if the group can be
    scheduled in.
    For that purpose, we iterate through the whole group, which is
    wasteful as we could do this check when we add/delete an event to
    a group.
    So we create a group_flags field in perf event that can host
    characteristics from a group of events, starting with a first
    PERF_GROUP_SOFTWARE flag that reduces the check on the fast path.
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
perf_event.h 22.8 KB