Skip to content

Commit

Permalink
Merge tag 'trace-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
 "Two minor fixes:

   - Fix trace event header include guards, as several did not match the
     #define to the #ifdef

   - Remove a redundant test to ftrace_graph_notrace_addr() that was
     accidentally added"

* tag 'trace-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  fgraph: Remove redundant ftrace_graph_notrace_addr() test
  tracing: Fix header include guards in trace event headers
  • Loading branch information
Linus Torvalds committed Jul 31, 2019
2 parents 52fde43 + 6c77221 commit d2eee9f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion include/trace/events/dma_fence.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#undef TRACE_SYSTEM
#define TRACE_SYSTEM dma_fence

#if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
#if !defined(_TRACE_DMA_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_DMA_FENCE_H

#include <linux/tracepoint.h>
Expand Down
4 changes: 2 additions & 2 deletions include/trace/events/napi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define TRACE_SYSTEM napi

#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_NAPI_H_
#define _TRACE_NAPI_H

#include <linux/netdevice.h>
#include <linux/tracepoint.h>
Expand Down Expand Up @@ -38,7 +38,7 @@ TRACE_EVENT(napi_poll,

#undef NO_DEV

#endif /* _TRACE_NAPI_H_ */
#endif /* _TRACE_NAPI_H */

/* This part must be outside protection */
#include <trace/define_trace.h>
4 changes: 2 additions & 2 deletions include/trace/events/qdisc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define TRACE_SYSTEM qdisc

#if !defined(_TRACE_QDISC_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_QDISC_H_
#define _TRACE_QDISC_H

#include <linux/skbuff.h>
#include <linux/netdevice.h>
Expand Down Expand Up @@ -44,7 +44,7 @@ TRACE_EVENT(qdisc_dequeue,
__entry->txq_state, __entry->packets, __entry->skbaddr )
);

#endif /* _TRACE_QDISC_H_ */
#endif /* _TRACE_QDISC_H */

/* This part must be outside protection */
#include <trace/define_trace.h>
4 changes: 2 additions & 2 deletions include/trace/events/tegra_apb_dma.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#if !defined(_TRACE_TEGRA_APB_DMA_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_TEGRA_APM_DMA_H
#define _TRACE_TEGRA_APB_DMA_H

#include <linux/tracepoint.h>
#include <linux/dmaengine.h>
Expand Down Expand Up @@ -55,7 +55,7 @@ TRACE_EVENT(tegra_dma_isr,
TP_printk("%s: irq %d\n", __get_str(chan), __entry->irq)
);

#endif /* _TRACE_TEGRADMA_H */
#endif /* _TRACE_TEGRA_APB_DMA_H */

/* This part must be outside protection */
#include <trace/define_trace.h>
17 changes: 7 additions & 10 deletions kernel/trace/trace_functions_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
if (trace_recursion_test(TRACE_GRAPH_NOTRACE_BIT))
return 0;

/*
* Do not trace a function if it's filtered by set_graph_notrace.
* Make the index of ret stack negative to indicate that it should
* ignore further functions. But it needs its own ret stack entry
* to recover the original index in order to continue tracing after
* returning from the function.
*/
if (ftrace_graph_notrace_addr(trace->func)) {
trace_recursion_set(TRACE_GRAPH_NOTRACE_BIT);
/*
Expand All @@ -155,16 +162,6 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
if (ftrace_graph_ignore_irqs())
return 0;

/*
* Do not trace a function if it's filtered by set_graph_notrace.
* Make the index of ret stack negative to indicate that it should
* ignore further functions. But it needs its own ret stack entry
* to recover the original index in order to continue tracing after
* returning from the function.
*/
if (ftrace_graph_notrace_addr(trace->func))
return 1;

/*
* Stop here if tracing_threshold is set. We only write function return
* events to the ring buffer.
Expand Down

0 comments on commit d2eee9f

Please sign in to comment.