[PATCH] Re: [PATCH] trace: don't print an extra separator of flags

From: Andrew Vagin
Date: Mon Feb 20 2012 - 15:43:08 EST


> Could you send me that patch. Or a change to the kernel that shows the
> problemi.

Without my patch:
event-sample-1731 [000] ...1 546886.253576: foo_bar: foo hello 3 |A B
event-sample-1731 [000] ...1 546887.253677: foo_bar: foo hello 4 |A B

With my patch:
event-sample-1731 [000] ...1 546886.253576: foo_bar: foo hello 3 A B
event-sample-1731 [000] ...1 546887.253677: foo_bar: foo hello 4 A B


---
samples/trace_events/trace-events-sample.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h
index 6af3732..812be4b 100644
--- a/samples/trace_events/trace-events-sample.h
+++ b/samples/trace_events/trace-events-sample.h
@@ -90,7 +90,7 @@ TRACE_EVENT(foo_bar,
__entry->bar = bar;
),

- TP_printk("foo %s %d", __entry->foo, __entry->bar)
+ TP_printk("foo %s %d %s %s", __entry->foo, __entry->bar, __print_flags(1, "|", {1, "A"}), __print_flags(2, "&", {2, "B"}))
);
#endif

--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/