]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8dfd5f7467f966e17dc613baf7a8c9235240d63c
tree189bfea3e87fb61d3b068e050b794f3b8ad7d483
parentaa45a0eebaa9d3ed12b3ab85f244d5ec6f65f4d8
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