Re: [RFC][PATCH 06/12] ftrace/x86: Add save_regs for i386 functioncalls

From: Steven Rostedt
Date: Wed Jun 06 2012 - 10:37:35 EST


On Tue, 2012-06-05 at 23:51 -0400, Steven Rostedt wrote:

> +ENTRY(ftrace_regs_caller)
> + pushf /* push flags before compare */
> + cmpl $0, function_trace_stop
> + jne ftrace_exit
> +
> +

Masami,

Do we really need to push before the compare? As the compare flags are
really meaningless with calling functions, and here we are only trying
to hide what the cmpl did. If something else was tracing without regs,
and we put a probe just after the nop, then it would include the cmpl
changes. My version of the patch doesn't restore the flags, so two
probes would have different values. But again, do we care? What would
need to know the value of cmp flags when calling into a function when
they are not going to be restored anyway.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/