mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 07:05:08 +07:00
ec0f7cd273
Add tracepoints for the irq bitmap matrix allocator. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Juergen Gross <jgross@suse.com> Tested-by: Yu Chen <yu.c.chen@intel.com> Acked-by: Juergen Gross <jgross@suse.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Alok Kataria <akataria@vmware.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Rui Zhang <rui.zhang@intel.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Len Brown <lenb@kernel.org> Link: https://lkml.kernel.org/r/20170913213153.279468022@linutronix.de
202 lines
4.9 KiB
C
202 lines
4.9 KiB
C
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM irq_matrix
|
|
|
|
#if !defined(_TRACE_IRQ_MATRIX_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_IRQ_MATRIX_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
struct irq_matrix;
|
|
struct cpumap;
|
|
|
|
DECLARE_EVENT_CLASS(irq_matrix_global,
|
|
|
|
TP_PROTO(struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(matrix),
|
|
|
|
TP_STRUCT__entry(
|
|
__field( unsigned int, online_maps )
|
|
__field( unsigned int, global_available )
|
|
__field( unsigned int, global_reserved )
|
|
__field( unsigned int, total_allocated )
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->online_maps = matrix->online_maps;
|
|
__entry->global_available = matrix->global_available;
|
|
__entry->global_reserved = matrix->global_reserved;
|
|
__entry->total_allocated = matrix->total_allocated;
|
|
),
|
|
|
|
TP_printk("online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
|
|
__entry->online_maps, __entry->global_available,
|
|
__entry->global_reserved, __entry->total_allocated)
|
|
);
|
|
|
|
DECLARE_EVENT_CLASS(irq_matrix_global_update,
|
|
|
|
TP_PROTO(int bit, struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(bit, matrix),
|
|
|
|
TP_STRUCT__entry(
|
|
__field( int, bit )
|
|
__field( unsigned int, online_maps )
|
|
__field( unsigned int, global_available )
|
|
__field( unsigned int, global_reserved )
|
|
__field( unsigned int, total_allocated )
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->bit = bit;
|
|
__entry->online_maps = matrix->online_maps;
|
|
__entry->global_available = matrix->global_available;
|
|
__entry->global_reserved = matrix->global_reserved;
|
|
__entry->total_allocated = matrix->total_allocated;
|
|
),
|
|
|
|
TP_printk("bit=%d online_maps=%d global_avl=%u, global_rsvd=%u, total_alloc=%u",
|
|
__entry->bit, __entry->online_maps,
|
|
__entry->global_available, __entry->global_reserved,
|
|
__entry->total_allocated)
|
|
);
|
|
|
|
DECLARE_EVENT_CLASS(irq_matrix_cpu,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu, struct irq_matrix *matrix,
|
|
struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap),
|
|
|
|
TP_STRUCT__entry(
|
|
__field( int, bit )
|
|
__field( unsigned int, cpu )
|
|
__field( bool, online )
|
|
__field( unsigned int, available )
|
|
__field( unsigned int, allocated )
|
|
__field( unsigned int, managed )
|
|
__field( unsigned int, online_maps )
|
|
__field( unsigned int, global_available )
|
|
__field( unsigned int, global_reserved )
|
|
__field( unsigned int, total_allocated )
|
|
),
|
|
|
|
TP_fast_assign(
|
|
__entry->bit = bit;
|
|
__entry->cpu = cpu;
|
|
__entry->online = cmap->online;
|
|
__entry->available = cmap->available;
|
|
__entry->allocated = cmap->allocated;
|
|
__entry->managed = cmap->managed;
|
|
__entry->online_maps = matrix->online_maps;
|
|
__entry->global_available = matrix->global_available;
|
|
__entry->global_reserved = matrix->global_reserved;
|
|
__entry->total_allocated = matrix->total_allocated;
|
|
),
|
|
|
|
TP_printk("bit=%d cpu=%u online=%d avl=%u alloc=%u managed=%u online_maps=%u global_avl=%u, global_rsvd=%u, total_alloc=%u",
|
|
__entry->bit, __entry->cpu, __entry->online,
|
|
__entry->available, __entry->allocated,
|
|
__entry->managed, __entry->online_maps,
|
|
__entry->global_available, __entry->global_reserved,
|
|
__entry->total_allocated)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_global, irq_matrix_online,
|
|
|
|
TP_PROTO(struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(matrix)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_global, irq_matrix_offline,
|
|
|
|
TP_PROTO(struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(matrix)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_global, irq_matrix_reserve,
|
|
|
|
TP_PROTO(struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(matrix)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_global, irq_matrix_remove_reserved,
|
|
|
|
TP_PROTO(struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(matrix)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_global_update, irq_matrix_assign_system,
|
|
|
|
TP_PROTO(int bit, struct irq_matrix *matrix),
|
|
|
|
TP_ARGS(bit, matrix)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_reserved,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_reserve_managed,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_remove_managed,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc_managed,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_assign,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_alloc,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
DEFINE_EVENT(irq_matrix_cpu, irq_matrix_free,
|
|
|
|
TP_PROTO(int bit, unsigned int cpu,
|
|
struct irq_matrix *matrix, struct cpumap *cmap),
|
|
|
|
TP_ARGS(bit, cpu, matrix, cmap)
|
|
);
|
|
|
|
|
|
#endif /* _TRACE_IRQ_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|