Skip to contentSkip to conversation

perf kvm stat: Add missing mappings for PPC kvm exit reasons

PATCH Applied Gautam Menghani 3 participants 4 messages May 18 – Jun 30 perf events

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 perf kvm stat: Add missing mappings for PPC kvm exit reasons

The macro kvm_trace_symbol_exit is used for providing the mappings for the exit trap vectors and their names. Add mappings for H_FAC_UNAVAIL and H_VIRT so that exit reasons are displayed as string instead of vector numbers when using perf kvm stat.

---
v1 -> v2:
1. Update the patch title and description to remove dependency on another file trace_book3s.h

 tools/perf/util/kvm-stat-arch/book3s_hv_exits.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/util/kvm-stat-arch/book3s_hv_exits.h +3 -1
index 2011376c7ab5..2688ca7d0399 100644
@@ -26,8 +26,10 @@
 	{0xe00, "H_DATA_STORAGE"}, \
 	{0xe20, "H_INST_STORAGE"}, \
 	{0xe40, "H_EMUL_ASSIST"}, \
+	{0xea0, "H_VIRT"}, \
 	{0xf00, "PERFMON"}, \
 	{0xf20, "ALTIVEC"}, \
-	{0xf40, "VSX"}
+	{0xf40, "VSX"}, \
+	{0xf80, "H_FAC_UNAVAIL"}
 
 #endif
Signature · 1 line
2.53.0
#1 lore raw
Quoted 21 lines · Gautam Menghani

The macro kvm_trace_symbol_exit is used for providing the mappings for the exit trap vectors and their names. Add mappings for H_FAC_UNAVAIL and H_VIRT so that exit reasons are displayed as string instead of vector numbers when using perf kvm stat.

---
v1 -> v2:
1. Update the patch title and description to remove dependency on another file trace_book3s.h

 tools/perf/util/kvm-stat-arch/book3s_hv_exits.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/util/kvm-stat-arch/book3s_hv_exits.h +0 -0
index 2011376c7ab5..2688ca7d0399 100644
@@ -26,8 +26,10 @@
 	{0xe00, "H_DATA_STORAGE"}, \

tools/perf/util/kvm-stat-arch/book3s_hv_exits.h line 35

Quoted 10 lines
tools/perf/util/kvm-stat-arch/book3s_hv_exits.h +3 -1
 	{0xe20, "H_INST_STORAGE"}, \
 	{0xe40, "H_EMUL_ASSIST"}, \
+	{0xea0, "H_VIRT"}, \
 	{0xf00, "PERFMON"}, \
 	{0xf20, "ALTIVEC"}, \
-	{0xf40, "VSX"}
+	{0xf40, "VSX"}, \
+	{0xf80, "H_FAC_UNAVAIL"}
 
 #endif

Hi,

Please review this and let me known if any changes are needed.

Thanks

#2 lore raw
In reply to Gautam Menghani
Quoted 4 lines · Gautam Menghani

The macro kvm_trace_symbol_exit is used for providing the mappings for the exit trap vectors and their names. Add mappings for H_FAC_UNAVAIL and H_VIRT so that exit reasons are displayed as string instead of vector numbers when using perf kvm stat.

Do we want to make a copy of the existing header in perf to keep things in sync with check-headers.sh as suggested by Ian earlier?

Thanks,
Amit

Quoted 29 lines

---
v1 -> v2:
1. Update the patch title and description to remove dependency on another file trace_book3s.h

 tools/perf/util/kvm-stat-arch/book3s_hv_exits.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/util/kvm-stat-arch/book3s_hv_exits.h +3 -1
index 2011376c7ab5..2688ca7d0399 100644
@@ -26,8 +26,10 @@
 	{0xe00, "H_DATA_STORAGE"}, \
 	{0xe20, "H_INST_STORAGE"}, \
 	{0xe40, "H_EMUL_ASSIST"}, \
+	{0xea0, "H_VIRT"}, \
 	{0xf00, "PERFMON"}, \
 	{0xf20, "ALTIVEC"}, \
-	{0xf40, "VSX"}
+	{0xf40, "VSX"}, \
+	{0xf80, "H_FAC_UNAVAIL"}
 
 #endif
Signature · 1 line
2.53.0
maintainer Applied
#3 lore raw
In reply to Gautam Menghani
Quoted 6 lines · Gautam Menghani

The macro kvm_trace_symbol_exit is used for providing the mappings for the exit trap vectors and their names. Add mappings for H_FAC_UNAVAIL and H_VIRT so that exit reasons are displayed as string instead of vector numbers when using perf kvm stat.

Applied to perf-tools-next, thanks!

Best regards,
Namhyung