Recently in doing Cppunit test related work, with Gcov and Lcov tools to see the coverage of each line of code, the personal feel lcov awesome, looks very comfortable, point up is also very cool! ~~
Chatting to this point, as the title:
I'm using Lcov's--remove command.
remove/filter out remaining unwanted stuff from tracefile
Now we can remove the (remaining) stuff that we aren ' t interested in from the tracefile.
Lcov--remove/tmp/libreoffice_total.info '/usr/include/* '/usr/lib/* '/usr/local/src/libreoffice/*/ unpackedtarball/* '/usr/local/src/libreoffice/workdir/* '/usr/local/src/libreoffice/instdir/* '/usr/local/src/ libreoffice/external/* '-o/tmp/libreoffice_filtered.info
/usr/include/* and/usr/lib/* These two paths plus can filter out those system functions of the coverage information (iostream, etc.), if you want to filter other paths, then add it yourself! ~~
PS: The manual said--extract command seems to be possible, but I did not try.
-e tracefile pattern
--extract tracefile pattern
Extract data from tracefile.
Use this switch if you want to extract coverage data for only a
particular set of files from a tracefile. Additional command
line parameters will be interpreted as shell wildcard patterns
(note that they may need to be escaped accordingly to prevent
the shell from expanding them first). Every file entry in
tracefile which matches at least one of those patterns will be
extracted.
Reference Link: https://wiki.documentfoundation.org/Development/Lcov#patch_.27geninfo.27
Lcov manual:http://ltp.sourceforge.net/coverage/lcov/lcov.1.php