|
From: Oriol P. <aut...@gm...> - 2007-06-15 08:34:54
|
Hi, I need to instrument program in a concrete way. When some condition happens (controlled by the instrumentation) I would like to change the instrumentation. For this reason I need to invalidate all translation cache entries. Anybody knows how to invalidate all TC entries? Thanks, Oriol |
|
From: Josef W. <Jos...@gm...> - 2007-06-15 11:43:57
|
On Friday 15 June 2007, Oriol Prat wrote: > Hi, > I need to instrument program in a concrete way. > When some condition happens (controlled by the instrumentation) I > would like to change the instrumentation. > For this reason I need to invalidate all translation cache entries. > > 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. Josef > > > Thanks, > Oriol > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
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 |