[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6DQLgVYHedPB+F+@google.com>
Date: Mon, 19 Dec 2022 13:57:18 -0700
From: Ross Zwisler <zwisler@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
Masami Hiramatsu <mhiramat@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Tom Zanussi <zanussi@...nel.org>,
Zheng Yejian <zhengyejian1@...wei.com>
Subject: Re: [PATCH 1/2] tracing: Add a way to filter function addresses to
function names
On Mon, Dec 19, 2022 at 01:31:07PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@...dmis.org>
>
> There's been several times where an event records a function address in
> its field and I needed to filter on that address for a specific function
> name. It required looking up the function in kallsyms, finding its size,
> and doing a compare of "field >= function_start && field < function_end".
>
> But this would change from boot to boot and is unreliable in scripts.
> Also, it is useful to have this at boot up, where the addresses will not
> be known. For example, on the boot command line:
>
> trace_trigger="initcall_finish.traceoff if func.function == acpi_init"
>
> To implement this, add a ".function" prefix, that will check that the
> field is of size long, and the only operations allowed (so far) are "=="
> and "!=".
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
Reviewed-by: Ross Zwisler <zwisler@...gle.com>
Powered by blists - more mailing lists