diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-02-03 17:20:41 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-04 14:48:30 -0500 |
commit | d9793bd8018f835c64b10f44e278c86cecb8e932 (patch) | |
tree | da5ad9bc8f3fc7b4eb4ecd398f7c52a6f112d544 | |
parent | ce70a0b472e06feae3a580ecb3fbef1e1e020a9b (diff) |
trace: judicious error checking of trace_seq results
Impact: bugfix and cleanup
Some callsites were returning either TRACE_ITER_PARTIAL_LINE if the
trace_seq routines (trace_seq_printf, etc) returned 0 meaning its buffer
was full, or zero otherwise.
But...
/* Return values for print_line callback */
enum print_line_t {
TRACE_TYPE_PARTIAL_LINE = 0, /* Retry after flushing the seq */
TRACE_TYPE_HANDLED = 1,
TRACE_TYPE_UNHANDLED = 2 /* Relay to other output functions */
};
In other cases the return value was not being relayed at all.
Most of the time it didn't hurt because the page wasn't get filled, but
for correctness sake, handle the return values everywhere.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | block/blktrace.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace.c | 75 | ||||
-rw-r--r-- | kernel/trace/trace_branch.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_output.c | 123 |
4 files changed, 87 insertions, 115 deletions
diff --git a/block/blktrace.c b/block/blktrace.c index 8f5c37b0f80f..12df27693972 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -1165,7 +1165,7 @@ static int blk_trace_event_print(struct trace_iterator *iter, int flags) | |||
1165 | const u16 what = t->action & ((1 << BLK_TC_SHIFT) - 1); | 1165 | const u16 what = t->action & ((1 << BLK_TC_SHIFT) - 1); |
1166 | int ret; | 1166 | int ret; |
1167 | 1167 | ||
1168 | if (trace_print_context(iter)) | 1168 | if (!trace_print_context(iter)) |
1169 | return TRACE_TYPE_PARTIAL_LINE; | 1169 | return TRACE_TYPE_PARTIAL_LINE; |
1170 | 1170 | ||
1171 | if (unlikely(what == 0 || what > ARRAY_SIZE(what2act))) | 1171 | if (unlikely(what == 0 || what > ARRAY_SIZE(what2act))) |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index bbdfaa2cbdb9..5822ff4e5a3e 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1402,27 +1402,25 @@ static enum print_line_t print_lat_fmt(struct trace_iterator *iter) | |||
1402 | unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); | 1402 | unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); |
1403 | struct trace_event *event; | 1403 | struct trace_event *event; |
1404 | struct trace_entry *entry = iter->ent; | 1404 | struct trace_entry *entry = iter->ent; |
1405 | int ret; | ||
1406 | 1405 | ||
1407 | test_cpu_buff_start(iter); | 1406 | test_cpu_buff_start(iter); |
1408 | 1407 | ||
1409 | event = ftrace_find_event(entry->type); | 1408 | event = ftrace_find_event(entry->type); |
1410 | 1409 | ||
1411 | if (trace_flags & TRACE_ITER_CONTEXT_INFO) { | 1410 | if (trace_flags & TRACE_ITER_CONTEXT_INFO) { |
1412 | ret = trace_print_lat_context(iter); | 1411 | if (!trace_print_lat_context(iter)) |
1413 | if (ret) | 1412 | goto partial; |
1414 | return ret; | ||
1415 | } | 1413 | } |
1416 | 1414 | ||
1417 | if (event && event->latency_trace) { | 1415 | if (event && event->latency_trace) |
1418 | ret = event->latency_trace(iter, sym_flags); | 1416 | return event->latency_trace(iter, sym_flags); |
1419 | if (ret) | 1417 | |
1420 | return ret; | 1418 | if (!trace_seq_printf(s, "Unknown type %d\n", entry->type)) |
1421 | return TRACE_TYPE_HANDLED; | 1419 | goto partial; |
1422 | } | ||
1423 | 1420 | ||
1424 | trace_seq_printf(s, "Unknown type %d\n", entry->type); | ||
1425 | return TRACE_TYPE_HANDLED; | 1421 | return TRACE_TYPE_HANDLED; |
1422 | partial: | ||
1423 | return TRACE_TYPE_PARTIAL_LINE; | ||
1426 | } | 1424 | } |
1427 | 1425 | ||
1428 | static enum print_line_t print_trace_fmt(struct trace_iterator *iter) | 1426 | static enum print_line_t print_trace_fmt(struct trace_iterator *iter) |
@@ -1431,7 +1429,6 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter) | |||
1431 | unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); | 1429 | unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); |
1432 | struct trace_entry *entry; | 1430 | struct trace_entry *entry; |
1433 | struct trace_event *event; | 1431 | struct trace_event *event; |
1434 | int ret; | ||
1435 | 1432 | ||
1436 | entry = iter->ent; | 1433 | entry = iter->ent; |
1437 | 1434 | ||
@@ -1440,22 +1437,19 @@ static enum print_line_t print_trace_fmt(struct trace_iterator *iter) | |||
1440 | event = ftrace_find_event(entry->type); | 1437 | event = ftrace_find_event(entry->type); |
1441 | 1438 | ||
1442 | if (trace_flags & TRACE_ITER_CONTEXT_INFO) { | 1439 | if (trace_flags & TRACE_ITER_CONTEXT_INFO) { |
1443 | ret = trace_print_context(iter); | 1440 | if (!trace_print_context(iter)) |
1444 | if (ret) | 1441 | goto partial; |
1445 | return ret; | ||
1446 | } | 1442 | } |
1447 | 1443 | ||
1448 | if (event && event->trace) { | 1444 | if (event && event->trace) |
1449 | ret = event->trace(iter, sym_flags); | 1445 | return event->trace(iter, sym_flags); |
1450 | if (ret) | 1446 | |
1451 | return ret; | 1447 | if (!trace_seq_printf(s, "Unknown type %d\n", entry->type)) |
1452 | return TRACE_TYPE_HANDLED; | 1448 | goto partial; |
1453 | } | ||
1454 | ret = trace_seq_printf(s, "Unknown type %d\n", entry->type); | ||
1455 | if (!ret) | ||
1456 | return TRACE_TYPE_PARTIAL_LINE; | ||
1457 | 1449 | ||
1458 | return TRACE_TYPE_HANDLED; | 1450 | return TRACE_TYPE_HANDLED; |
1451 | partial: | ||
1452 | return TRACE_TYPE_PARTIAL_LINE; | ||
1459 | } | 1453 | } |
1460 | 1454 | ||
1461 | static enum print_line_t print_raw_fmt(struct trace_iterator *iter) | 1455 | static enum print_line_t print_raw_fmt(struct trace_iterator *iter) |
@@ -1463,29 +1457,25 @@ static enum print_line_t print_raw_fmt(struct trace_iterator *iter) | |||
1463 | struct trace_seq *s = &iter->seq; | 1457 | struct trace_seq *s = &iter->seq; |
1464 | struct trace_entry *entry; | 1458 | struct trace_entry *entry; |
1465 | struct trace_event *event; | 1459 | struct trace_event *event; |
1466 | int ret; | ||
1467 | 1460 | ||
1468 | entry = iter->ent; | 1461 | entry = iter->ent; |
1469 | 1462 | ||
1470 | if (trace_flags & TRACE_ITER_CONTEXT_INFO) { | 1463 | if (trace_flags & TRACE_ITER_CONTEXT_INFO) { |
1471 | ret = trace_seq_printf(s, "%d %d %llu ", | 1464 | if (!trace_seq_printf(s, "%d %d %llu ", |
1472 | entry->pid, iter->cpu, iter->ts); | 1465 | entry->pid, iter->cpu, iter->ts)) |
1473 | if (!ret) | 1466 | goto partial; |
1474 | return TRACE_TYPE_PARTIAL_LINE; | ||
1475 | } | 1467 | } |
1476 | 1468 | ||
1477 | event = ftrace_find_event(entry->type); | 1469 | event = ftrace_find_event(entry->type); |
1478 | if (event && event->raw) { | 1470 | if (event && event->raw) |
1479 | ret = event->raw(iter, 0); | 1471 | return event->raw(iter, 0); |
1480 | if (ret) | 1472 | |
1481 | return ret; | 1473 | if (!trace_seq_printf(s, "%d ?\n", entry->type)) |
1482 | return TRACE_TYPE_HANDLED; | 1474 | goto partial; |
1483 | } | ||
1484 | ret = trace_seq_printf(s, "%d ?\n", entry->type); | ||
1485 | if (!ret) | ||
1486 | return TRACE_TYPE_PARTIAL_LINE; | ||
1487 | 1475 | ||
1488 | return TRACE_TYPE_HANDLED; | 1476 | return TRACE_TYPE_HANDLED; |
1477 | partial: | ||
1478 | return TRACE_TYPE_PARTIAL_LINE; | ||
1489 | } | 1479 | } |
1490 | 1480 | ||
1491 | static enum print_line_t print_hex_fmt(struct trace_iterator *iter) | 1481 | static enum print_line_t print_hex_fmt(struct trace_iterator *iter) |
@@ -1504,8 +1494,11 @@ static enum print_line_t print_hex_fmt(struct trace_iterator *iter) | |||
1504 | } | 1494 | } |
1505 | 1495 | ||
1506 | event = ftrace_find_event(entry->type); | 1496 | event = ftrace_find_event(entry->type); |
1507 | if (event && event->hex) | 1497 | if (event && event->hex) { |
1508 | event->hex(iter, 0); | 1498 | int ret = event->hex(iter, 0); |
1499 | if (ret != TRACE_TYPE_HANDLED) | ||
1500 | return ret; | ||
1501 | } | ||
1509 | 1502 | ||
1510 | SEQ_PUT_FIELD_RET(s, newline); | 1503 | SEQ_PUT_FIELD_RET(s, newline); |
1511 | 1504 | ||
@@ -1544,7 +1537,7 @@ static enum print_line_t print_bin_fmt(struct trace_iterator *iter) | |||
1544 | 1537 | ||
1545 | event = ftrace_find_event(entry->type); | 1538 | event = ftrace_find_event(entry->type); |
1546 | if (event && event->binary) | 1539 | if (event && event->binary) |
1547 | event->binary(iter, 0); | 1540 | return event->binary(iter, 0); |
1548 | 1541 | ||
1549 | return TRACE_TYPE_HANDLED; | 1542 | return TRACE_TYPE_HANDLED; |
1550 | } | 1543 | } |
diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c index ea62f101e615..f6b35e162dfa 100644 --- a/kernel/trace/trace_branch.c +++ b/kernel/trace/trace_branch.c | |||
@@ -173,7 +173,7 @@ static int trace_branch_print(struct trace_iterator *iter, int flags) | |||
173 | field->line)) | 173 | field->line)) |
174 | return TRACE_TYPE_PARTIAL_LINE; | 174 | return TRACE_TYPE_PARTIAL_LINE; |
175 | 175 | ||
176 | return 0; | 176 | return TRACE_TYPE_HANDLED; |
177 | } | 177 | } |
178 | 178 | ||
179 | 179 | ||
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index c24503b281a0..5b3c914053f2 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -286,55 +286,41 @@ seq_print_ip_sym(struct trace_seq *s, unsigned long ip, unsigned long sym_flags) | |||
286 | return ret; | 286 | return ret; |
287 | } | 287 | } |
288 | 288 | ||
289 | static void | 289 | static int |
290 | lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu) | 290 | lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu) |
291 | { | 291 | { |
292 | int hardirq, softirq; | 292 | int hardirq, softirq; |
293 | char *comm; | 293 | char *comm; |
294 | 294 | ||
295 | comm = trace_find_cmdline(entry->pid); | 295 | comm = trace_find_cmdline(entry->pid); |
296 | |||
297 | trace_seq_printf(s, "%8.8s-%-5d ", comm, entry->pid); | ||
298 | trace_seq_printf(s, "%3d", cpu); | ||
299 | trace_seq_printf(s, "%c%c", | ||
300 | (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : | ||
301 | (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? 'X' : '.', | ||
302 | ((entry->flags & TRACE_FLAG_NEED_RESCHED) ? 'N' : '.')); | ||
303 | |||
304 | hardirq = entry->flags & TRACE_FLAG_HARDIRQ; | 296 | hardirq = entry->flags & TRACE_FLAG_HARDIRQ; |
305 | softirq = entry->flags & TRACE_FLAG_SOFTIRQ; | 297 | softirq = entry->flags & TRACE_FLAG_SOFTIRQ; |
306 | if (hardirq && softirq) { | 298 | |
307 | trace_seq_putc(s, 'H'); | 299 | if (!trace_seq_printf(s, "%8.8s-%-5d %3d%c%c%c", |
308 | } else { | 300 | comm, entry->pid, cpu, |
309 | if (hardirq) { | 301 | (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : |
310 | trace_seq_putc(s, 'h'); | 302 | (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? |
311 | } else { | 303 | 'X' : '.', |
312 | if (softirq) | 304 | (entry->flags & TRACE_FLAG_NEED_RESCHED) ? |
313 | trace_seq_putc(s, 's'); | 305 | 'N' : '.', |
314 | else | 306 | (hardirq && softirq) ? 'H' : |
315 | trace_seq_putc(s, '.'); | 307 | hardirq ? 'h' : softirq ? 's' : '.')) |
316 | } | 308 | return 0; |
317 | } | ||
318 | 309 | ||
319 | if (entry->preempt_count) | 310 | if (entry->preempt_count) |
320 | trace_seq_printf(s, "%x", entry->preempt_count); | 311 | return trace_seq_printf(s, "%x", entry->preempt_count); |
321 | else | 312 | return trace_seq_puts(s, "."); |
322 | trace_seq_puts(s, "."); | ||
323 | } | 313 | } |
324 | 314 | ||
325 | static unsigned long preempt_mark_thresh = 100; | 315 | static unsigned long preempt_mark_thresh = 100; |
326 | 316 | ||
327 | static void | 317 | static int |
328 | lat_print_timestamp(struct trace_seq *s, u64 abs_usecs, | 318 | lat_print_timestamp(struct trace_seq *s, u64 abs_usecs, |
329 | unsigned long rel_usecs) | 319 | unsigned long rel_usecs) |
330 | { | 320 | { |
331 | trace_seq_printf(s, " %4lldus", abs_usecs); | 321 | return trace_seq_printf(s, " %4lldus%c: ", abs_usecs, |
332 | if (rel_usecs > preempt_mark_thresh) | 322 | rel_usecs > preempt_mark_thresh ? '!' : |
333 | trace_seq_puts(s, "!: "); | 323 | rel_usecs > 1 ? '+' : ' '); |
334 | else if (rel_usecs > 1) | ||
335 | trace_seq_puts(s, "+: "); | ||
336 | else | ||
337 | trace_seq_puts(s, " : "); | ||
338 | } | 324 | } |
339 | 325 | ||
340 | int trace_print_context(struct trace_iterator *iter) | 326 | int trace_print_context(struct trace_iterator *iter) |
@@ -346,22 +332,14 @@ int trace_print_context(struct trace_iterator *iter) | |||
346 | unsigned long usec_rem = do_div(t, USEC_PER_SEC); | 332 | unsigned long usec_rem = do_div(t, USEC_PER_SEC); |
347 | unsigned long secs = (unsigned long)t; | 333 | unsigned long secs = (unsigned long)t; |
348 | 334 | ||
349 | if (!trace_seq_printf(s, "%16s-%-5d ", comm, entry->pid)) | 335 | return trace_seq_printf(s, "%16s-%-5d [%03d] %5lu.%06lu: ", |
350 | goto partial; | 336 | comm, entry->pid, entry->cpu, secs, usec_rem); |
351 | if (!trace_seq_printf(s, "[%03d] ", entry->cpu)) | ||
352 | goto partial; | ||
353 | if (!trace_seq_printf(s, "%5lu.%06lu: ", secs, usec_rem)) | ||
354 | goto partial; | ||
355 | |||
356 | return 0; | ||
357 | |||
358 | partial: | ||
359 | return TRACE_TYPE_PARTIAL_LINE; | ||
360 | } | 337 | } |
361 | 338 | ||
362 | int trace_print_lat_context(struct trace_iterator *iter) | 339 | int trace_print_lat_context(struct trace_iterator *iter) |
363 | { | 340 | { |
364 | u64 next_ts; | 341 | u64 next_ts; |
342 | int ret; | ||
365 | struct trace_seq *s = &iter->seq; | 343 | struct trace_seq *s = &iter->seq; |
366 | struct trace_entry *entry = iter->ent, | 344 | struct trace_entry *entry = iter->ent, |
367 | *next_entry = trace_find_next_entry(iter, NULL, | 345 | *next_entry = trace_find_next_entry(iter, NULL, |
@@ -376,21 +354,22 @@ int trace_print_lat_context(struct trace_iterator *iter) | |||
376 | 354 | ||
377 | if (verbose) { | 355 | if (verbose) { |
378 | char *comm = trace_find_cmdline(entry->pid); | 356 | char *comm = trace_find_cmdline(entry->pid); |
379 | trace_seq_printf(s, "%16s %5d %3d %d %08x %08lx [%08lx]" | 357 | ret = trace_seq_printf(s, "%16s %5d %3d %d %08x %08lx [%08lx]" |
380 | " %ld.%03ldms (+%ld.%03ldms): ", | 358 | " %ld.%03ldms (+%ld.%03ldms): ", comm, |
381 | comm, | 359 | entry->pid, entry->cpu, entry->flags, |
382 | entry->pid, entry->cpu, entry->flags, | 360 | entry->preempt_count, iter->idx, |
383 | entry->preempt_count, iter->idx, | 361 | ns2usecs(iter->ts), |
384 | ns2usecs(iter->ts), | 362 | abs_usecs / USEC_PER_MSEC, |
385 | abs_usecs/1000, | 363 | abs_usecs % USEC_PER_MSEC, |
386 | abs_usecs % 1000, rel_usecs/1000, | 364 | rel_usecs / USEC_PER_MSEC, |
387 | rel_usecs % 1000); | 365 | rel_usecs % USEC_PER_MSEC); |
388 | } else { | 366 | } else { |
389 | lat_print_generic(s, entry, entry->cpu); | 367 | ret = lat_print_generic(s, entry, entry->cpu); |
390 | lat_print_timestamp(s, abs_usecs, rel_usecs); | 368 | if (ret) |
369 | ret = lat_print_timestamp(s, abs_usecs, rel_usecs); | ||
391 | } | 370 | } |
392 | 371 | ||
393 | return 0; | 372 | return ret; |
394 | } | 373 | } |
395 | 374 | ||
396 | static const char state_to_char[] = TASK_STATE_TO_CHAR_STR; | 375 | static const char state_to_char[] = TASK_STATE_TO_CHAR_STR; |
@@ -486,7 +465,7 @@ int unregister_ftrace_event(struct trace_event *event) | |||
486 | 465 | ||
487 | int trace_nop_print(struct trace_iterator *iter, int flags) | 466 | int trace_nop_print(struct trace_iterator *iter, int flags) |
488 | { | 467 | { |
489 | return 0; | 468 | return TRACE_TYPE_HANDLED; |
490 | } | 469 | } |
491 | 470 | ||
492 | /* TRACE_FN */ | 471 | /* TRACE_FN */ |
@@ -506,7 +485,7 @@ static int trace_fn_latency(struct trace_iterator *iter, int flags) | |||
506 | if (!trace_seq_puts(s, ")\n")) | 485 | if (!trace_seq_puts(s, ")\n")) |
507 | goto partial; | 486 | goto partial; |
508 | 487 | ||
509 | return 0; | 488 | return TRACE_TYPE_HANDLED; |
510 | 489 | ||
511 | partial: | 490 | partial: |
512 | return TRACE_TYPE_PARTIAL_LINE; | 491 | return TRACE_TYPE_PARTIAL_LINE; |
@@ -533,7 +512,7 @@ static int trace_fn_trace(struct trace_iterator *iter, int flags) | |||
533 | if (!trace_seq_printf(s, "\n")) | 512 | if (!trace_seq_printf(s, "\n")) |
534 | goto partial; | 513 | goto partial; |
535 | 514 | ||
536 | return 0; | 515 | return TRACE_TYPE_HANDLED; |
537 | 516 | ||
538 | partial: | 517 | partial: |
539 | return TRACE_TYPE_PARTIAL_LINE; | 518 | return TRACE_TYPE_PARTIAL_LINE; |
@@ -550,7 +529,7 @@ static int trace_fn_raw(struct trace_iterator *iter, int flags) | |||
550 | field->parent_ip)) | 529 | field->parent_ip)) |
551 | return TRACE_TYPE_PARTIAL_LINE; | 530 | return TRACE_TYPE_PARTIAL_LINE; |
552 | 531 | ||
553 | return 0; | 532 | return TRACE_TYPE_HANDLED; |
554 | } | 533 | } |
555 | 534 | ||
556 | static int trace_fn_hex(struct trace_iterator *iter, int flags) | 535 | static int trace_fn_hex(struct trace_iterator *iter, int flags) |
@@ -563,7 +542,7 @@ static int trace_fn_hex(struct trace_iterator *iter, int flags) | |||
563 | SEQ_PUT_HEX_FIELD_RET(s, field->ip); | 542 | SEQ_PUT_HEX_FIELD_RET(s, field->ip); |
564 | SEQ_PUT_HEX_FIELD_RET(s, field->parent_ip); | 543 | SEQ_PUT_HEX_FIELD_RET(s, field->parent_ip); |
565 | 544 | ||
566 | return 0; | 545 | return TRACE_TYPE_HANDLED; |
567 | } | 546 | } |
568 | 547 | ||
569 | static int trace_fn_bin(struct trace_iterator *iter, int flags) | 548 | static int trace_fn_bin(struct trace_iterator *iter, int flags) |
@@ -576,7 +555,7 @@ static int trace_fn_bin(struct trace_iterator *iter, int flags) | |||
576 | SEQ_PUT_FIELD_RET(s, field->ip); | 555 | SEQ_PUT_FIELD_RET(s, field->ip); |
577 | SEQ_PUT_FIELD_RET(s, field->parent_ip); | 556 | SEQ_PUT_FIELD_RET(s, field->parent_ip); |
578 | 557 | ||
579 | return 0; | 558 | return TRACE_TYPE_HANDLED; |
580 | } | 559 | } |
581 | 560 | ||
582 | static struct trace_event trace_fn_event = { | 561 | static struct trace_event trace_fn_event = { |
@@ -611,7 +590,7 @@ static int trace_ctxwake_print(struct trace_iterator *iter, char *delim) | |||
611 | T, comm)) | 590 | T, comm)) |
612 | return TRACE_TYPE_PARTIAL_LINE; | 591 | return TRACE_TYPE_PARTIAL_LINE; |
613 | 592 | ||
614 | return 0; | 593 | return TRACE_TYPE_HANDLED; |
615 | } | 594 | } |
616 | 595 | ||
617 | static int trace_ctx_print(struct trace_iterator *iter, int flags) | 596 | static int trace_ctx_print(struct trace_iterator *iter, int flags) |
@@ -644,7 +623,7 @@ static int trace_ctxwake_raw(struct trace_iterator *iter, char S) | |||
644 | T)) | 623 | T)) |
645 | return TRACE_TYPE_PARTIAL_LINE; | 624 | return TRACE_TYPE_PARTIAL_LINE; |
646 | 625 | ||
647 | return 0; | 626 | return TRACE_TYPE_HANDLED; |
648 | } | 627 | } |
649 | 628 | ||
650 | static int trace_ctx_raw(struct trace_iterator *iter, int flags) | 629 | static int trace_ctx_raw(struct trace_iterator *iter, int flags) |
@@ -678,7 +657,7 @@ static int trace_ctxwake_hex(struct trace_iterator *iter, char S) | |||
678 | SEQ_PUT_HEX_FIELD_RET(s, field->next_prio); | 657 | SEQ_PUT_HEX_FIELD_RET(s, field->next_prio); |
679 | SEQ_PUT_HEX_FIELD_RET(s, T); | 658 | SEQ_PUT_HEX_FIELD_RET(s, T); |
680 | 659 | ||
681 | return 0; | 660 | return TRACE_TYPE_HANDLED; |
682 | } | 661 | } |
683 | 662 | ||
684 | static int trace_ctx_hex(struct trace_iterator *iter, int flags) | 663 | static int trace_ctx_hex(struct trace_iterator *iter, int flags) |
@@ -705,7 +684,7 @@ static int trace_ctxwake_bin(struct trace_iterator *iter, int flags) | |||
705 | SEQ_PUT_FIELD_RET(s, field->next_prio); | 684 | SEQ_PUT_FIELD_RET(s, field->next_prio); |
706 | SEQ_PUT_FIELD_RET(s, field->next_state); | 685 | SEQ_PUT_FIELD_RET(s, field->next_state); |
707 | 686 | ||
708 | return 0; | 687 | return TRACE_TYPE_HANDLED; |
709 | } | 688 | } |
710 | 689 | ||
711 | static struct trace_event trace_ctx_event = { | 690 | static struct trace_event trace_ctx_event = { |
@@ -739,7 +718,7 @@ static int trace_special_print(struct trace_iterator *iter, int flags) | |||
739 | field->arg3)) | 718 | field->arg3)) |
740 | return TRACE_TYPE_PARTIAL_LINE; | 719 | return TRACE_TYPE_PARTIAL_LINE; |
741 | 720 | ||
742 | return 0; | 721 | return TRACE_TYPE_HANDLED; |
743 | } | 722 | } |
744 | 723 | ||
745 | static int trace_special_hex(struct trace_iterator *iter, int flags) | 724 | static int trace_special_hex(struct trace_iterator *iter, int flags) |
@@ -753,7 +732,7 @@ static int trace_special_hex(struct trace_iterator *iter, int flags) | |||
753 | SEQ_PUT_HEX_FIELD_RET(s, field->arg2); | 732 | SEQ_PUT_HEX_FIELD_RET(s, field->arg2); |
754 | SEQ_PUT_HEX_FIELD_RET(s, field->arg3); | 733 | SEQ_PUT_HEX_FIELD_RET(s, field->arg3); |
755 | 734 | ||
756 | return 0; | 735 | return TRACE_TYPE_HANDLED; |
757 | } | 736 | } |
758 | 737 | ||
759 | static int trace_special_bin(struct trace_iterator *iter, int flags) | 738 | static int trace_special_bin(struct trace_iterator *iter, int flags) |
@@ -767,7 +746,7 @@ static int trace_special_bin(struct trace_iterator *iter, int flags) | |||
767 | SEQ_PUT_FIELD_RET(s, field->arg2); | 746 | SEQ_PUT_FIELD_RET(s, field->arg2); |
768 | SEQ_PUT_FIELD_RET(s, field->arg3); | 747 | SEQ_PUT_FIELD_RET(s, field->arg3); |
769 | 748 | ||
770 | return 0; | 749 | return TRACE_TYPE_HANDLED; |
771 | } | 750 | } |
772 | 751 | ||
773 | static struct trace_event trace_special_event = { | 752 | static struct trace_event trace_special_event = { |
@@ -801,7 +780,7 @@ static int trace_stack_print(struct trace_iterator *iter, int flags) | |||
801 | goto partial; | 780 | goto partial; |
802 | } | 781 | } |
803 | 782 | ||
804 | return 0; | 783 | return TRACE_TYPE_HANDLED; |
805 | 784 | ||
806 | partial: | 785 | partial: |
807 | return TRACE_TYPE_PARTIAL_LINE; | 786 | return TRACE_TYPE_PARTIAL_LINE; |
@@ -830,7 +809,7 @@ static int trace_user_stack_print(struct trace_iterator *iter, int flags) | |||
830 | if (!trace_seq_putc(s, '\n')) | 809 | if (!trace_seq_putc(s, '\n')) |
831 | goto partial; | 810 | goto partial; |
832 | 811 | ||
833 | return 0; | 812 | return TRACE_TYPE_HANDLED; |
834 | 813 | ||
835 | partial: | 814 | partial: |
836 | return TRACE_TYPE_PARTIAL_LINE; | 815 | return TRACE_TYPE_PARTIAL_LINE; |
@@ -859,7 +838,7 @@ static int trace_print_print(struct trace_iterator *iter, int flags) | |||
859 | if (!trace_seq_printf(s, ": %s", field->buf)) | 838 | if (!trace_seq_printf(s, ": %s", field->buf)) |
860 | goto partial; | 839 | goto partial; |
861 | 840 | ||
862 | return 0; | 841 | return TRACE_TYPE_HANDLED; |
863 | 842 | ||
864 | partial: | 843 | partial: |
865 | return TRACE_TYPE_PARTIAL_LINE; | 844 | return TRACE_TYPE_PARTIAL_LINE; |
@@ -874,7 +853,7 @@ static int trace_print_raw(struct trace_iterator *iter, int flags) | |||
874 | if (!trace_seq_printf(&iter->seq, "# %lx %s", field->ip, field->buf)) | 853 | if (!trace_seq_printf(&iter->seq, "# %lx %s", field->ip, field->buf)) |
875 | goto partial; | 854 | goto partial; |
876 | 855 | ||
877 | return 0; | 856 | return TRACE_TYPE_HANDLED; |
878 | 857 | ||
879 | partial: | 858 | partial: |
880 | return TRACE_TYPE_PARTIAL_LINE; | 859 | return TRACE_TYPE_PARTIAL_LINE; |