ponsheng Chen

@NXMWftyBQtOEnS7Ld6eKeg

Joined on Sep 20, 2016

  • 簡介 gcov 是一個測量程式執行 coverage 的工具,原理是編譯程式時在所有branch上插入紀錄函式 便可得知執行期間的執行狀況 通常 gcov 會用在一般 C/C++ 程式上,但是 Linux Kernel 其實也支援 gcov profiling,因此可以用 gcov 來紀錄 Linux Kernel 的 Coverage,當然 Kernel module 也不例外 這篇會分享用 gcov profiling Kernel module 的步驟 1. Kerenl 支援 先確定 Kernel 有支援 gcov profiling,可以在察看現在的 kernel 的 config 是否有以下參數,沒有的話要自己重新編譯一個
     Like  Bookmark