Skip to content

Commit 70fea30

Browse files
Nico Boehrfrankjaa
authored andcommitted
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 <[email protected]> Acked-by: David Hildenbrand <[email protected]> Reviewed-by: Claudio Imbrenda <[email protected]> Acked-by: Janosch Frank <[email protected]> Signed-off-by: Janosch Frank <[email protected]> Link: https://lore.kernel.org/r/[email protected] Message-Id: <[email protected]>
1 parent c3235e2 commit 70fea30

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

arch/s390/kvm/kvm-s390.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4060,6 +4060,8 @@ static void kvm_gmap_notifier(struct gmap *gmap, unsigned long start,
40604060
unsigned long prefix;
40614061
unsigned long i;
40624062

4063+
trace_kvm_s390_gmap_notifier(start, end, gmap_is_shadow(gmap));
4064+
40634065
if (gmap_is_shadow(gmap))
40644066
return;
40654067
if (start >= 1UL << 31)

arch/s390/kvm/trace-s390.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,29 @@ TRACE_EVENT(kvm_s390_airq_suppressed,
333333
__entry->id, __entry->isc)
334334
);
335335

336+
/*
337+
* Trace point for gmap notifier calls.
338+
*/
339+
TRACE_EVENT(kvm_s390_gmap_notifier,
340+
TP_PROTO(unsigned long start, unsigned long end, unsigned int shadow),
341+
TP_ARGS(start, end, shadow),
342+
343+
TP_STRUCT__entry(
344+
__field(unsigned long, start)
345+
__field(unsigned long, end)
346+
__field(unsigned int, shadow)
347+
),
348+
349+
TP_fast_assign(
350+
__entry->start = start;
351+
__entry->end = end;
352+
__entry->shadow = shadow;
353+
),
354+
355+
TP_printk("gmap notified (start:0x%lx end:0x%lx shadow:%d)",
356+
__entry->start, __entry->end, __entry->shadow)
357+
);
358+
336359

337360
#endif /* _TRACE_KVMS390_H */
338361

0 commit comments

Comments
 (0)