|
From: Yeshurun, M. <mei...@in...> - 2005-07-29 18:56:29
|
I read the message from Yuri in the archive about changing KICKSTART_BASE. But the guy who suggested the hack in coregrind/vg_main.c said that in version 2.4 this variable is effectively ignored. =20 Do you know anything about this problem? Was it fixed in 3.0? Thanks, Meir -----Original Message----- From: val...@li... [mailto:val...@li...] On Behalf Of Yeshurun, Meir Sent: Friday, July 29, 2005 9:10 PM To: val...@li... Subject: FW: [Valgrind-users] Running Valgrind on large programs -----Original Message----- From: Tom Hughes [mailto:to...@co...]=20 Sent: Friday, July 29, 2005 8:54 PM To: Yeshurun, Meir Subject: RE: [Valgrind-users] Running Valgrind on large programs In message <942...@ha...> you wrote: > So are you saying it would make sense with the non-PIE version? Not really, the way to do it in the non-PIE version would be to alter the value of KICKSTART_BASE for amd64 in the configuration script. Tom --=20 Tom Hughes (to...@co...) http://www.compton.nu/ ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Yeshurun, M. <mei...@in...> - 2005-07-30 13:32:07
|
Tom, I can't thank you enough.
So far, it looks like there are no more problems related to memory
limits.
I checked the value of info.exe_end with a debugger and it was about
550G.
Does that mean I can give Valgrind (i.e. info.exe_base to info.exe_end)
like 100GB and still have 450GB of virtual memory left for the client
program below it? (Or am I missing something here?)
Thanks also to the rest of the Valgrind developers!
-----Original Message-----
From: val...@li...
[mailto:val...@li...] On Behalf Of Tom
Hughes
Sent: Friday, July 29, 2005 10:18 PM
To: val...@li...
Subject: Re: [Valgrind-users] Running Valgrind on large programs
In message
<942...@ha...>
"Yeshurun, Meir" <mei...@in...> wrote:
> When using a PIE Valgrind (on a 64 bit platform), I get the crash even
> earlier:
>=20
> VG_(get_memory_from_mmap): newSuperblock's request for 1048576 bytes
failed.
> VG_(get_memory_from_mmap): 221937856 bytes already allocated.
Could we see the full output please, with -v, so I can see where it
is getting to before it fails. The output from strace would probably
be helpful as well.
> (before that I also get an mmap failed warning on one of the .so's
that
> says no debug information or symbols were loaded)
Probably because of a lack of address space.
> I googled this error and saw that someone suggested the following:
>=20
> The crude hack is to change in coregrind/vg_main.c
>=20
> case AT_PHDR:
> VG_(valgrind_base) =3D PGROUNDDN(auxv->u.a_val);
> break;
>=20
> to
>=20
> case AT_PHDR:
> VG_(valgrind_base) =3D 0xa0000000; /* boooo! */
> break
>=20
> Is this a good idea?
I've looked at this again and I think he is trying to give valgrind
more address space so it can load larger libraries to read the debug
information.
The correct way to do that for a PIE build is to change line 272 of
stage1.c and adjust the offset it applies (currently 0x2000000) to
exe_end to calculate exe_base. If you increase that value you should
give more space to valgrind but on a 64 bit platform with a PIE build
there should be plenty to go around.
Tom
--=20
Tom Hughes (to...@co...)
http://www.compton.nu/
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. =
http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|
|
From: Tom H. <to...@co...> - 2005-07-30 14:34:29
|
In message <942...@ha...> you wrote: > I checked the value of info.exe_end with a debugger and it was about > 550G. > > Does that mean I can give Valgrind (i.e. info.exe_base to info.exe_end) > like 100GB and still have 450GB of virtual memory left for the client > program below it? (Or am I missing something here?) Almost. The valgrind stage2 executable will be loaded at exe_base and everything above that (up to exe_end) will be used for valgrind itself including the mapping of client programs and libraries while debug information is read. The area below exe_base will be divided between the client memory and the shadow memory if the tool you are using needs shadow memory space. The relative amounts of client space and shadow space depends on how much shadow space the tool asks for. If you change the "if (0)" to "if (1)" on line 236 of m_main.c then you will get a report on how the address space has been allocated when valgrind starts. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Tom H. <to...@co...> - 2005-07-29 19:02:55
|
In message <942...@ha...>
"Yeshurun, Meir" <mei...@in...> wrote:
> I read the message from Yuri in the archive about changing
> KICKSTART_BASE.
Could you point me at it, because the bit you quoted didn't make
much sense on it's own.
> But the guy who suggested the hack in coregrind/vg_main.c said that in
> version 2.4 this variable is effectively ignored.
Because 2.4 defaults to PIE mode! In PIE mode KICKSTART_BASE is
ignored. In non-PIE mode it controls where the split is between
the client address space and the valgrind address space.
> Do you know anything about this problem? Was it fixed in 3.0?
I think you'd be better off trying to work out why you are having
a problem so we can come up with a proper fix.
What is the actual problem that made you try PIE mode and why did
you think that PIE mode would help?
What is your actual problem with PIE mode? What happens when you
try and use a PIE build of valgrind?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|