|
From: <sv...@va...> - 2005-10-12 10:51:07
|
Author: sewardj
Date: 2005-10-12 11:51:01 +0100 (Wed, 12 Oct 2005)
New Revision: 4908
Log:
Notify the tool via tool_discard_basic_block_info() about translations
thrown away due to lack of space.
Modified:
trunk/coregrind/m_transtab.c
Modified: trunk/coregrind/m_transtab.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_transtab.c 2005-10-12 10:50:56 UTC (rev 4907)
+++ trunk/coregrind/m_transtab.c 2005-10-12 10:51:01 UTC (rev 4908)
@@ -331,6 +331,11 @@
for (i =3D 0; i < N_TTES_PER_SECTOR; i++) {
if (sectors[sno].tt[i].status =3D=3D InUse) {
n_dump_osize +=3D vge_osize(§ors[sno].tt[i].vge);
+ /* Tell the tool too. */
+ if (VG_(needs).basic_block_discards) {
+ VG_TDICT_CALL( tool_discard_basic_block_info,
+ sectors[sno].tt[i].vge );
+ }
}
}
if (VG_(clo_verbosity) > 2)
|
|
From: Josef W. <Jos...@gm...> - 2005-10-12 14:24:17
|
On Wednesday 12 October 2005 12:51, sv...@va... wrote: > Author: sewardj > Date: 2005-10-12 11:51:01 +0100 (Wed, 12 Oct 2005) > New Revision: 4908 > > Log: > Notify the tool via tool_discard_basic_block_info() about translations > thrown away due to lack of space. I think this is bad for cachegrind, as it will loose debug info relationship for counters, only because the translation cache is full. If cachegrind reports a total of 20 MEvents, and for 10 MEvents the relation to source code is lost, the whole profiling is questionable. Better would be to add a boolean argument which specifies if the discarding was because of unmapping of the BB, i.e. void (*tool_discard_basic_block_info)(VexGuestExtents, Bool isUnmapped) Josef |
|
From: Nicholas N. <nj...@cs...> - 2005-10-12 14:26:33
|
On Wed, 12 Oct 2005, Josef Weidendorfer wrote: >> Log: >> Notify the tool via tool_discard_basic_block_info() about translations >> thrown away due to lack of space. > > I think this is bad for cachegrind, as it will loose debug info > relationship for counters, only because the translation cache is full. > If cachegrind reports a total of 20 MEvents, and for 10 MEvents the > relation to source code is lost, the whole profiling is questionable. No; I'm currently replying to your other mail where I'll address this issue... N |
|
From: Julian S. <js...@ac...> - 2005-10-12 14:34:28
|
> void (*tool_discard_basic_block_info)(VexGuestExtents, Bool isUnmapped) That sounds reasonable to me (cachegrind can ignore the bool) (except I would invert the sense of the bool), but let's see what Nick has to say. J |
|
From: Nicholas N. <nj...@cs...> - 2005-10-12 14:40:36
|
On Wed, 12 Oct 2005, Julian Seward wrote: >> void (*tool_discard_basic_block_info)(VexGuestExtents, Bool isUnmapped) > > That sounds reasonable to me (cachegrind can ignore the bool) > (except I would invert the sense of the bool), but let's see > what Nick has to say. It might be useful to some tools, but Cachegrind doesn't need it, as I explained in my other message. Nick |