Use the SET_OUTPUT ioctl to direct all output to the same buffer

This ensures that we don't get events out of order, which will make
the profiles look a lot less bogus on multi-core systems.
This commit is contained in:
Søren Sandmann Pedersen
2010-04-24 10:49:18 -04:00
parent 539c3a8754
commit c960ebd52f
2 changed files with 53 additions and 30 deletions

View File

@ -216,6 +216,7 @@ struct perf_counter_attr {
#define PERF_COUNTER_IOC_REFRESH _IO ('$', 2)
#define PERF_COUNTER_IOC_RESET _IO ('$', 3)
#define PERF_COUNTER_IOC_PERIOD _IOW('$', 4, u64)
#define PERF_COUNTER_IOC_SET_OUTPUT _IO ('$', 5)
enum perf_counter_ioc_flags {
PERF_IOC_FLAG_GROUP = 1U << 0,