|
From: Nicholas N. <nj...@ca...> - 2004-07-11 18:19:18
|
Hi, In vg_transtab.c, line 393, there's a #if'd out branch. It seems to be putting parts of the translation table into files, which seems like it might be a useful debugging aid, but I don't know how to read the files (they're binary) and there's no comment. Can someone explain? Thanks. N |
|
From: Jeremy F. <je...@go...> - 2004-07-13 17:05:58
|
On Sun, 2004-07-11 at 19:19 +0100, Nicholas Nethercote wrote:
> In vg_transtab.c, line 393, there's a #if'd out branch. It seems to be
> putting parts of the translation table into files, which seems like it
> might be a useful debugging aid, but I don't know how to read the files
> (they're binary) and there's no comment. Can someone explain?
Rather than allocating memory for the translated code, that branch puts
them into mmaped files. The main reason for this is so that when you
use Valgrind under oprofile, oprofile has an "object file" to account
the time spent in generated code to. This means that you can use
oprofile to get a reasonably good idea about time spent in generated
code vs. Valgrind itself.
The file format doesn't really matter that much, but I did toy with
making them ELF files with proper symbol tables so that you could use
normal tools to directly inspect generated code, but it seemed like a
lot of work.
J
|