perf powerpc: Add support for PERF_SAMPLE_WEIGHT_STRUCT
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>
Mon, 22 Mar 2021 14:57:25 +0000 (10:57 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 26 Mar 2021 11:49:48 +0000 (08:49 -0300)
commitff0bd0a33f257cc01c0b777c1423205e49049777
tree8781deafffbb20d590eba9c5cae5dc42a57c3fa4
parent0a606822c4863b2398925e6ff3329d64c4c52bb8
perf powerpc: Add support for PERF_SAMPLE_WEIGHT_STRUCT

Add arch specific arch_evsel__set_sample_weight() to set the new
sample type for powerpc.

Add arch specific arch_perf_parse_sample_weight() to store the
sample->weight values depending on the sample type applied.
if the new sample type (PERF_SAMPLE_WEIGHT_STRUCT) is applied,
store only the lower 32 bits to sample->weight. If sample type
is 'PERF_SAMPLE_WEIGHT', store the full 64-bit to sample->weight.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Link: https://lore.kernel.org/r/1616425047-1666-4-git-send-email-atrajeev@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/powerpc/util/Build
tools/perf/arch/powerpc/util/event.c [new file with mode: 0644]
tools/perf/arch/powerpc/util/evsel.c [new file with mode: 0644]