{
unsigned long bp;
char *stack;
+ int nr = entry->nr;
callchain_store(entry, instruction_pointer(regs));
#endif
dump_trace(NULL, regs, (void *)stack, bp, &backtrace_ops, entry);
+
+ entry->kernel = entry->nr - nr;
}
{
struct stack_frame frame;
const void __user *fp;
+ int nr = entry->nr;
regs = (struct pt_regs *)current->thread.sp0 - 1;
fp = (void __user *)regs->bp;
callchain_store(entry, frame.return_address);
fp = frame.next_fp;
}
+
+ entry->user = entry->nr - nr;
}
static void
entry = &__get_cpu_var(irq_entry);
entry->nr = 0;
+ entry->hv = 0;
+ entry->kernel = 0;
+ entry->user = 0;
perf_do_callchain(regs, entry);
extern void perf_counter_munmap(unsigned long addr, unsigned long len,
unsigned long pgoff, struct file *file);
-#define MAX_STACK_DEPTH 255
+#define MAX_STACK_DEPTH 254
struct perf_callchain_entry {
- u64 nr;
+ u32 nr, hv, kernel, user;
u64 ip[MAX_STACK_DEPTH];
};
callchain = perf_callchain(regs);
if (callchain) {
- callchain_size = (1 + callchain->nr) * sizeof(u64);
+ callchain_size = (2 + callchain->nr) * sizeof(u64);
header.type |= __PERF_EVENT_CALLCHAIN;
header.size += callchain_size;