From: William Cohen <wcohen@nc.rr.com>
To: eranian@hpl.hp.com
Cc: linux-kernel@vger.kernel.org, perfmon@napali.hpl.hp.com,
perfctr-devel@lists.sourceforge.net, linux-ia64@vger.kernel.org
Subject: Re: [Perfctr-devel] 2.6.16-rc5 perfmon2 new code base + libpfm with Montecito support
Date: Mon, 13 Mar 2006 13:39:01 -0500 [thread overview]
Message-ID: <4415BC45.1010601@nc.rr.com> (raw)
In-Reply-To: <20060308155311.GD13168@frankl.hpl.hp.com>
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
Hi Stephane,
I have been looking through the perfmon2 code to see how it is going to
work with OProfile. It looks like the ia64 oprofile support has not been
modified to work with the changes in perfmon2. Has the ia64 kernel been
built with perfmon2 and oprofile support? I don't have easy access to an
ia64, so I haven't been able to verify that the attached patch works.
However, I expect that the changes in the patch will be required for
OProfile to function with perfmon2.
-Will
[-- Attachment #2: perfmon2ia64_oprof.diff --]
[-- Type: text/x-patch, Size: 2754 bytes --]
--- linux-2.6.16-rc5-perfop/arch/ia64/oprofile/perfmon.c.ia64chg 2006-03-13 10:56:30.000000000 -0500
+++ linux-2.6.16-rc5-perfop/arch/ia64/oprofile/perfmon.c 2006-03-13 12:31:48.000000000 -0500
@@ -8,22 +8,27 @@
*/
#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/config.h>
#include <linux/oprofile.h>
#include <linux/sched.h>
-#include <asm/perfmon.h>
+#include <linux/perfmon.h>
#include <asm/ptrace.h>
#include <asm/errno.h>
static int allow_ints;
static int
-perfmon_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg,
- struct pt_regs *regs, unsigned long stamp)
+perfmon_handler(void *buf, struct pfm_ovfl_arg *arg,
+ unsigned long ip, u64 stamp, void *data)
{
int event = arg->pmd_eventid;
- arg->ovfl_ctrl.bits.reset_ovfl_pmds = 1;
+ /* FIXME: oprofile_add_sample expect to have
+ struct pt_regs * const regs */
+ struct pt_regs * const regs = (struct pt_regs *) data;
+
+ arg->ovfl_ctrl = PFM_OVFL_CTRL_RESET;
/* the owner of the oprofile event buffer may have exited
* without perfmon being shutdown (e.g. SIGSEGV)
@@ -54,6 +59,7 @@
.fmt_name = "oprofile_format",
.fmt_uuid = OPROFILE_FMT_UUID,
.fmt_handler = perfmon_handler,
+ .owner = THIS_MODULE,
};
@@ -76,9 +82,9 @@
static int using_perfmon;
-int perfmon_init(struct oprofile_operations * ops)
+int __init op_perfmon_init(struct oprofile_operations * ops)
{
- int ret = pfm_register_buffer_fmt(&oprofile_fmt);
+ int ret = pfm_register_smpl_fmt(&oprofile_fmt);
if (ret)
return -ENODEV;
@@ -91,10 +97,10 @@
}
-void perfmon_exit(void)
+void __exit op_perfmon_exit(void)
{
if (!using_perfmon)
return;
- pfm_unregister_buffer_fmt(oprofile_fmt.fmt_uuid);
+ pfm_unregister_smpl_fmt(oprofile_fmt.fmt_uuid);
}
--- linux-2.6.16-rc5-perfop/arch/ia64/oprofile/init.c.ia64chg 2006-03-13 11:02:19.000000000 -0500
+++ linux-2.6.16-rc5-perfop/arch/ia64/oprofile/init.c 2006-03-13 11:03:09.000000000 -0500
@@ -12,8 +12,8 @@
#include <linux/init.h>
#include <linux/errno.h>
-extern int perfmon_init(struct oprofile_operations * ops);
-extern void perfmon_exit(void);
+extern int op_perfmon_init(struct oprofile_operations * ops);
+extern void op_perfmon_exit(void);
extern void ia64_backtrace(struct pt_regs * const regs, unsigned int depth);
int __init oprofile_arch_init(struct oprofile_operations * ops)
@@ -22,7 +22,7 @@
#ifdef CONFIG_PERFMON
/* perfmon_init() can fail, but we have no way to report it */
- ret = perfmon_init(ops);
+ ret = op_perfmon_init(ops);
#endif
ops->backtrace = ia64_backtrace;
@@ -33,6 +33,6 @@
void oprofile_arch_exit(void)
{
#ifdef CONFIG_PERFMON
- perfmon_exit();
+ op_perfmon_exit();
#endif
}
next prev parent reply other threads:[~2006-03-13 18:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-08 15:53 2.6.16-rc5 perfmon2 new code base + libpfm with Montecito support Stephane Eranian
2006-03-08 20:40 ` William Cohen
2006-03-08 21:22 ` Stephane Eranian
2006-03-13 18:39 ` William Cohen [this message]
2006-03-13 18:55 ` [Perfctr-devel] " Stephane Eranian
2006-03-13 19:15 ` William Cohen
2006-03-13 20:25 ` Stephane Eranian
2006-03-13 20:58 ` William Cohen
2006-03-13 21:21 ` Stephane Eranian
[not found] ` <20060313210127.GA13453@totally.trollied.org>
[not found] ` <20060313210354.GG32683@frankl.hpl.hp.com>
[not found] ` <20060313232057.GA16582@totally.trollied.org>
2006-03-13 23:58 ` Stephane Eranian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4415BC45.1010601@nc.rr.com \
--to=wcohen@nc.rr.com \
--cc=eranian@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perfctr-devel@lists.sourceforge.net \
--cc=perfmon@napali.hpl.hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox