Re: [PATCH v7 04/11] tracing/probes: Add tracepoint support on fprobe_events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux