From 1d8ee641416f97d49f04841c9b2fbacdff32d8f8 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 5 May 2014 10:32:44 -0400 Subject: [PATCH] Fix: incorrect rwbs field type in block_bio_queue Within lttng-modules instrumentation starting from kernel 3.9.0, the block_bio_queue instrumentation has incorrect rwbs field type, and does not print "comm" as an array of text. The result is that we are writing values to what we believe to be an "unsigned int", which is actually described as an array of RWBS_LEN byte (8 bytes). This discrepancy between type description and the actual tp_assign() incrementing the write offset leads to what appears as corruption of the following "comm" field in the trace viewer output: the viewer will skip the first bytes of the "comm" field, erroneously thinking they belong the the previous "rwbs" field. Fixes #794 Signed-off-by: Mathieu Desnoyers --- instrumentation/events/lttng-module/block.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instrumentation/events/lttng-module/block.h b/instrumentation/events/lttng-module/block.h index 5ea557d9..e3e6b4ce 100644 --- a/instrumentation/events/lttng-module/block.h +++ b/instrumentation/events/lttng-module/block.h @@ -558,8 +558,8 @@ TRACE_EVENT(block_bio_queue, __field( dev_t, dev ) __field( sector_t, sector ) __field( unsigned int, nr_sector ) - __array( char, rwbs, RWBS_LEN ) - __array( char, comm, TASK_COMM_LEN ) + __field( unsigned int, rwbs ) + __array_text( char, comm, TASK_COMM_LEN ) ), TP_fast_assign( -- 2.34.1