Thread (41 messages) flat view 41 messages, 6 authors, 2020-07-15

Re: [PATCH v2 09/10] tools/perf: Add perf tools support for extended register capability in powerpc

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2020-07-13 12:47:49

Athira Rajeev [off-list ref] writes:
quoted
On 08-Jul-2020, at 5:34 PM, Michael Ellerman [off-list ref] wrote:

Athira Rajeev <atrajeev@linux.vnet.ibm.com <mailto:atrajeev@linux.vnet.ibm.com>> writes:
quoted
From: Anju T Sudhakar <redacted>

Add extended regs to sample_reg_mask in the tool side to use
with `-I?` option. Perf tools side uses extended mask to display
...
quoted
quoted
+	 */
+	get_cpuid(buffer, sizeof(buffer));
+	ret = sscanf(buffer, "%u,", &version);
This is powerpc specific code, why not just use mfspr(SPRN_PVR), rather
than redirecting via printf/sscanf.
Hi Michael

For perf tools, defines for `mfspr` , `SPRN_PVR` are in arch/powerpc/util/header.c 
So I have re-used existing utility. Otherwise, we will need to include these defines here as well
Does that sounds good ?
They should be moved to a header in that directory that both C files can include.

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