All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Nigel Stephens <nigel@mips.com>
Cc: colin <colin@realtek.com.tw>, linux-mips@linux-mips.org
Subject: Re: Using hardware watchpoint for applications debugging
Date: Thu, 30 Mar 2006 19:37:42 +0100	[thread overview]
Message-ID: <20060330183742.GA14515@linux-mips.org> (raw)
In-Reply-To: <442BB7B2.1010204@mips.com>

On Thu, Mar 30, 2006 at 11:49:22AM +0100, Nigel Stephens wrote:

> They're variable, but not very variable: the PID->ASID mapping will only
> change when the ASIDs roll over and the ASID gets reallocated to a
> different process, which will only happen after another 256 processes
> have been created. But in that case your watched process will have to be
> allocated a new ASID before it can run again. So you could, perhaps,
> modify the TLB management code to clear the Watch registers whenever an
> ASID belong to a process with watchpoints is recycled, and then
> reprogram the Watch registers when such a process is allocated a new
> ASID. Alternatively you could maintain pre-process copies of the Watch
> registers, and context switch them along with other per-process register
> state -- though that is adding context switch overhead to processes
> which don't use watchpoints, and might not be popular with the maintainer.

That's not quite true; the kernel also uses the ASID as a way to flush
a context from the TLB very quickly.

  Ralf

  reply	other threads:[~2006-03-30 18:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29 13:47 Using hardware watchpoint for applications debugging colin
2006-03-29 13:47 ` colin
2006-03-29 14:08 ` Nigel Stephens
2006-03-29 14:32   ` Kevin D. Kissell
2006-03-29 14:32     ` Kevin D. Kissell
2006-03-30  2:19     ` colin
2006-03-30  2:19       ` colin
2006-03-30  2:15   ` colin
2006-03-30  2:15     ` colin
2006-03-30 10:49     ` Nigel Stephens
2006-03-30 18:37       ` Ralf Baechle [this message]
2006-03-30 18:57       ` Daniel Jacobowitz

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=20060330183742.GA14515@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=colin@realtek.com.tw \
    --cc=linux-mips@linux-mips.org \
    --cc=nigel@mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.