Skip to content

Commit

Permalink
tracing: Add LATENCY_FS_NOTIFY to define if latency_fsnotify() is def…
Browse files Browse the repository at this point in the history
…ined

With the coming addition of the osnoise tracer, the configs needed to
include the latency_fsnotify() has become more complex, and to keep the
declaration in the header file the same as in the C file, just have the
logic needed to define it in one place, and that defines LATENCY_FS_NOTIFY
which will be used in the C code.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt (VMware) committed Jun 25, 2021
1 parent 62de4f2 commit 6880c98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1690,8 +1690,7 @@ static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
unsigned long __read_mostly tracing_thresh;
static const struct file_operations tracing_max_lat_fops;

#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
defined(CONFIG_FSNOTIFY)
#ifdef LATENCY_FS_NOTIFY

static struct workqueue_struct *fsnotify_wq;

Expand Down
6 changes: 3 additions & 3 deletions kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,13 @@ void update_max_tr_single(struct trace_array *tr,

#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
defined(CONFIG_FSNOTIFY)
#define LATENCY_FS_NOTIFY
#endif

#ifdef LATENCY_FS_NOTIFY
void latency_fsnotify(struct trace_array *tr);

#else

static inline void latency_fsnotify(struct trace_array *tr) { }

#endif

#ifdef CONFIG_STACKTRACE
Expand Down

0 comments on commit 6880c98

Please sign in to comment.