コード例 #1
0
ファイル: devkprof.c プロジェクト: Shamar/harvey
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);
}
コード例 #2
0
ファイル: kprof.c プロジェクト: AlffiTheBerry/akaros
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);
}