|
From: Oswald B. <os...@kd...> - 2006-09-02 11:45:27
|
On Sat, Sep 02, 2006 at 12:17:34PM +0100, Julian Seward wrote: > On Saturday 02 September 2006 08:22, Oswald Buddenhagen wrote: > > On Sat, Sep 02, 2006 at 03:18:56AM +0100, Julian Seward wrote: > > > Recording program counters without a stack is of limited use, but I > > > can't see how to record a complete stack for each first-write without > > > huge space/time overheads. It might be possible to devise a highly > > > compressed representation for just the PC values, based on the idea > > > that each segment is only going to use a tiny subset of the 2^32/2^64 > > > possible PC values. > > > > i think saving traces in a tree might work. sounds a bit like callgrind. > > Can you give a bit more detail on that? I'm not sure what you mean. > each stacktrace can be represented as a PC and a pointer to the remaining stacktrace. obviously, multiple PCs can have the same remaining trace, so you get a tree if you merge them. to be able to coalesce the lists into a tree actually, each node needs to know its children. the matching of the trace with the existing tree can be done each time on a complete backtrace, which is prohibitively expensive, or gradually by tracking the call graph (and discarding unused nodes upon fn ret). i the end, each "writing incident" can be represented by the written address and a pointer to a "backtrace leaf". of course one can still compress the addresses, have specialized containers with distance pointers instead of full addresses, etc., but this obviously goes at the cost of performance. i didn't do the math, so i have no idea whether that would *actually* work - that's up to you. :) -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. |