Re: [PATCH] parisc: add LATENCYTOP_SUPPORT and CONFIG_STACKTRACE_SUPPORT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 06, 2009 at 09:50:39PM +0100, Helge Deller wrote:
> +#include <asm/unwind.h>
> +
> +static void dump_trace(struct task_struct *task, struct stack_trace *trace)
> +{
> +	struct unwind_frame_info info;
> +
> +	/* initialize unwind info */
> +	if (task == current) {
> +		unsigned long sp;
> +		struct pt_regs r;
> +HERE:
> +		asm volatile ("copy %%r30, %0" : "=r"(sp));
> +		memset(&r, 0, sizeof(struct pt_regs));
> +		r.iaoq[0] = (unsigned long)&&HERE;
> +		r.gr[2] = (unsigned long)__builtin_return_address(0);
> +		r.gr[30] = sp;
> +		unwind_frame_init(&info, task, &r);
> +	} else {
> +		unwind_frame_init_from_blocked_task(&info, task);
> +	}
> +

applied, with a clean up that takes this to a forced inline to share
between here and traps.c.

cheers, Kyle
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux