Merge branch 'perf/urgent' into perf/core
Merge reason: We want to queue up a dependent patch. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -459,6 +459,8 @@ enum perf_callchain_context {
|
||||
#include <linux/fs.h>
|
||||
#include <linux/pid_namespace.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <asm/atomic.h>
|
||||
|
||||
#define PERF_MAX_STACK_DEPTH 255
|
||||
@@ -865,6 +867,44 @@ perf_sw_event(u32 event_id, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
|
||||
__perf_sw_event(event_id, nr, nmi, regs, addr);
|
||||
}
|
||||
|
||||
extern void
|
||||
perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip);
|
||||
|
||||
/*
|
||||
* Take a snapshot of the regs. Skip ip and frame pointer to
|
||||
* the nth caller. We only need a few of the regs:
|
||||
* - ip for PERF_SAMPLE_IP
|
||||
* - cs for user_mode() tests
|
||||
* - bp for callchains
|
||||
* - eflags, for future purposes, just in case
|
||||
*/
|
||||
static inline void perf_fetch_caller_regs(struct pt_regs *regs, int skip)
|
||||
{
|
||||
unsigned long ip;
|
||||
|
||||
memset(regs, 0, sizeof(*regs));
|
||||
|
||||
switch (skip) {
|
||||
case 1 :
|
||||
ip = CALLER_ADDR0;
|
||||
break;
|
||||
case 2 :
|
||||
ip = CALLER_ADDR1;
|
||||
break;
|
||||
case 3 :
|
||||
ip = CALLER_ADDR2;
|
||||
break;
|
||||
case 4:
|
||||
ip = CALLER_ADDR3;
|
||||
break;
|
||||
/* No need to support further for now */
|
||||
default:
|
||||
ip = 0;
|
||||
}
|
||||
|
||||
return perf_arch_fetch_caller_regs(regs, ip, skip);
|
||||
}
|
||||
|
||||
extern void __perf_event_mmap(struct vm_area_struct *vma);
|
||||
|
||||
static inline void perf_event_mmap(struct vm_area_struct *vma)
|
||||
@@ -898,7 +938,8 @@ static inline bool perf_paranoid_kernel(void)
|
||||
}
|
||||
|
||||
extern void perf_event_init(void);
|
||||
extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record, int entry_size);
|
||||
extern void perf_tp_event(int event_id, u64 addr, u64 count, void *record,
|
||||
int entry_size, struct pt_regs *regs);
|
||||
extern void perf_bp_event(struct perf_event *event, void *data);
|
||||
|
||||
#ifndef perf_misc_flags
|
||||
|
Reference in New Issue
Block a user