|
From: Jeremy F. <je...@go...> - 2002-10-21 15:53:10
|
On Mon, 2002-10-21 at 02:02, Nicholas Nethercote wrote:
On 18 Oct 2002, Jeremy Fitzhardinge wrote:
> 14-hg-tid
> HELGRIND: This fixes a bug in Helgrind in which all memory access by
> syscalls was being treated as if it were happening in thread 1. This is
> because the eraser_mem_read/write functions were using
> get_current_tid_1_if_root() to get the current tid. Unfortunately,
> during syscalls there is no current thread, so it was getting 1_if_root.
> This patch fixes this by using what thread ID information we're given,
> and only using get_current_tid() if we're recording a memory access
> performed by code (rather than by a syscall).
Well done for spotting this. I suspected/hoped that there would be a
single bug that accounted for a lot of the garbage output. Accept my
apologies for my wretched coding in the first place :)
It was pretty subtle, but easy to fix once found. I'm still wondering
what get_current_tid_1_if_root() is for. It seems that
get_current_tid() can either return a tid, or "no tid" in the case where
there's nothing loaded into the base block. But I don't really
understand the rationale for returning what seems like a random tid if
there's no correct answer. I was thinking of getting rid of it
altogether, but it is used in a couple of other places.
J
|