perfmon2 minimal: X86 generic code
PATCH 7/21 perfmon2 minimal: X86 generic code
This patch adds the X86 generic perfmon2 code. It is in charge of implementing certain key functionalities required by the generic code such as read/write of the PMU registers, low-level interrupt handling.
Signed-off-by Stephane Eranian <[email protected]>
--
arch/x86/perfmon/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +menu "Hardware Performance Monitoring support" +config PERFMON + bool "Perfmon2 performance monitoring interface" + select X86_LOCAL_APIC + default n + help + Enables the perfmon2 interface to access the hardware + performance counters. See <http://perfmon2.sf.net/> for + more details. + +config PERFMON_DEBUG + bool "Perfmon debugging" + default n + depends on PERFMON + help + Enables perfmon debugging support + +endmenu
arch/x86/perfmon/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# +# Copyright (c) 2005-2007 Hewlett-Packard Development Company, L.P. +# Contributed by Stephane Eranian <[email protected]> +# +obj-$(CONFIG_PERFMON) += perfmon.o
arch/x86/perfmon/perfmon.c new file +634 -0
634 lines not on this page · raw message
include/asm-x86/perfmon.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright (c) 2007 Hewlett-Packard Development Company, L.P. +* Contributed by Stephane Eranian <[email protected]> +* +* This file contains i386/x86_64 specific definitions for the perfmon +* interface. +* +* This file MUST never be included directly. Use linux/perfmon.h. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of version 2 of the GNU General Public +* License as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +* 02111-1307 USA +*/ +#ifndef _ASM_X86_PERFMON__H_ +#define _ASM_X86_PERFMON__H_ + +/* +* arch-specific user visible interface definitions +*/ + +#define PFM_ARCH_MAX_PMCS (256+64)/* 256 HW 64 SW */ +#define PFM_ARCH_MAX_PMDS (256+64)/* 256 HW 64 SW */ + +#endif /* _ASM_X86_PERFMON_H_ */
include/asm-x86/perfmon_kern.h new file +376 -0
376 lines not on this page · raw message