Thread (10 messages) flat view 10 messages, 3 authors, 2021-10-05

Re: [V2 2/4] tools/perf: Refactor the code definition of perf reg extended mask in tools side header file

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2021-10-01 11:30:40

Daniel Axtens [off-list ref] writes:
Hi Athira,
quoted
PERF_REG_PMU_MASK_300 and PERF_REG_PMU_MASK_31 defines the mask
value for extended registers. Current definition of these mask values
uses hex constant and does not use registers by name, making it less
readable. Patch refactor the macro values in perf tools side header file
by or'ing together the actual register value constants.
This looks like a good simplification.
quoted
-/* Exclude MMCR3, SIER2, SIER3 for CPU_FTR_ARCH_300 */
-#define	PERF_EXCLUDE_REG_EXT_300	(7ULL << PERF_REG_POWERPC_MMCR3)
This file is uAPI - are we allowed to remove a define? Could a program
built against these headers now fail to compile because we've removed it?
Yeah that's true.

In this case I think I'd rather we remove it though, because:
 - it was never meant to be part of the uapi, it was just meant for use
   in the construction of PERF_REG_PMU_MASK_300, and is no longer needed
   for that.
 - it's only been in the header since v5.12, so I think the chance of
   anything using it is essentially zero.


cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help