aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorDavid Sterba <[email protected]>2022-09-09 17:20:25 +0200
committerDavid Sterba <[email protected]>2022-12-05 18:00:40 +0100
commitd549ff7bdbe72f5e0e934895090fed2647e9813b (patch)
tree7f70c03d6a6731e292a3bff07eaaa329886fed7b /tools/perf/scripts/python/export-to-sqlite.py
parent5565b8e0adcdd8ee32d02d82d98cdf6d966793c7 (diff)
btrfs: add helper for bit enumeration
Define helper macro that can be used in enum {} to utilize the automatic increment to define all bits without directly defining the values or using additional linear bits. 1. capture the sequence value, N 2. use the value to define the given enum with N-th bit set 3. reset the sequence back to N Use for enums that do not require fixed values for symbolic names (like for on-disk structures): enum { ENUM_BIT(FIRST), ENUM_BIT(SECOND), ENUM_BIT(THIRD) }; Where the values would be 0x1, 0x2 and 0x4. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions