Commit 9c03d88e authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf_counter: add more context information

Change the callchain context entries to u16, so as to gain some space.
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <20090406094517.457320003@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a2e87d06
...@@ -507,10 +507,10 @@ extern void perf_counter_mmap(unsigned long addr, unsigned long len, ...@@ -507,10 +507,10 @@ extern void perf_counter_mmap(unsigned long addr, unsigned long len,
extern void perf_counter_munmap(unsigned long addr, unsigned long len, extern void perf_counter_munmap(unsigned long addr, unsigned long len,
unsigned long pgoff, struct file *file); unsigned long pgoff, struct file *file);
#define MAX_STACK_DEPTH 254 #define MAX_STACK_DEPTH 255
struct perf_callchain_entry { struct perf_callchain_entry {
u32 nr, hv, kernel, user; u16 nr, hv, kernel, user;
u64 ip[MAX_STACK_DEPTH]; u64 ip[MAX_STACK_DEPTH];
}; };
......
...@@ -1657,9 +1657,7 @@ void perf_counter_do_pending(void) ...@@ -1657,9 +1657,7 @@ void perf_counter_do_pending(void)
* Callchain support -- arch specific * Callchain support -- arch specific
*/ */
struct perf_callchain_entry * __weak struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
__attribute__((weak))
perf_callchain(struct pt_regs *regs)
{ {
return NULL; return NULL;
} }
...@@ -1819,7 +1817,7 @@ void perf_counter_output(struct perf_counter *counter, ...@@ -1819,7 +1817,7 @@ void perf_counter_output(struct perf_counter *counter,
callchain = perf_callchain(regs); callchain = perf_callchain(regs);
if (callchain) { if (callchain) {
callchain_size = (2 + callchain->nr) * sizeof(u64); callchain_size = (1 + callchain->nr) * sizeof(u64);
header.type |= __PERF_EVENT_CALLCHAIN; header.type |= __PERF_EVENT_CALLCHAIN;
header.size += callchain_size; header.size += callchain_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment