Created
November 8, 2018 14:55
-
-
Save eric100lin/1113939e15f0023c09e83916d7fa0a59 to your computer and use it in GitHub Desktop.
Collect gcov runtime data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Execute tar_gcda_results.sh | |
sh tar_gcda_results.sh | |
# Untar gcda results | |
tar zxvf kernel_part_gcda.tar.gz -C / | |
tar zxvf non_kernel_part_gcda.tar.gz -C / | |
# Process coverage info | |
lcov --capture --rc lcov_branch_coverage=1 --directory $OBJ_PATH --output-file coverage.info | |
genhtml coverage.info --rc lcov_branch_coverage=1 --output-directory out_html | |
# tar as out_html.tar.gz | |
tar zcvf coverage_out_html.tar.gz out_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Need to use "busybox tar" instead of "tar" to avoid file name length limit(long symbolic link of *.gcno) | |
#Kernel Part Gcda results: tar *.gcda and *.gcno(symbolic link) | |
echo "Kernel Part Gcda results: tar *.gcda and *.gcno(symbolic link)" | |
cd /sys/kernel/debug/gcov | |
find * -type f -name '*.gcda' -o -type l -name '*.gcno' | xargs busybox tar zcvf kernel_part_gcda.tar.gz | |
#Non kernel Part Gcda results: tar *.gcda | |
echo "Non kernel Part Gcda results: tar *.gcda" | |
cd /data/out_gcda | |
find * -type f -name '*.gcda' | xargs busybox tar zcvf non_kernel_part_gcda.tar.gz | |
sync;sync;sync |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment