From: Stephane Eranian <eranian@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] [BUG] perfmon doesn't send SIGPROF in kernel 2.5.64
Date: Fri, 11 Apr 2003 01:24:35 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590723705461@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590723705454@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 367 bytes --]
Eric,
Yes, I realized that a while back and never got around to fixing it.
Please try the (mostly untested) attached patch against 2.5.67 but it
should apply to older versions as well.
Let me know how it goes, especially on SMP.
PS: there is a dedicated mailing-list for perfmon.
Visit http://www.hpl.hp.com/research/linux/perfmon for details.
--
-Stephane
[-- Attachment #2: perfmon-2.5-030410.diff --]
[-- Type: text/plain, Size: 1407 bytes --]
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet bk-official-extra/arch/ia64/kernel/perfmon.c bk-base/arch/ia64/kernel/perfmon.c
--- bk-official-extra/arch/ia64/kernel/perfmon.c Thu Apr 10 14:01:35 2003
+++ bk-base/arch/ia64/kernel/perfmon.c Thu Apr 10 12:24:05 2003
@@ -1883,7 +1883,10 @@
DBprintk(("unblocking %d \n", task->pid));
up(sem);
} else {
+ struct thread_info *info = (struct thread_info *) ((char *) task + IA64_TASK_SIZE);
task->thread.pfm_ovfl_block_reset = 1;
+ ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_RESET;
+ set_bit(TIF_NOTIFY_RESUME, &info->flags);
}
#if 0
/*
@@ -2733,6 +2736,7 @@
* again
*/
th->pfm_ovfl_block_reset = 0;
+ clear_thread_flag(TIF_NOTIFY_RESUME);
/*
* do some sanity checks first
@@ -2907,8 +2911,9 @@
static unsigned long
pfm_overflow_handler(struct task_struct *task, pfm_context_t *ctx, u64 pmc0, struct pt_regs *regs)
{
- unsigned long mask;
struct thread_struct *t;
+ struct thread_info *info;
+ unsigned long mask;
unsigned long old_val;
unsigned long ovfl_notify = 0UL, ovfl_pmds = 0UL;
int i;
@@ -3053,6 +3058,8 @@
t->pfm_ovfl_block_reset = 1; /* will cause blocking */
ctx->ctx_fl_trap_reason = PFM_TRAP_REASON_SIG;
}
+ info = (struct thread_info *) ((char *) task + IA64_TASK_SIZE);
+ set_bit(TIF_NOTIFY_RESUME, &info->flags);
/*
* keep the PMU frozen until either pfm_restart() or
next prev parent reply other threads:[~2003-04-11 1:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 13:13 [Linux-ia64] [BUG] perfmon doesn't send SIGPROF in kernel 2.5.64 Eric Piel
2003-04-11 1:24 ` Stephane Eranian [this message]
2003-04-11 14:33 ` Eric Piel
2003-04-16 21:50 ` 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=marc-linux-ia64-105590723705461@msgid-missing \
--to=eranian@hpl.hp.com \
--cc=linux-ia64@vger.kernel.org \
/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