Commit e08e5282 authored by sukadev@linux.vnet.ibm.com's avatar sukadev@linux.vnet.ibm.com Committed by Michael Ellerman

perf: define EVENT_DEFINE_RANGE_FORMAT_LITE helper

Define a lite version of the EVENT_DEFINE_RANGE_FORMAT() that avoids
defining helper functions for the bit-field ranges.
Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent f0405b81
...@@ -20,6 +20,16 @@ unsigned long hv_perf_caps_get(struct hv_perf_caps *caps); ...@@ -20,6 +20,16 @@ unsigned long hv_perf_caps_get(struct hv_perf_caps *caps);
PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end); \ PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end); \
EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end)
/*
* The EVENT_DEFINE_RANGE_FORMAT() macro above includes helper functions
* for the fields (eg: event_get_starting_index()). For some fields we
* need the bit-range definition, but no the helper functions. Define a
* lite version of the above macro without the helpers and silence
* compiler warnings unused static functions.
*/
#define EVENT_DEFINE_RANGE_FORMAT_LITE(name, attr_var, bit_start, bit_end) \
PMU_FORMAT_ATTR(name, #attr_var ":" #bit_start "-" #bit_end);
#define EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) \ #define EVENT_DEFINE_RANGE(name, attr_var, bit_start, bit_end) \
static u64 event_get_##name##_max(void) \ static u64 event_get_##name##_max(void) \
{ \ { \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment