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
Showing the changes to kernel (3 of 5 files). Show all
Unified · Split
| @@ -139,9 +139,13 @@ static void __local_bh_enable(unsigned int cnt) · 138 unmodified lines | ||
| 139 | 139 | { |
| 140 | 140 | lockdep_assert_irqs_disabled(); |
| 141 | 141 | |
| 142 | + if (preempt_count() == cnt) | |
| 143 | + trace_preempt_on(CALLER_ADDR0, get_lock_parent_ip()); | |
| 144 | + | |
| 142 | 145 | if (softirq_count() == (cnt & SOFTIRQ_MASK)) |
| 143 | 146 | trace_softirqs_on(_RET_IP_); |
| 144 | − preempt_count_sub(cnt); | |
| 147 | + | |
| 148 | + __preempt_count_sub(cnt); | |
| 145 | 149 | } |
| 146 | 150 | |
| 147 | 151 | /* |
| @@ -1360,8 +1360,6 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) · 1359 unmodified lines | ||
| 1360 | 1360 | void |
| 1361 | 1361 | update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) |
| 1362 | 1362 | { |
| 1363 | − struct ring_buffer *buf; | |
| 1364 | − | |
| 1365 | 1363 | if (tr->stop_count) |
| 1366 | 1364 | return; |
| 1367 | 1365 | |
| @@ -1375,9 +1373,7 @@ update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) · 7 unmodified lines | ||
| 1375 | 1373 | |
| 1376 | 1374 | arch_spin_lock(&tr->max_lock); |
| 1377 | 1375 | |
| 1378 | − buf = tr->trace_buffer.buffer; | |
| 1379 | − tr->trace_buffer.buffer = tr->max_buffer.buffer; | |
| 1380 | − tr->max_buffer.buffer = buf; | |
| 1376 | + swap(tr->trace_buffer.buffer, tr->max_buffer.buffer); | |
| 1381 | 1377 | |
| 1382 | 1378 | __update_max_tr(tr, tsk, cpu); |
| 1383 | 1379 | arch_spin_unlock(&tr->max_lock); |
| @@ -78,7 +78,8 @@ static const char * ops[] = { OPS }; · 77 unmodified lines | ||
| 78 | 78 | C(TOO_MANY_PREDS, "Too many terms in predicate expression"), \ |
| 79 | 79 | C(INVALID_FILTER, "Meaningless filter expression"), \ |
| 80 | 80 | C(IP_FIELD_ONLY, "Only 'ip' field is supported for function trace"), \ |
| 81 | − C(INVALID_VALUE, "Invalid value (did you forget quotes)?"), | |
| 81 | + C(INVALID_VALUE, "Invalid value (did you forget quotes)?"), \ | |
| 82 | + C(NO_FILTER, "No filter found"), | |
| 82 | 83 | |
| 83 | 84 | #undef C |
| 84 | 85 | #define C(a, b) FILT_ERR_##a |
| @@ -550,6 +551,13 @@ predicate_parse(const char *str, int nr_parens, int nr_preds, · 465 unmodified lines | ||
| 550 | 551 | goto out_free; |
| 551 | 552 | } |
| 552 | 553 | |
| 554 | + if (!N) { | |
| 555 | + /* No program? */ | |
| 556 | + ret = -EINVAL; | |
| 557 | + parse_error(pe, FILT_ERR_NO_FILTER, ptr - str); | |
| 558 | + goto out_free; | |
| 559 | + } | |
| 560 | + | |
| 553 | 561 | prog[N].pred = NULL; /* #13 */ |
| 554 | 562 | prog[N].target = 1; /* TRUE */ |
| 555 | 563 | prog[N+1].pred = NULL; |