/* In the prologue of __switch_to, first FP is saved on stack *andthenSPiscopiedtoFP.DwarfassumescfaasFPbased *butwedidn'tsaveFP.ThevalueretrievedaboveisFP's *stateinpreviousframe. *Asaworkaroundforthis,weunwindfrom__switch_tostart *andadjustSPaccordingly.Theotherlimitationisthat *__switch_tomacroisdwarfrulesarenotgeneratedforinline *assemblycode
*/
frame_info->regs.r27 = 0;
frame_info->regs.r28 += 60;
frame_info->call_frame = 0;
if (seed_unwind_frame_info(tsk, regs, &frame_info)) return0;
while (1) {
address = UNW_PC(&frame_info);
if (!address || !__kernel_text_address(address)) break;
if (consumer_fn(address, arg) == -1) break;
ret = arc_unwind(&frame_info); if (ret) break;
frame_info.regs.r63 = frame_info.regs.r31;
if (cnt++ > 128) {
printk("unwinder looping too long, aborting !\n"); return0;
}
}
return address; /* return the last address it saw */ #else /* On ARC, only Dward based unwinder works. fp based backtracing is *notpossible(-fno-omit-frame-pointer)becauseofthewayfunction *prologueissetup(calleeregssavedandthenfpsetandnotother *wayaround
*/
pr_warn_once("CONFIG_ARC_DW2_UNWIND needs to be enabled\n"); return0;
/* Call-back which plugs into unwinding core to dump the stack in *caseofpanic/OOPs/BUGetc
*/ staticint __print_sym(unsignedint address, void *arg)
{ constchar *loglvl = arg;
/* Another API expected by schedular, shows up in "ps" as Wait Channel *Ofcoursejustreturningschedule()wouldbepointlesssounwinduntil *thefunctionisnotinschedularcode
*/ unsignedint __get_wchan(struct task_struct *tsk)
{ return arc_unwind_core(tsk, NULL, __get_first_nonsched, NULL);
}
#ifdef CONFIG_STACKTRACE
/* *APIrequiredbyCONFIG_STACKTRACE,CONFIG_LATENCYTOP. *Atypicaluseiswhen/proc/<pid>/stackisqueriedbyuserland
*/ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
{ /* Assumes @tsk is sleeping so unwinds from __switch_to */
arc_unwind_core(tsk, NULL, __collect_all_but_sched, trace);
}
void save_stack_trace(struct stack_trace *trace)
{ /* Pass NULL for task so it unwinds the current call frame */
arc_unwind_core(NULL, NULL, __collect_all, trace);
}
EXPORT_SYMBOL_GPL(save_stack_trace); #endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.