Skip to content

Instantly share code, notes, and snippets.

@joestringer
Created September 1, 2016 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joestringer/4e7dd3ceb8e9e9bebfd7cb41bbe97e2d to your computer and use it in GitHub Desktop.
Save joestringer/4e7dd3ceb8e9e9bebfd7cb41bbe97e2d to your computer and use it in GitHub Desktop.
Kernel gcov recipe
09:25 < lrichard> Enable gcov kernel profiling in kernel config (CONFIG_GCOV_KERNEL)
09:25 < lrichard> Add "GCOV_PROFILE := y" to net/openvswitch/Makefile
09:25 < lrichard> Build kernel, install, reboot
09:25 < lrichard> Execute some tests involving kernel ovs data-plane...
09:25 < lrichard> mkdir -p /tmp/lcov
09:25 < lrichard> lcov -b /path/to/kernel/build/ -q -c --rc lcov_branch_coverage=1 -o /tmp/lcov/coverage.info
09:25 < lrichard> genhtml -q --branch-coverage --num-spaces 4 -o /tmp/lcov /tmp/lcov/coverage.info
09:25 < lrichard> firefox /tmp/lcov/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment