|
From: Nicholas N. <nj...@cs...> - 2007-06-17 02:13:35
|
On Fri, 15 Jun 2007, Josef Weidendorfer wrote: >> Anybody knows how to invalidate all TC entries? > > In callgrind, for this I use > > VG_(discard_translations)( (Addr64)0x1000, (ULong) ~0xfffl); > > Unfortunatly, this function is not an official part of the core/tool > API, so you have to declare the prototype before with > > extern void VG_(discard_translations) ( Addr64 start, ULong range ); > > WARNING: As this is not part of the core/tool API, *any* new version > of Valgrind can break your tool: the function can disappear or the > signature can change everytime. That works for tools. If you want to do it from a client program being run under Valgrind, there's a client request called something like VALGRIND_INVALIDATE_TRANSLATIONS -- see the manual. Nick |