Re: Using hardware watchpoint for applications debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux