[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240920101758.60419ec040c6f0643b475720@kernel.org>
Date: Fri, 20 Sep 2024 10:17:58 +0200
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Sven Schnelle <svens@...ux.ibm.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Mark Rutland
<mark.rutland@....com>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, Guo Ren
<guoren@...nel.org>, linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-csky@...r.kernel.org
Subject: Re: [PATCH 0/7] add function arguments to ftrace
On Fri, 13 Sep 2024 08:03:51 +0200
Sven Schnelle <svens@...ux.ibm.com> wrote:
> Sven Schnelle <svens@...ux.ibm.com> writes:
>
> > Masami Hiramatsu (Google) <mhiramat@...nel.org> writes:
> >
> >> On Fri, 6 Sep 2024 10:07:38 -0400
> >> Steven Rostedt <rostedt@...dmis.org> wrote:
> >>
> >>> On Fri, 06 Sep 2024 08:18:02 +0200
> >>> Sven Schnelle <svens@...ux.ibm.com> wrote:
> >>>
> >>>
> >>> > One thing i learned after submitting the series is that struct
> >>> > ftrace_regs depends on CONFIG_FUNCTION_TRACER, so it cannot be used
> >>> > with the graph tracer.
> >>
> >> Yeah, this is solved by my series [1].
> >>
> >> [1] https://patchwork.kernel.org/project/linux-trace-kernel/patch/172398532480.293426.13232399076477198126.stgit@devnote2/
> >>
> >> So I think this series is easier to apply after my series, which
> >> passes fgraph_regs in return handler.
> >
> > Thanks, i'll rebase my changes on top of your patches then.
>
> While doing so i noticed that i completely forgot about arguments
> located on the stack. The current patchset tries to read from the
> current kernel stack, which is obviously wrong. So either the tracer
> needs to save the stack frame in the ringbuffer (which would be quite
> a lot of data), or ftrace only prints arguments located in registers.
> Also not nice. Opinions?
We can limit it to first 6 arguments in the ftrace_regs by default,
no need to save all of them. We can add an option to specify how
many stack entries (but it is set 0 by default).
Thank you,
>
> Thanks
> Sven
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists