Hi Cristi, > I was wondering if there is a way to use run.istats to generate the > coverage just for the interesting source files (i.e., not for the > library files). If this is possible, it wouldn't be necessary to > replay the test cases and use gcov to get the coverage results.
We actually have a feature in our local Stanford KLEE repository that accepts a file with a list of routines to ignore for the purposes of calculating coverage statistics. I don't think it affects the run.istats output, though. It definitely affects the output of "--write-cov," which outputs files listing the newly covered lines for each testcase generated. I'll submit a patch to Daniel to add this functionality to the public repo (and CC you). > > In your experience, does run.istats reliably show the coverage > information (or the uncovered lines) when running with klee > --optimize? I tried with echo.bc and did not see what I was expecting, > kcachegrind did not display any uncovered lines in echo.c, as it was > supposed to. Some of the LLVM optimization passes tend to obscure the original source lines, unfortunately. I've been noticing this, too. For truly representative coverage on optimized programs, gcov is really the only way to go. Any other method is just an approximation. Daniel, please correct me if I'm wrong here. > Finally, since Klee generates statistics when it covers new lines, > would it be possible to take the information from run.istats and view > what coverage results were obtained at each moment of time? (Something > like an iterative coverage monitor). I don't think this can be done at the moment. You can graph the total coverage percentages over time using run.stats. This won't give you the individual source lines, though. -David
