aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/perf_counter.h4
-rw-r--r--kernel/perf_counter.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index e22ab47a2f41..f9d5cf0bfbdd 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -507,10 +507,10 @@ extern void perf_counter_mmap(unsigned long addr, unsigned long len,
507extern void perf_counter_munmap(unsigned long addr, unsigned long len, 507extern void perf_counter_munmap(unsigned long addr, unsigned long len,
508 unsigned long pgoff, struct file *file); 508 unsigned long pgoff, struct file *file);
509 509
510#define MAX_STACK_DEPTH 254 510#define MAX_STACK_DEPTH 255
511 511
512struct perf_callchain_entry { 512struct perf_callchain_entry {
513 u32 nr, hv, kernel, user; 513 u16 nr, hv, kernel, user;
514 u64 ip[MAX_STACK_DEPTH]; 514 u64 ip[MAX_STACK_DEPTH];
515}; 515};
516 516
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 2a5d4f525567..727624db5078 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1657,9 +1657,7 @@ void perf_counter_do_pending(void)
1657 * Callchain support -- arch specific 1657 * Callchain support -- arch specific
1658 */ 1658 */
1659 1659
1660struct perf_callchain_entry * 1660__weak struct perf_callchain_entry *perf_callchain(struct pt_regs *regs)
1661__attribute__((weak))
1662perf_callchain(struct pt_regs *regs)
1663{ 1661{
1664 return NULL; 1662 return NULL;
1665} 1663}
@@ -1819,7 +1817,7 @@ void perf_counter_output(struct perf_counter *counter,
1819 callchain = perf_callchain(regs); 1817 callchain = perf_callchain(regs);
1820 1818
1821 if (callchain) { 1819 if (callchain) {
1822 callchain_size = (2 + callchain->nr) * sizeof(u64); 1820 callchain_size = (1 + callchain->nr) * sizeof(u64);
1823 1821
1824 header.type |= __PERF_EVENT_CALLCHAIN; 1822 header.type |= __PERF_EVENT_CALLCHAIN;
1825 header.size += callchain_size; 1823 header.size += callchain_size;