[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEpjh8ZfZMch2Av/@krava>
Date: Thu, 27 Apr 2023 13:59:03 +0200
From: Jiri Olsa <olsajiri@...il.com>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
Steven Rostedt <rostedt@...dmis.org>,
Florent Revest <revest@...omium.org>,
Mark Rutland <mark.rutland@....com>,
Will Deacon <will@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Martin KaFai Lau <martin.lau@...ux.dev>, bpf@...r.kernel.org
Subject: Re: [PATCH v7 04/11] tracing/probes: Add tracepoint support on
fprobe_events
On Thu, Apr 27, 2023 at 10:18:24AM +0900, Masami Hiramatsu (Google) wrote:
SNIP
> ret = traceprobe_parse_probe_arg(&ep->tp, i, argv[i], flags);
> diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c
> index 0049d9ef2402..7c8be8a3616f 100644
> --- a/kernel/trace/trace_fprobe.c
> +++ b/kernel/trace/trace_fprobe.c
> @@ -9,6 +9,7 @@
> #include <linux/module.h>
> #include <linux/rculist.h>
> #include <linux/security.h>
> +#include <linux/tracepoint.h>
> #include <linux/uaccess.h>
>
> #include "trace_dynevent.h"
> @@ -17,6 +18,7 @@
> #include "trace_probe_tmpl.h"
>
> #define FPROBE_EVENT_SYSTEM "fprobes"
> +#define TRACEPOINT_EVENT_SYSTEM "tracepoints"
so the created tracepoints go under 'events/tracepoints' directory,
should the name be more fprobe specific? like under 'events/fprobe/tracepoints' ?
jirka
> #define RETHOOK_MAXACTIVE_MAX 4096
>
> static int trace_fprobe_create(const char *raw_command);
> @@ -41,6 +43,8 @@ struct trace_fprobe {
> struct dyn_event devent;
> struct fprobe fp;
> const char *symbol;
> + struct tracepoint *tpoint;
> + struct module *mod;
> struct trace_probe tp;
> };
>
> @@ -68,6 +72,11 @@ static bool trace_fprobe_is_return(struct trace_fprobe *tf)
> return tf->fp.exit_handler != NULL;
> }
>
> +static bool trace_fprobe_is_tracepoint(struct trace_fprobe *tf)
> +{
> + return tf->tpoint != NULL;
> +}
> +
SNIP
Powered by blists - more mailing lists