perfmon: generic headers
PATCH 1/24 perfmon: generic headers
This patch adds the generic perfmon headers including the public head perfmon.h which can be used by applications. The other headers are for kernel use only.
--
include/linux/perfmon.h new file +65 -0
@@ -0,0 +1,65 @@ +/* +* Copyright (c) 2001-2006 Hewlett-Packard Development Company, L.P. +* Contributed by Stephane Eranian <[email protected]> +* +* 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 __LINUX_PERFMON_H__ +#define __LINUX_PERFMON_H__ + +/* +* This file contains all the user visible generic definitions for the +* interface. Model-specific user-visible definitions are located in +* the asm/perfmon.h file. +*/ + +/* +* include arch-specific user interface definitions +*/ +#include <asm/perfmon.h> + +/* +* defined by each arch +*/ +#define PFM_MAX_PMCS PFM_ARCH_MAX_PMCS +#define PFM_MAX_PMDS PFM_ARCH_MAX_PMDS + +/* +* number of elements for each type of bitvector +* all bitvectors use u64 fixed size type on all architectures. +*/ +#define PFM_BVSIZE (x) (((x)+(sizeof(__u64)<<3)-1) / (sizeof(__u64)<<3)) +#define PFM_PMD_BV PFM_BVSIZE(PFM_MAX_PMDS) +#define PFM_PMC_BV PFM_BVSIZE(PFM_MAX_PMCS) + +/* +* default value for the user and group security parameters in +* /proc/sys/kernel/perfmon/sys_group +* /proc/sys/kernel/perfmon/task_group +*/ +#define PFM_GROUP_PERM_ANY -1/* any user/group */ + +/* +* perfmon version number +*/ +#define PFM_VERSION_MAJ 3U +#define PFM_VERSION_MIN 0U +#define PFM_VERSION (((PFM_VERSION_MAJ&0xffff)<<16)|\ + (PFM_VERSION_MIN & 0xffff)) +#define PFM_VERSION_MAJOR (x) (((x)>>16) & 0xffff) +#define PFM_VERSION_MINOR (x) ((x) & 0xffff) + +#endif /* __LINUX_PERFMON_H__ */
include/linux/perfmon_kern.h new file +265 -0
265 lines not on this page · raw message
include/linux/perfmon_pmu.h new file +138 -0
138 lines not on this page · raw message
From: [email protected]
Date: Wed, 26 Nov 2008 00:41:58 -0800 (PST)
Quoted 4 lines
+/*
+ * system adminstrator configuration controls available via
+ * the/sys/kerne/perfmoninterface
+ */
This sysfs path typo I pointed out a few hours ago remains :-) It should be "/sys/kernel/perfmon", the 'l' is missing.
David,
Quoted 11 lines · David Miller
From: [email protected]
Date: Wed, 26 Nov 2008 00:41:58 -0800 (PST)Quoted 4 lines
+/*
+ * system adminstrator configuration controls available via
+ * the/sys/kerne/perfmoninterface
+ */This sysfs path typo I pointed out a few hours ago remains :-) It should be "
/sys/kernel/perfmon", the 'l' is missing.
I will fix that. For now, I simply reposted to get the cc: list correct. The script I use to mail the patches was unfortunately dropping the cc-list.
Thanks.
Quoted 3 lines · stephane eranian
I will fix that. For now, I simply reposted to get the cc: list correct. The script I use to mail the patches was unfortunately dropping the cc-list.
/me wonders why people still use home-brewn mailer scripts, quilt mail works quite well, and even git seems to be able to mail without causing these insanely deep threaded things, albeit with some extra effort.
David,
Fixed now.
Thanks
Quoted 13 lines · David Miller
From: [email protected]
Date: Wed, 26 Nov 2008 00:41:58 -0800 (PST)Quoted 4 lines
+/*
+ * system adminstrator configuration controls available via
+ * the/sys/kerne/perfmoninterface
+ */This sysfs path typo I pointed out a few hours ago remains :-) It should be "
/sys/kernel/perfmon", the 'l' is missing.