|
From: Dave N. <dc...@us...> - 2005-11-15 22:29:20
|
On Tue, 14 Nov 2005, Nicholas Nethercote wrote: +- AMD64 support is much improved. The 64-bit vs. 32-bit issues in 3.0.0 + and 3.0.1 have been resolved, and it should "just work" now in all + cases. On AMD64 machines both 64-bit and 32-bit versions of Valgrind + are built. The right version will be invoked automatically, even when + using --trace-children and mixing execution between 64-bit and 32-bit + executables. Also, many more instructions are supported. I'm planning on porting Valgrind to ppc64. The consensus I am hearing from my group at IBM is that we would like a single 64-bit ppc program that can handle either 32-bit or 64-bit client programs. If I am understanding the above mail correctly, the AMD64 port opted to produce two separate Valgrind programs: 64-bit and 32-bit where the 32-bit program handles 32-bit clients and the 64-bit program handles 64-bit clients. Can anyone explain the rationale behind the two separate Valgrind programs vs. a single 64-bit Valgrind? Is this simply a performance issue or is there some aspect of the Valgrind architecture that would make it too difficult/impossible to create a single 64-bit Valgrind that handles both architectures? Would this limitation apply as well to ppc32/ppc64? |
|
From: Tom H. <to...@co...> - 2005-11-15 23:12:12
|
In message <113...@go...>
Dave Nomura <dc...@us...> wrote:
> On Tue, 14 Nov 2005, Nicholas Nethercote wrote:
> +- AMD64 support is much improved. The 64-bit vs. 32-bit issues in
> 3.0.0
> + and 3.0.1 have been resolved, and it should "just work" now in all
> + cases. On AMD64 machines both 64-bit and 32-bit versions of Valgrind
> + are built. The right version will be invoked automatically, even
> when
> + using --trace-children and mixing execution between 64-bit and 32-bit
> + executables. Also, many more instructions are supported.
>
> I'm planning on porting Valgrind to ppc64. The consensus I am hearing
> from my group at IBM is that we would like a single 64-bit ppc program
> that can handle either 32-bit or 64-bit client programs.
Any idea why? To an ordinary user of valgrind it shouldn't be
something they have to know or care about which way it is done.
What is the difference between one binary per tool and one
per tool/platform combination anyway?
> If I am understanding the above mail correctly, the AMD64 port opted to
> produce two separate Valgrind programs: 64-bit and 32-bit where the
> 32-bit program handles 32-bit clients and the 64-bit program
> handles 64-bit clients.
No. There is one valgrind program which then chooses which is a
small launcher that decides which tool binary to run - it makes
that decision based on the program you have asked it to run and
which tool (memcheck, massif, helgrind etc) you asked for.
> Can anyone explain the rationale behind the two separate Valgrind
> programs vs. a single 64-bit Valgrind?
Certainly. It was vastly easier to do that way ;-)
> Is this simply a performance issue or is there some aspect of the
> Valgrind architecture that would make it too difficult/impossible to
> create a single 64-bit Valgrind that handles both architectures?
It's not performance, it's implementation ease. Although I think
that VEX is capable of doing x86-on-amd64 emulation (Julian would
know more about that than me) there is still the issue of system
calls.
Specifically if you have an amd64 (or ppc64) program that is trying
to run an x86 (or ppc32) client then it will need to translate all
the 32 bit system calls into 64 bit system calls. There is no
technology to do that in valgrind at the moment.
If we do refactor the system call stuff into a decode/process/encode
type system as has been discussed a few times then it might be that
we could consider supporting x86 binaries in an amd64 valgrind but
even then there might be complications that I haven't considered...
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Dave N. <dc...@us...> - 2005-11-17 20:09:48
|
On Tue, 2005-11-15 at 23:12 +0000, Tom Hughes wrote: > > > > I'm planning on porting Valgrind to ppc64. The consensus I am hearing > > from my group at IBM is that we would like a single 64-bit ppc program > > that can handle either 32-bit or 64-bit client programs. > > Any idea why? To an ordinary user of valgrind it shouldn't be > something they have to know or care about which way it is done. I guess the rationale was ease of use. Since valgrind has a launcher that decides between 64-bit valgrind and 32-bit valgrind this is a non- issue. |