Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147346
b: refs/heads/master
c: 6fab019
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 8, 2009
1 parent 280538a commit 02aac47
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e30e08f65c7ef6c230424264f09c3d53f117f58b
refs/heads/master: 6fab01927e8bdbbc77bafba2abb4810c5591ad52
6 changes: 5 additions & 1 deletion trunk/include/linux/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,13 @@ struct perf_counter_mmap_page {
__u32 data_head; /* head in the data section */
};

#define PERF_EVENT_MISC_KERNEL (1 << 0)
#define PERF_EVENT_MISC_USER (1 << 1)

struct perf_event_header {
__u32 type;
__u32 size;
__u16 misc;
__u16 size;
};

enum perf_event_type {
Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1831,6 +1831,9 @@ static void perf_counter_output(struct perf_counter *counter,
header.type = PERF_EVENT_COUNTER_OVERFLOW;
header.size = sizeof(header);

header.misc = user_mode(regs) ?
PERF_EVENT_MISC_USER : PERF_EVENT_MISC_KERNEL;

if (record_type & PERF_RECORD_IP) {
ip = instruction_pointer(regs);
header.type |= __PERF_EVENT_IP;
Expand Down

0 comments on commit 02aac47

Please sign in to comment.