Skip to content

Commit 0a6e3da

Browse files
kjain101gregkh
authored andcommitted
powerpc/perf/hv-gpci: Fix starting index value
[ Upstream commit 0f9866f ] Commit 9e9f601 ("powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated") adds a framework for defining gpci counters. In this patch, they adds starting_index value as '0xffffffffffffffff'. which is wrong as starting_index is of size 32 bits. Because of this, incase we try to run hv-gpci event we get error. In power9 machine: command#: perf stat -e hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ -C 0 -I 1000 event syntax error: '..bie_count_and_time_tlbie_instructions_issued/' \___ value too big for format, maximum is 4294967295 This patch fix this issue and changes starting_index value to '0xffffffff' After this patch: command#: perf stat -e hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ -C 0 -I 1000 1.000085786 1,024 hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ 2.000287818 1,024 hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ 2.439113909 17,408 hv_gpci/system_tlbie_count_and_time_tlbie_instructions_issued/ Fixes: 9e9f601 ("powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated") Signed-off-by: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201003074943.338618-1-kjain@linux.ibm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 0c82378 commit 0a6e3da

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

arch/powerpc/perf/hv-gpci-requests.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ REQUEST(__field(0, 8, partition_id)
9595

9696
#define REQUEST_NAME system_performance_capabilities
9797
#define REQUEST_NUM 0x40
98-
#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
98+
#define REQUEST_IDX_KIND "starting_index=0xffffffff"
9999
#include I(REQUEST_BEGIN)
100100
REQUEST(__field(0, 1, perf_collect_privileged)
101101
__field(0x1, 1, capability_mask)
@@ -223,7 +223,7 @@ REQUEST(__field(0, 2, partition_id)
223223

224224
#define REQUEST_NAME system_hypervisor_times
225225
#define REQUEST_NUM 0xF0
226-
#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
226+
#define REQUEST_IDX_KIND "starting_index=0xffffffff"
227227
#include I(REQUEST_BEGIN)
228228
REQUEST(__count(0, 8, time_spent_to_dispatch_virtual_processors)
229229
__count(0x8, 8, time_spent_processing_virtual_processor_timers)
@@ -234,7 +234,7 @@ REQUEST(__count(0, 8, time_spent_to_dispatch_virtual_processors)
234234

235235
#define REQUEST_NAME system_tlbie_count_and_time
236236
#define REQUEST_NUM 0xF4
237-
#define REQUEST_IDX_KIND "starting_index=0xffffffffffffffff"
237+
#define REQUEST_IDX_KIND "starting_index=0xffffffff"
238238
#include I(REQUEST_BEGIN)
239239
REQUEST(__count(0, 8, tlbie_instructions_issued)
240240
/*

0 commit comments

Comments
 (0)