[PATCH 3/3] powerpc/ftrace: simplify prepare_ftrace_return

Steven Rostedt rostedt at goodmis.org
Wed Sep 24 09:46:04 EST 2014


On Wed, 17 Sep 2014 17:07:04 +1000
Anton Blanchard <anton at samba.org> wrote:

> Instead of passing in the stack address of the link register
> to be modified, just pass in the old value and return the
> new value and rely on ftrace_graph_caller to do the
> modification.
> 
> This removes the exception handling around the stack update -
> it isn't needed and we weren't consistent about it. Later on
> we would do an unprotected modification:
> 
>        if (!ftrace_graph_entry(&trace)) {
>                *parent = old;
> 

First I'll say this is something I've been wanting to do with x86 for
some time. That said...

With this patch, things move much further in my tests. The stress test
passes again. But then it fails on my stack trace test. Which is
because this is what I have in the stack traces:

           sleep-3557  [000] d...   100.206808: <stack trace>
 => 0
 => 0
 => 0
 => 0
 => 0
 => 0
 => 0
 => 0


Where without the patches I have something like this:

          sleep-3641  [001] d...   304.023550: <stack trace>
 => .ftrace_raw_event_sched_switch
 => .__schedule
 => .schedule
 => .do_nanosleep
 => .hrtimer_nanosleep
 => .compat_SyS_nanosleep
 => syscall_exit
 => 0

This could be broken from the earlier patches, I haven't run just this
test. I probably should on them.

I've attached the test.

-- Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftrace-test-event-stacktrace
Type: application/octet-stream
Size: 3187 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20140923/b3cf886c/attachment.obj>


More information about the Linuxppc-dev mailing list