forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm/arm64: KVM: Add tracepoints for vgic and timer
The VGIC and timer code for KVM arm/arm64 doesn't have any tracepoints or tracepoint infrastructure defined. Rewriting some of the timer code handling showed me how much we need this, so let's add these simple trace points once and for all and we can easily expand with additional trace points in these files as we go along. Cc: Wei Huang <[email protected]> Signed-off-by: Christoffer Dall <[email protected]>
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _TRACE_KVM_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM kvm | ||
|
||
/* | ||
* Tracepoints for vgic | ||
*/ | ||
TRACE_EVENT(vgic_update_irq_pending, | ||
TP_PROTO(unsigned long vcpu_id, __u32 irq, bool level), | ||
TP_ARGS(vcpu_id, irq, level), | ||
|
||
TP_STRUCT__entry( | ||
__field( unsigned long, vcpu_id ) | ||
__field( __u32, irq ) | ||
__field( bool, level ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->vcpu_id = vcpu_id; | ||
__entry->irq = irq; | ||
__entry->level = level; | ||
), | ||
|
||
TP_printk("VCPU: %ld, IRQ %d, level: %d", | ||
__entry->vcpu_id, __entry->irq, __entry->level) | ||
); | ||
|
||
/* | ||
* Tracepoints for arch_timer | ||
*/ | ||
TRACE_EVENT(kvm_timer_update_irq, | ||
TP_PROTO(unsigned long vcpu_id, __u32 irq, int level), | ||
TP_ARGS(vcpu_id, irq, level), | ||
|
||
TP_STRUCT__entry( | ||
__field( unsigned long, vcpu_id ) | ||
__field( __u32, irq ) | ||
__field( int, level ) | ||
), | ||
|
||
TP_fast_assign( | ||
__entry->vcpu_id = vcpu_id; | ||
__entry->irq = irq; | ||
__entry->level = level; | ||
), | ||
|
||
TP_printk("VCPU: %ld, IRQ %d, level %d", | ||
__entry->vcpu_id, __entry->irq, __entry->level) | ||
); | ||
|
||
#endif /* _TRACE_KVM_H */ | ||
|
||
#undef TRACE_INCLUDE_PATH | ||
#define TRACE_INCLUDE_PATH ../../../virt/kvm/arm | ||
#undef TRACE_INCLUDE_FILE | ||
#define TRACE_INCLUDE_FILE trace | ||
|
||
/* This part must be outside protection */ | ||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters