perf: Export software-only event group characteristic as a flag
authorFrederic Weisbecker <fweisbec@gmail.com>
Sun, 10 Jan 2010 00:25:51 +0000 (01:25 +0100)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sat, 16 Jan 2010 11:30:40 +0000 (12:30 +0100)
commitd6f962b57bfaab62891c7abbf1469212a56d6103
tree189bfea3e87fb61d3b068e050b794f3b8ad7d483
parente286417378b4f9ce6e473b556193465ab22e12ab
perf: Export software-only event group characteristic as a flag

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: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
include/linux/perf_event.h
kernel/perf_event.c