Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04243787 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull tracing fixes from Steven Rostedt:
 "Various fix-ups:

   - comment fixes

   - build fix

   - better memory alloction (don't use NR_CPUS)

   - configuration fix

   - build warning fix

   - enhanced callback parameter (to simplify users of trace hooks)

   - give up on stack tracing when RCU isn't watching (it's a lost
     cause)"

* tag 'trace-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Have stack trace not record if RCU is not watching
  tracing: Pass export pointer as argument to ->write()
  ring-buffer: Remove unused function __rb_data_page_index()
  tracing: make PREEMPTIRQ_EVENTS depend on TRACING
  tracing: Allocate mask_str buffer dynamically
  tracing: always define trace_{irq,preempt}_{enable_disable}
  tracing: Fix code comments in trace.c
parents c4f988ee b00d607b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -42,9 +42,11 @@ static struct stm_ftrace {
 * @len:	length of the data packet
 */
static void notrace
stm_ftrace_write(const void *buf, unsigned int len)
stm_ftrace_write(struct trace_export *export, const void *buf, unsigned int len)
{
	stm_source_write(&stm_ftrace.data, STM_FTRACE_CHAN, buf, len);
	struct stm_ftrace *stm = container_of(export, struct stm_ftrace, ftrace);

	stm_source_write(&stm->data, STM_FTRACE_CHAN, buf, len);
}

static int stm_ftrace_link(struct stm_source_data *data)
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
 */
struct trace_export {
	struct trace_export __rcu	*next;
	void (*write)(const void *, unsigned int);
	void (*write)(struct trace_export *, const void *, unsigned int);
};

int register_ftrace_export(struct trace_export *export);
+7 −4
Original line number Diff line number Diff line
@@ -56,15 +56,18 @@ DEFINE_EVENT(preemptirq_template, preempt_enable,

#include <trace/define_trace.h>

#else /* !CONFIG_PREEMPTIRQ_EVENTS */
#endif /* !CONFIG_PREEMPTIRQ_EVENTS */

#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || defined(CONFIG_PROVE_LOCKING)
#define trace_irq_enable(...)
#define trace_irq_disable(...)
#define trace_preempt_enable(...)
#define trace_preempt_disable(...)
#define trace_irq_enable_rcuidle(...)
#define trace_irq_disable_rcuidle(...)
#endif

#if !defined(CONFIG_PREEMPTIRQ_EVENTS) || !defined(CONFIG_DEBUG_PREEMPT)
#define trace_preempt_enable(...)
#define trace_preempt_disable(...)
#define trace_preempt_enable_rcuidle(...)
#define trace_preempt_disable_rcuidle(...)

#endif
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ config PREEMPTIRQ_EVENTS
	bool "Enable trace events for preempt and irq disable/enable"
	select TRACE_IRQFLAGS
	depends on DEBUG_PREEMPT || !PROVE_LOCKING
	depends on TRACING
	default n
	help
	  Enable tracing of disable and enable events for preemption and irqs.
+0 −6
Original line number Diff line number Diff line
@@ -1799,12 +1799,6 @@ void ring_buffer_change_overwrite(struct ring_buffer *buffer, int val)
}
EXPORT_SYMBOL_GPL(ring_buffer_change_overwrite);

static __always_inline void *
__rb_data_page_index(struct buffer_data_page *bpage, unsigned index)
{
	return bpage->data + index;
}

static __always_inline void *__rb_page_index(struct buffer_page *bpage, unsigned index)
{
	return bpage->page->data + index;
Loading