Bill Williams <bill <at> cs.wisc.edu> writes:
...
> There are a couple of ways you can go here, with varying levels of
> programmer and execution overhead. You can use BPatch_malloc to create
> instrumentation variables of complex data types and manipulate their
> fields with snippets, or you can inject an instrumentation library. The
> standard technique when using an instrumentation library would be to
> insert a call to some function that updates your assorted in-memory data
> structures. In either case, you'd then register an exit callback that
> will serialize the results to disk. The instrumentation library tends to
> be easier to implement, and as your data structures grow more complex,
> it will tend to be more efficient as well.
>
Ah, instrumentation library sounds like the way to go then. If I understand
this it means that I'd need to define the in-memory data structure that
the instrumentation library would manipulate/update and the exit callback
would access this data structure to write it to disk, right?
Also, the library should be a shared lib (.so) and not an archive (.a), right?
-Wayne
|