Re: [PATCH] tracing/function-branch-tracer: support for x86-64

From: Frédéric Weisbecker
Date: Wed Dec 03 2008 - 18:33:20 EST

2008/12/3 Alexander van Heukelum <heukelum@xxxxxxxxxxx>:
> Hi Frederic,
> The changes to entry_64.S look simple enough. The order of
> saving the registers on the stack is not important in any
> way, right?

No they don't matter.
All arguments should be saved on ftrace_graph_caller to not loose them
on call entry hooking.

On return (return_to_handler), I thought that I only needed to save
%rax (return value), the other scratch registers shouldn't matter at
the return state and the others will be saved by the return hooker.

But when I only save %rax, my system crashes. I don't know why so I
kept saving all scratch registers.

> I think this can be done with:
> _ASM_EXTABLE(1b,3b)
> _ASM_EXTABLE(2b,3b)
> (from: arch/x86/include/asm/asm.h)

Thanks. That and the generic move have actually been implemented by
Steven very recently:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at