diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-01-09 19:25:51 -0500 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-01-16 06:30:40 -0500 |
commit | d6f962b57bfaab62891c7abbf1469212a56d6103 (patch) | |
tree | 189bfea3e87fb61d3b068e050b794f3b8ad7d483 /include/linux/perf_event.h | |
parent | e286417378b4f9ce6e473b556193465ab22e12ab (diff) |
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>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index cdbc2aa64a0b..c6f812e4d058 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -565,6 +565,10 @@ typedef void (*perf_overflow_handler_t)(struct perf_event *, int, | |||
565 | struct perf_sample_data *, | 565 | struct perf_sample_data *, |
566 | struct pt_regs *regs); | 566 | struct pt_regs *regs); |
567 | 567 | ||
568 | enum perf_group_flag { | ||
569 | PERF_GROUP_SOFTWARE = 0x1, | ||
570 | }; | ||
571 | |||
568 | /** | 572 | /** |
569 | * struct perf_event - performance event kernel representation: | 573 | * struct perf_event - performance event kernel representation: |
570 | */ | 574 | */ |
@@ -574,6 +578,7 @@ struct perf_event { | |||
574 | struct list_head event_entry; | 578 | struct list_head event_entry; |
575 | struct list_head sibling_list; | 579 | struct list_head sibling_list; |
576 | int nr_siblings; | 580 | int nr_siblings; |
581 | int group_flags; | ||
577 | struct perf_event *group_leader; | 582 | struct perf_event *group_leader; |
578 | struct perf_event *output; | 583 | struct perf_event *output; |
579 | const struct pmu *pmu; | 584 | const struct pmu *pmu; |