how to count the fault pages and the mapped pages
I define two static variables in linux\mm.h, fault_pages and mapped_pages to count the fault pages and the mapped pages.
In the function do_mmap() (linu\mm.h), I added a sentence :
mapped_pages+=len;
and in the function do_page_fault() (arch\i386\mm\fault.c) , I added :
fault_pages++;
Can I use this way to count the fault pages and the mapped pages?
I am fresh, and doing some practice of the linux kernel.
Thank you for your help!!!
|