/* New stack pointer leaves the current stack */ if (get_stack_info(sp, state->task, info, mask) != 0 ||
!on_stack(info, sp, sizeof(struct stack_frame))) /* 'sp' does not point to a valid stack */ returnfalse; returntrue;
}
staticinlinebool is_final_pt_regs(struct unwind_state *state, struct pt_regs *regs)
{ /* user mode or kernel thread pt_regs at the bottom of task stack */ if (task_pt_regs(state->task) == regs) returntrue;
/* user mode pt_regs at the bottom of irq stack */ return state->stack_info.type == STACK_TYPE_IRQ &&
state->stack_info.end - sizeof(struct pt_regs) == (unsignedlong)regs &&
READ_ONCE_NOCHECK(regs->psw.mask) & PSW_MASK_PSTATE;
}
/* Don't even attempt to start from user mode regs: */ if (regs && user_mode(regs)) {
info->type = STACK_TYPE_UNKNOWN; return;
}
/* Get the instruction pointer from pt_regs or the stack frame */ if (regs) {
ip = regs->psw.addr;
sp = regs->gprs[15];
} elseif (task == current) {
sp = current_frame_address();
} else {
sp = task->thread.ksp;
}
/* Get current stack pointer and initialize stack info */ if (!update_stack_info(state, sp)) { /* Something is wrong with the stack pointer */
info->type = STACK_TYPE_UNKNOWN;
state->error = true; return;
}
if (!regs) { /* Stack frame is within valid stack */
sf = (struct stack_frame *)sp;
ip = READ_ONCE_NOCHECK(sf->gprs[8]);
}
if (!first_frame) return; /* Skip through the call chain to the specified starting frame */ while (!unwind_done(state)) { if (on_stack(&state->stack_info, first_frame, sizeof(struct stack_frame))) { if (state->sp >= first_frame) break;
}
unwind_next_frame(state);
}
}
EXPORT_SYMBOL_GPL(__unwind_start);
Messung V0.5
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet)
¤
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.