Re: [patches] [PATCH v2] riscv/ftrace: Add basic support

2017-12-12 Thread Alan Kao
On Mon, Dec 11, 2017 at 10:15:58AM -0800, Palmer Dabbelt wrote: > On Wed, 06 Dec 2017 18:31:10 PST (-0800), noner...@gmail.com wrote: Hi Palmer, I forgot to explain this section in the previous reply: > > +ENTRY(_mcount) > > + la t4, ftrace_stub > > +#ifdef CONFIG_FUNCTION_GRAPH_TRACER >

Re: [PATCH v2] riscv/ftrace: Add basic support

2017-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2017 09:47:03 -0800 Jim Wilson wrote: > As Alan mentioned, all gcc does is call mcount with two args, parent > pc and self pc, same as most other linux targets. Most of the > interesting features of prof/gprof profiling happen inside glibc, with > the special start files provided

Re: [PATCH v2] riscv/ftrace: Add basic support

2017-12-12 Thread Steven Rostedt
On Tue, 12 Dec 2017 15:08:00 +0800 Alan Kao wrote: > > It's not a big deal, though -- we can fix these later. The more interesting > > thing here is that this code means our `-pg` stuff is now part of the GCC > > ABI, which is something I'd never though of before. I've added Jim, our GCC > > gu

Re: [PATCH v2] riscv/ftrace: Add basic support

2017-12-12 Thread Jim Wilson
On Mon, Dec 11, 2017 at 11:08 PM, Alan Kao wrote: > On Mon, Dec 11, 2017 at 10:15:58AM -0800, Palmer Dabbelt wrote: >> It's not a big deal, though -- we can fix these later. The more interesting >> thing here is that this code means our `-pg` stuff is now part of the GCC >> ABI, which is somethin

Re: [PATCH v2] riscv/ftrace: Add basic support

2017-12-11 Thread Alan Kao
On Mon, Dec 11, 2017 at 10:15:58AM -0800, Palmer Dabbelt wrote: > On Wed, 06 Dec 2017 18:31:10 PST (-0800), noner...@gmail.com wrote: > > This patch contains basic ftrace support for RV64I platform. > > Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph > > tracer (HAVE_FUNCTION_G

Re: [patches] [PATCH v2] riscv/ftrace: Add basic support

2017-12-11 Thread Palmer Dabbelt
On Wed, 06 Dec 2017 18:31:10 PST (-0800), noner...@gmail.com wrote: This patch contains basic ftrace support for RV64I platform. Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph tracer (HAVE_FUNCTION_GRAPH_TRACER), and a frame pointer test (HAVE_FUNCTION_GRAPH_FP_TEST) are imp

[PATCH v2] riscv/ftrace: Add basic support

2017-12-06 Thread Alan Kao
This patch contains basic ftrace support for RV64I platform. Specifically, function tracer (HAVE_FUNCTION_TRACER), function graph tracer (HAVE_FUNCTION_GRAPH_TRACER), and a frame pointer test (HAVE_FUNCTION_GRAPH_FP_TEST) are implemented following the instructions in Documentation/trace/ftrace-desi