KVM: s390: add tracepoint in gmap notifier
The gmap notifier is called for changes in table entries with the notifier bit set. To diagnose performance issues, it can be useful to see what causes certain changes in the gmap. Hence, add a tracepoint in the gmap notifier. Signed-off-by: Nico Boehr <nrb@linux.ibm.com> Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/r/20231009093304.2555344-3-nrb@linux.ibm.com Message-Id: <20231009093304.2555344-3-nrb@linux.ibm.com>
This commit is contained in:
parent
c3235e2dd6
commit
70fea30195
@ -4060,6 +4060,8 @@ static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
|
||||
unsigned long prefix;
|
||||
unsigned long i;
|
||||
|
||||
trace_kvm_s390_gmap_notifier(start, end, gmap_is_shadow(gmap));
|
||||
|
||||
if (gmap_is_shadow(gmap))
|
||||
return;
|
||||
if (start >= 1UL << 31)
|
||||
|
@ -333,6 +333,29 @@ TRACE_EVENT(kvm_s390_airq_suppressed,
|
||||
__entry->id, __entry->isc)
|
||||
);
|
||||
|
||||
/*
|
||||
* Trace point for gmap notifier calls.
|
||||
*/
|
||||
TRACE_EVENT(kvm_s390_gmap_notifier,
|
||||
TP_PROTO(unsigned long start, unsigned long end, unsigned int shadow),
|
||||
TP_ARGS(start, end, shadow),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned long, start)
|
||||
__field(unsigned long, end)
|
||||
__field(unsigned int, shadow)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->start = start;
|
||||
__entry->end = end;
|
||||
__entry->shadow = shadow;
|
||||
),
|
||||
|
||||
TP_printk("gmap notified (start:0x%lx end:0x%lx shadow:%d)",
|
||||
__entry->start, __entry->end, __entry->shadow)
|
||||
);
|
||||
|
||||
|
||||
#endif /* _TRACE_KVMS390_H */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user