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 15:54:16 +0000 (10:54 -0500)
commit23634515e7271c8c8594ad87a6685232d4eff297
treec626ca4d75e2a8845b63d130d6c1e960dadf6f94
parent5322beb19bb07e9b2f1ddbc5c81078617d74dd67
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.025384 seconds and 4 git commands to generate.