Merge tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt: "This contains a few fixes and a clean up. - a bad merge caused an "endif" to go in the wrong place in scripts/Makefile.build - softirq tracing fix for tracing that corrupts lockdep and causes a false splat - histogram documentation typo fixes - fix a bad memory reference when passing in no filter to the filter code - simplify code by using the swap macro instead of open coding the swap" * tag 'trace-v4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Fix SKIP_STACK_VALIDATION=1 build due to bad merge with -mrecord-mcount tracing: Fix some errors in histogram documentation tracing: Use swap macro in update_max_tr softirq: Reorder trace_softirqs_on to prevent lockdep splat tracing: Check for no filter when processing event filters
This commit is contained in:
@@ -139,9 +139,13 @@ static void __local_bh_enable(unsigned int cnt)
|
||||
{
|
||||
lockdep_assert_irqs_disabled();
|
||||
|
||||
if (preempt_count() == cnt)
|
||||
trace_preempt_on(CALLER_ADDR0, get_lock_parent_ip());
|
||||
|
||||
if (softirq_count() == (cnt & SOFTIRQ_MASK))
|
||||
trace_softirqs_on(_RET_IP_);
|
||||
preempt_count_sub(cnt);
|
||||
|
||||
__preempt_count_sub(cnt);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -1360,8 +1360,6 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
|
||||
void
|
||||
update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
|
||||
{
|
||||
struct ring_buffer *buf;
|
||||
|
||||
if (tr->stop_count)
|
||||
return;
|
||||
|
||||
@@ -1375,9 +1373,7 @@ update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
|
||||
|
||||
arch_spin_lock(&tr->max_lock);
|
||||
|
||||
buf = tr->trace_buffer.buffer;
|
||||
tr->trace_buffer.buffer = tr->max_buffer.buffer;
|
||||
tr->max_buffer.buffer = buf;
|
||||
swap(tr->trace_buffer.buffer, tr->max_buffer.buffer);
|
||||
|
||||
__update_max_tr(tr, tsk, cpu);
|
||||
arch_spin_unlock(&tr->max_lock);
|
||||
|
@@ -78,7 +78,8 @@ static const char * ops[] = { OPS };
|
||||
C(TOO_MANY_PREDS, "Too many terms in predicate expression"), \
|
||||
C(INVALID_FILTER, "Meaningless filter expression"), \
|
||||
C(IP_FIELD_ONLY, "Only 'ip' field is supported for function trace"), \
|
||||
C(INVALID_VALUE, "Invalid value (did you forget quotes)?"),
|
||||
C(INVALID_VALUE, "Invalid value (did you forget quotes)?"), \
|
||||
C(NO_FILTER, "No filter found"),
|
||||
|
||||
#undef C
|
||||
#define C(a, b) FILT_ERR_##a
|
||||
@@ -550,6 +551,13 @@ predicate_parse(const char *str, int nr_parens, int nr_preds,
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (!N) {
|
||||
/* No program? */
|
||||
ret = -EINVAL;
|
||||
parse_error(pe, FILT_ERR_NO_FILTER, ptr - str);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
prog[N].pred = NULL; /* #13 */
|
||||
prog[N].target = 1; /* TRUE */
|
||||
prog[N+1].pred = NULL;
|
||||
|
Reference in New Issue
Block a user