|
From: Josef W. <Jos...@gm...> - 2004-03-15 19:39:01
|
On Monday 15 March 2004 15:07, Nicholas Nethercote wrote:
> On Sun, 14 Mar 2004, Josef Weidendorfer wrote:
> > I think that for coverage, you *need* also the number of distinct
> > instruction never touched. Currenty, Cachegrind does not do this.
>
> Oh, yeah. And that's hard to find, since it never instruments code it
> never sees Maybe it could be done somehow in the post-annotation script.
I made a small skin for this some time ago, which translates all basic blocks
with debug info into UCode using VG_(disBB), and writes out a cachegrind.out
file for instructions found. Unfortunately, I had to do
=========================================
...
/* functions from valgrind core not found in vg_skin.h ;-( */
extern UCodeBlock* VG_(alloc_UCodeBlock) ( void );
extern Int VG_(disBB) ( UCodeBlock* cb, Addr eip0 );
/* Expandable arrays of uinstrs. */
struct _UCodeBlock {
Addr orig_eip;
Int used;
Int size;
UInstr* instrs;
Int nextTemp;
};
...
cb = VG_(alloc_UCodeBlock)();
cb->orig_eip = addr;
size = VG_(disBB)(cb, addr);
...
============================================
Opinions on putting
VG_(alloc_UCodeBlock)(Addr orig_eip)
VG_(disBB) ( UCodeBlock*, Addr)
into vg_skin.h ?
Josef
>
> N
|