perf: Add PMU_FORMAT_ATTR_SHOW
authorKan Liang <kan.liang@linux.intel.com>
Wed, 4 Jan 2023 20:13:41 +0000 (12:13 -0800)
committerIngo Molnar <mingo@kernel.org>
Mon, 9 Jan 2023 11:22:07 +0000 (12:22 +0100)
commitb6c00fb9949fbd073e651a77aa75faca978cf2a6
tree354d02c137629a0edeac58a63797c53bcb36de47
parent8e791f7eba4c7711f56616ae163ee3cbc00b1bf4
perf: Add PMU_FORMAT_ATTR_SHOW

The macro PMU_FORMAT_ATTR facilitates the definition of both the "show"
function and "format_attr". But it only works for a non-hybrid platform.
For a hybrid platform, the name "format_attr_hybrid_" is used.

The definition of the "show" function can be shared between a non-hybrid
platform and a hybrid platform. Add a new macro PMU_FORMAT_ATTR_SHOW.

No functional change. The PMU_FORMAT_ATTR_SHOW will be used in the
following patch.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230104201349.1451191-1-kan.liang@linux.intel.com
include/linux/perf_event.h