Esempio n. 1
0
void oprof_alarm_handler(Ureg *u)
{
	//int coreid = machp()->machno;
	if (u->ip > KTZERO)
		oprofile_add_backtrace(u->ip, u->bp);
	else
		oprofile_add_userpc(u->ip);
}
Esempio n. 2
0
static void oprof_alarm_handler(struct alarm_waiter *waiter,
                                struct hw_trapframe *hw_tf)
{
	int coreid = core_id();
	struct timer_chain *tchain = &per_cpu_info[coreid].tchain;
	if (in_kernel(hw_tf))
		oprofile_add_backtrace(get_hwtf_pc(hw_tf), get_hwtf_fp(hw_tf));
	else
		oprofile_add_userpc(get_hwtf_pc(hw_tf));
	reset_alarm_rel(tchain, waiter, oprof_timer_period);
}