Skip to content

Commit 6880c98

Browse files
committed
tracing: Add LATENCY_FS_NOTIFY to define if latency_fsnotify() is defined
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 <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 62de4f2 commit 6880c98

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,8 +1690,7 @@ static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
16901690
unsigned long __read_mostly tracing_thresh;
16911691
static const struct file_operations tracing_max_lat_fops;
16921692

1693-
#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
1694-
defined(CONFIG_FSNOTIFY)
1693+
#ifdef LATENCY_FS_NOTIFY
16951694

16961695
static struct workqueue_struct *fsnotify_wq;
16971696

kernel/trace/trace.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,13 +677,13 @@ void update_max_tr_single(struct trace_array *tr,
677677

678678
#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \
679679
defined(CONFIG_FSNOTIFY)
680+
#define LATENCY_FS_NOTIFY
681+
#endif
680682

683+
#ifdef LATENCY_FS_NOTIFY
681684
void latency_fsnotify(struct trace_array *tr);
682-
683685
#else
684-
685686
static inline void latency_fsnotify(struct trace_array *tr) { }
686-
687687
#endif
688688

689689
#ifdef CONFIG_STACKTRACE

0 commit comments

Comments
 (0)