Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570925

[PATCH v4 2/9] KVM: Add event to trace tlb invalidations

From Punit Agrawal <punit.agrawal@arm.com>
Newsgroups linux.kernel
Subject [PATCH v4 2/9] KVM: Add event to trace tlb invalidations
Date 2017-01-31 18:40 +0100
Message-ID <t5Kzn-3vy-17@gated-at.bofh.it> (permalink)
References <t5Kg1-3p5-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


As TLB operations can have an impact on system performance, add a trace
event to enable monitoring of guest TLB maintenance operations.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
 include/trace/events/kvm.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
index 8ade3eb6c640..fbe33089264c 100644
--- a/include/trace/events/kvm.h
+++ b/include/trace/events/kvm.h
@@ -393,6 +393,24 @@ TRACE_EVENT(kvm_halt_poll_ns,
 #define trace_kvm_halt_poll_ns_shrink(vcpu_id, new, old) \
 	trace_kvm_halt_poll_ns(false, vcpu_id, new, old)
 
+TRACE_EVENT(kvm_tlb_invalidate,
+	TP_PROTO(unsigned long vcpu_pc, u32 opcode),
+	TP_ARGS(vcpu_pc, opcode),
+
+	TP_STRUCT__entry(
+		__field(unsigned long, vcpu_pc)
+		__field(u32, opcode)
+	),
+
+	TP_fast_assign(
+		__entry->vcpu_pc = vcpu_pc;
+		__entry->opcode = opcode;
+	),
+
+	TP_printk("vcpu_pc=0x%16lx opcode=%08x", __entry->vcpu_pc,
+		  __entry->opcode)
+);
+
 #endif /* _TRACE_KVM_MAIN_H */
 
 /* This part must be outside protection */
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/9] Add support for monitoring guest TLB operations Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 4/9] arm64: KVM: Handle trappable TLB instructions Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 6/9] KVM: arm/arm64: Add support for tracking guest TLB operations Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 5/9] kvm: Add host pmu to support VM introspection Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 9/9] arm/arm64: KVM: Initialise the host pmu Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 8/9] arm: KVM: Enable support for host pmu Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 3/9] arm: KVM: Handle trappable TLB instructions Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:20 +0100
  [PATCH v4 1/9] arm64/kvm: hyp: tlb: use __tlbi() helper Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:30 +0100
  [PATCH v4 2/9] KVM: Add event to trace tlb invalidations Punit Agrawal <punit.agrawal@arm.com> - 2017-01-31 18:40 +0100

csiph-web