mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 08:52:27 +00:00
Parts of a 'perf kvm stat' code make sense only for x86. Let's move this code into the arch/x86/kvm-stat.c file and add util/kvm-stat.h for generic structure definitions. Add a global array 'kvm_reg_events_ops' for accessing the arch-specific 'kvm_events_ops' from generic code. Since the several global arrays (i.e. 'kvm_events_tp') have been moved to arch/*, we can not know their sizes and use them directly in builtin-kvm.c. This patch fixes that problem by adding trimming NULL element to each array and changing the behavior of their handlers in generic code. Reviewed-by: David Ahern <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Signed-off-by: Alexander Yarygin <[email protected]> Acked-by: Christian Borntraeger <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Cornelia Huck <[email protected]> Cc: David Ahern <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
20 lines
612 B
Makefile
20 lines
612 B
Makefile
ifndef NO_DWARF
|
|
PERF_HAVE_DWARF_REGS := 1
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o
|
|
endif
|
|
ifndef NO_LIBUNWIND
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libunwind.o
|
|
endif
|
|
ifndef NO_LIBDW_DWARF_UNWIND
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind-libdw.o
|
|
endif
|
|
ifndef NO_DWARF_UNWIND
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/regs_load.o
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/tests/dwarf-unwind.o
|
|
endif
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/tsc.o
|
|
LIB_H += arch/$(ARCH)/util/tsc.h
|
|
HAVE_KVM_STAT_SUPPORT := 1
|
|
LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/kvm-stat.o
|