fsatrace icon indicating copy to clipboard operation
fsatrace copied to clipboard

Quantifying fsatrace's coverage

Open samth opened this issue 3 years ago • 2 comments

For a paper we're writing about Rattle (which uses fsatrace) we'd like to quantify in some way how much of the filesystem API fsatrace covers. Right now, it looks like 25 functions are overridden on Linux, which is my estimate just by grepping for R(. Is that accurate? Is there a way to tell how many relevant functions glibc provides? Or anything else in this neighborhood?

cc @ndmitchell @spall

samth avatar Aug 10 '20 18:08 samth

Grepping for R( won't do it, since there're some #ifdefs and some bare calls to resolv. I guess you can invoke a preprocessor pass via gcc -E and count the resolv( occurrences (subtract 1 for the definition itself).

As to figuring out the glibc functions, no idea. I picked that set using nm, looking at the weak symbols in the library and trying to figure out which ones were relevant. But I guess there must be some documentation.

Please, share the results, I might have missed a bunch of hooks.

jacereda avatar Aug 11 '20 05:08 jacereda

I ended up looking manually, and counting the calls to resolv etc. I have been unable to find anything that mentions xlstat at all, so my documentation search was pretty fruitless.

samth avatar Sep 08 '20 02:09 samth