aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-04-13 08:57:03 +0200
committerIngo Molnar <mingo@kernel.org>2016-04-13 08:57:03 +0200
commit889fac6d67d46a5e781c08fb26fec9016db1c307 (patch)
tree7e01d04928f7ce343afff5b77ba13c2f3d083326 /include/linux/perf_event.h
parentMerge tag 'perf-core-for-mingo-20160401' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (diff)
parentLinux 4.6-rc3 (diff)
downloadlinux-dev-889fac6d67d46a5e781c08fb26fec9016db1c307.tar.xz
linux-dev-889fac6d67d46a5e781c08fb26fec9016db1c307.zip
Merge tag 'v4.6-rc3' into perf/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 4065ca2d7149..b8b195fbe787 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -977,11 +977,20 @@ DECLARE_PER_CPU(struct perf_callchain_entry, perf_callchain_entry);
extern void perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs);
extern void perf_callchain_kernel(struct perf_callchain_entry *entry, struct pt_regs *regs);
+extern struct perf_callchain_entry *
+get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,
+ bool crosstask, bool add_mark);
+extern int get_callchain_buffers(void);
+extern void put_callchain_buffers(void);
-static inline void perf_callchain_store(struct perf_callchain_entry *entry, u64 ip)
+static inline int perf_callchain_store(struct perf_callchain_entry *entry, u64 ip)
{
- if (entry->nr < PERF_MAX_STACK_DEPTH)
+ if (entry->nr < PERF_MAX_STACK_DEPTH) {
entry->ip[entry->nr++] = ip;
+ return 0;
+ } else {
+ return -1; /* no more room, stop walking the stack */
+ }
}
extern int sysctl_perf_event_paranoid;