コード例 #1
0
static void show_trace(struct task_struct *task, unsigned long *stack)
{
	const unsigned long frame_size =
		STACK_FRAME_OVERHEAD + sizeof(struct pt_regs);
	register unsigned long __r15 asm ("15");
	unsigned long sp;

	sp = (unsigned long) stack;
	if (!sp)
		sp = task ? task->thread.ksp : __r15;
	printk("Call Trace:\n");
#ifdef CONFIG_CHECK_STACK
	sp = __show_trace(sp,
			  S390_lowcore.panic_stack + frame_size - 4096,
			  S390_lowcore.panic_stack + frame_size);
#endif
	sp = __show_trace(sp,
			  S390_lowcore.async_stack + frame_size - ASYNC_SIZE,
			  S390_lowcore.async_stack + frame_size);
	if (task)
		__show_trace(sp, (unsigned long) task_stack_page(task),
			     (unsigned long) task_stack_page(task) + THREAD_SIZE);
	else
		__show_trace(sp, S390_lowcore.thread_info,
			     S390_lowcore.thread_info + THREAD_SIZE);
	if (!task)
		task = current;
	debug_show_held_locks(task);
}
コード例 #2
0
ファイル: debug.cpp プロジェクト: jhonatanoliveira/aGrUM_iSep
    void __inc_creation(const char *zeKey, const char *zeFile, long zeLine,
                        const char *zeMsg, const void *zePtr, int zeSize) {
      __show_trace(zeKey, zeFile, zeLine, zeMsg, zePtr);

      __creation()[zeKey]++;
      __sizeof()[zeKey] = zeSize;
    }
コード例 #3
0
ファイル: backtrace.c プロジェクト: 274914765/C
void s390_backtrace(struct pt_regs * const regs, unsigned int depth)
{
    unsigned long head;
    struct stack_frame* head_sf;

    if (user_mode (regs))
        return;

    head = regs->gprs[15];
    head_sf = (struct stack_frame*)head;

    if (!head_sf->back_chain)
        return;

    head = head_sf->back_chain;

    head = __show_trace(&depth, head, S390_lowcore.async_stack - ASYNC_SIZE,
                S390_lowcore.async_stack);

    __show_trace(&depth, head, S390_lowcore.thread_info,
             S390_lowcore.thread_info + THREAD_SIZE);
}
コード例 #4
0
ファイル: debug.cpp プロジェクト: jhonatanoliveira/aGrUM_iSep
 // to handle static element of agrum library
 void __dec_creation(const char *zeKey, const char *zeFile, long zeLine,
                     const char *zeMsg, const void *zePtr) {
   __show_trace(zeKey, zeFile, zeLine, zeMsg, zePtr);
   __creation()[zeKey]--;
 }
コード例 #5
0
ファイル: debug.cpp プロジェクト: jhonatanoliveira/aGrUM_iSep
 void __inc_deletion(const char *zeKey, const char *zeFile, long zeLine,
                     const char *zeMsg, const void *zePtr) {
   __show_trace(zeKey, zeFile, zeLine, zeMsg, zePtr);
   __deletion()[zeKey]++;
 }