block: Make the rwbs field as a bit field enum
authorGeneviève Bastien <gbastien@versatic.net>
Tue, 11 Feb 2020 16:20:27 +0000 (11:20 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Feb 2020 16:00:09 +0000 (11:00 -0500)
commit0d36dee7e521d4e2b2a86d09a5a32132d32e2a0e
tree7675c9dcd1573f875562be863ebd2945d06de935
parentada81c8ba15d9b0ab694741d35fcb41937032831
block: Make the rwbs field as a bit field enum

The rwbs value of block request events is in fact a series of bit fields
set to 0 or 1. The enumeration values are all powers of 2, trace readers
could interpret this as a bit field enum and show the result as a
concatenation of the corresponding flags. For example, with a matching
patch for babeltrace2's pretty sink, the output for a rwbs value of 12
would be:

[13:15:49.024354958] (+0.000003868) wilbrod block_rq_complete: { cpu_id = 4 },
    { dev = 8388624, sector = 375490176, nr_sector = 360, error = 0,
      rwbs = ( "RWBS_FLAG_READ" | "RWBS_FLAG_RAHEAD" : container = 12 ) }

Consumers who have no notion of the bit field enum can still use the
integer value of the field as before.

Change-Id: I2e873f16e5a0507e52cfc85c70b471a9f4d5d5d1
Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/block.h
This page took 0.025795 seconds and 4 git commands to generate.