Re: [RFC PATCH v3 1/2] tracing: Add new trace type for bpf data output

From: Alexei Starovoitov
Date: Tue Jul 07 2015 - 21:35:49 EST


On 7/7/15 4:43 AM, He Kuang wrote:
+ F_STRUCT(
+ __field(long, size)

as Peter said please use u32 to avoid 32 vs 64-bit issues.

+ __array(u64, raw_data, TRACE_BPF_MAX_ENTRY)
+ ),
+
+ F_printk("%ld: (%016llx, ...)", __entry->size, __entry->raw_data[0]),

can we conditionally print raw_data[0], raw_data[1], ..[3] when
values are non-zero? '...' as part of print is kinda useless.
Also I would drop '()' and ',' they don't add much value.
Remember we won't be able to change this format once it goes in.


--
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/