|
From: Josef W. <Jos...@gm...> - 2005-04-25 16:00:07
|
On Monday 25 April 2005 17:08, Benoit Peccatte wrote: > Le ven 22/04/2005 =C3=A0 18:52, Josef Weidendorfer a =C3=A9crit : > > Ah, good. I didn't know you can iterate over debug info in a Valgrind > > tool. > > Well, I didn't use directly valgrind functions. I copied needed > structures from vg_symtab.h into the tool's header. I know that's not > perfectly clean, but it works for now. It would be good to have some iterator functions for debug info available f= or=20 tools. Structs are bad wrt. interface stability. > > header like > > event: Coverage =3D Executed / DebugInfo > > and will calculate everything itself. But note that currently there is = no > > support for parsing "/" in formulas. > > Ok, I understand now. Yes I would need the '/' then, but I can't see > where the '+' is parsed. =46ormulas for derived events are only possible in KCachegrind for the mome= nt.=20 Interpreting formulas should be not to difficult to add in a PERL script li= ke=20 cg_annotate (via "eval"). I'll try. > As the format is extensible, I'd like to keep a new information > associated with each file name : the soname where it has been found. > Can I add a so=3D... before fl=3D... ? Do you mean the file name of a shared library, or the soname defined in the= =20 shared library? The file name of the shared lib is stored in callgrind file= s=20 via "ob=3D" (meaning: ELF object). It would be nice if we could use the sam= e. BTW, what are you using this for? In callgrind, I can relate metrics to=20 instruction addresses, and KCachegrind has assembler annotation. It needs t= he=20 libraries file name to call "objdump" to get disassembled code. It seems quite natural for me to also do code coverage on this level. Then = you=20 would also get information for a source line like: "only 20% of instruction= s=20 attributed to this source line are executed". Josef |