Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-04-02 Thread Wladislav Wiebe
Hi, I have a bad experience with MIPS 64 Bit Architecture on Kernel 3.8. The Kernel doesn't boot when enabling CONFIG_FUNCTION_TRACER, it hangs at early startup directly after u-boot init: .. ## Loading Linux kernel with entry point: 0x805e23c0 ... Bootloader: Done loading app on

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-04-02 Thread Wladislav Wiebe
Hi, I have a bad experience with MIPS 64 Bit Architecture on Kernel 3.8. The Kernel doesn't boot when enabling CONFIG_FUNCTION_TRACER, it hangs at early startup directly after u-boot init: .. ## Loading Linux kernel with entry point: 0x805e23c0 ... Bootloader: Done loading app on

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-17 Thread Steven Rostedt
On Thu, 2013-01-17 at 09:58 -0500, Alan Cooper wrote: > When the kernel first boots we have to be able to handle the gcc > generated jalr, addui sequence until ftrace_init gets a chance to run > and change the sequence. At this point mcount just adjusts the stack > and returns. When ftrace_init

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-17 Thread Alan Cooper
When the kernel first boots we have to be able to handle the gcc generated jalr, addui sequence until ftrace_init gets a chance to run and change the sequence. At this point mcount just adjusts the stack and returns. When ftrace_init runs, we convert the jalr/addui to nops. Then whenever tracing

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-17 Thread Alan Cooper
When the kernel first boots we have to be able to handle the gcc generated jalr, addui sequence until ftrace_init gets a chance to run and change the sequence. At this point mcount just adjusts the stack and returns. When ftrace_init runs, we convert the jalr/addui to nops. Then whenever tracing

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-17 Thread Steven Rostedt
On Thu, 2013-01-17 at 09:58 -0500, Alan Cooper wrote: When the kernel first boots we have to be able to handle the gcc generated jalr, addui sequence until ftrace_init gets a chance to run and change the sequence. At this point mcount just adjusts the stack and returns. When ftrace_init runs,

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-16 Thread Geert Uytterhoeven
On Thu, Jan 17, 2013 at 12:43 AM, Al Cooper wrote: > Part of the sequence is "addiu sp,sp,-8" in the delay slot after every > call to the trace routine "_mcount" (some legacy thing where 2 arguments > used to be pushed on the stack). The _mcount routine is expected to > adjust the sp by +8 before

[PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-16 Thread Al Cooper
This is my second attempt and is the result of some GREAT feedback from David Daney and Steven Rostedt. Function tracing is currently broken for all 32 bit MIPS platforms. When tracing is enabled, the kernel immediately hangs on boot. This is a result of commit

[PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-16 Thread Al Cooper
This is my second attempt and is the result of some GREAT feedback from David Daney and Steven Rostedt. Function tracing is currently broken for all 32 bit MIPS platforms. When tracing is enabled, the kernel immediately hangs on boot. This is a result of commit

Re: [PATCH V2] mips: function tracer: Fix broken function tracing

2013-01-16 Thread Geert Uytterhoeven
On Thu, Jan 17, 2013 at 12:43 AM, Al Cooper alcoop...@gmail.com wrote: Part of the sequence is addiu sp,sp,-8 in the delay slot after every call to the trace routine _mcount (some legacy thing where 2 arguments used to be pushed on the stack). The _mcount routine is expected to adjust the sp