diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-03-31 18:36:11 +0300 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-07-02 03:45:09 +0300 |
| commit | 2db832ec9090d3b5f726f49ad4d0322d6b68a490 (patch) | |
| tree | 5406a87b978bae3a70d11e128b1028b7c83c6305 /include/linux | |
| parent | e3d6e1b9a34c745b635f122ac471a198867cd0ec (diff) | |
| download | linux-2db832ec9090d3b5f726f49ad4d0322d6b68a490.tar.xz | |
tracing: fprobe-events: Register fprobe-events only when it is enabled
Currently fprobe events are registered when it is defined. Thus it will
give some overhead even if it is disabled. This changes it to register the
fprobe only when it is enabled.
Link: https://lore.kernel.org/all/174343537128.843280.16131300052837035043.stgit@devnote2/
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fprobe.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fprobe.h b/include/linux/fprobe.h index 702099f08929..7964db96e41a 100644 --- a/include/linux/fprobe.h +++ b/include/linux/fprobe.h @@ -94,6 +94,7 @@ int register_fprobe_ips(struct fprobe *fp, unsigned long *addrs, int num); int register_fprobe_syms(struct fprobe *fp, const char **syms, int num); int unregister_fprobe(struct fprobe *fp); bool fprobe_is_registered(struct fprobe *fp); +int fprobe_count_ips_from_filter(const char *filter, const char *notfilter); #else static inline int register_fprobe(struct fprobe *fp, const char *filter, const char *notfilter) { @@ -115,6 +116,10 @@ static inline bool fprobe_is_registered(struct fprobe *fp) { return false; } +static inline int fprobe_count_ips_from_filter(const char *filter, const char *notfilter) +{ + return -EOPNOTSUPP; +} #endif /** |
