diff options
| author | Stéphane Eranian <eranian@hpl.hp.com> | 2004-09-30 16:27:05 +0000 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2004-09-30 16:27:05 +0000 |
| commit | 1f876a54c0bd04648138d63d9eeb7facb2b6d6db (patch) | |
| tree | 308f2742b7b304c4deaf1d275e81f596471aacaf | |
| parent | 76642c02bd6775cf8ff12937867e0b96740d1a4f (diff) | |
[IA64] perfmon2 fix for TASK_TRACED
fix a problem in pfm_check_task_state() and pfm_task_incompatible()
which was caused by the introduction of the new TASK_TRACED state.
Tool would fail to attach to a process,i.e., PFM_LOAD_CONTEXT would
fail. With the fix perfmon now accepts to operate on tasks which are
in either TASK_STOPPED or TASK_TRACED state. The problem was tracked
down by Alex Williamson from HP who also submitted the patch.
signed-off-by: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
| -rw-r--r-- | arch/ia64/kernel/perfmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index dac92fe23cb6..cdaff6054e5e 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -2601,7 +2601,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task) */ if (task == current) return 0; - if (task->state != TASK_STOPPED) { + if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task->pid, task->state)); return -EBUSY; } @@ -4755,7 +4755,7 @@ recheck: * the task must be stopped. */ if (PFM_CMD_STOPPED(cmd)) { - if (task->state != TASK_STOPPED) { + if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) { DPRINT(("[%d] task not in stopped state\n", task->pid)); return -EBUSY; } |
