forked from Minki/linux
e50c54189f
Add minimal guest support to perf, so it can distinguish whether the PMU interrupt was in the host or the guest, as well as collecting some very basic information (guest PC, user vs kernel mode). This is not feature complete though, as it doesn't support backtracing in the guest. Based on the x86 implementation, tested with KVM/ARM. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
30 lines
804 B
C
30 lines
804 B
C
/*
|
|
* linux/arch/arm/include/asm/perf_event.h
|
|
*
|
|
* Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
*/
|
|
|
|
#ifndef __ARM_PERF_EVENT_H__
|
|
#define __ARM_PERF_EVENT_H__
|
|
|
|
/*
|
|
* The ARMv7 CPU PMU supports up to 32 event counters.
|
|
*/
|
|
#define ARMPMU_MAX_HWEVENTS 32
|
|
|
|
#define HW_OP_UNSUPPORTED 0xFFFF
|
|
#define C(_x) PERF_COUNT_HW_CACHE_##_x
|
|
#define CACHE_OP_UNSUPPORTED 0xFFFF
|
|
|
|
struct pt_regs;
|
|
extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
|
|
extern unsigned long perf_misc_flags(struct pt_regs *regs);
|
|
#define perf_misc_flags(regs) perf_misc_flags(regs)
|
|
|
|
#endif /* __ARM_PERF_EVENT_H__ */
|