PROFILE_page_fault_XXX: more detailed page PF profiling
This commit is contained in:
@ -414,6 +414,9 @@ static void fileobj_do_pageio(void *args0)
|
||||
if (to_memobj(obj)->flags & MF_ZEROFILL) {
|
||||
void *virt = phys_to_virt(page_to_phys(page));
|
||||
memset(virt, 0, PAGE_SIZE);
|
||||
#ifdef PROFILE_ENABLE
|
||||
profile_event_add(PROFILE_page_fault_file_clr, PAGE_SIZE);
|
||||
#endif // PROFILE_ENABLE
|
||||
}
|
||||
else {
|
||||
page->mode = PM_PAGEIO;
|
||||
|
||||
@ -33,6 +33,8 @@ struct profile_event {
|
||||
*/
|
||||
enum profile_event_type {
|
||||
PROFILE_page_fault = PROFILE_EVENT_MIN,
|
||||
PROFILE_page_fault_anon_clr,
|
||||
PROFILE_page_fault_file_clr,
|
||||
PROFILE_mpol_alloc_missed,
|
||||
PROFILE_mmap_anon_contig_phys,
|
||||
PROFILE_mmap_anon_no_contig_phys,
|
||||
|
||||
@ -1676,6 +1676,9 @@ retry:
|
||||
}
|
||||
dkprintf("%s: clearing 0x%lx:%lu\n",
|
||||
__FUNCTION__, pgaddr, pgsize);
|
||||
#ifdef PROFILE_ENABLE
|
||||
profile_event_add(PROFILE_page_fault_anon_clr, pgsize);
|
||||
#endif // PROFILE_ENABLE
|
||||
memset(virt, 0, pgsize);
|
||||
phys = virt_to_phys(virt);
|
||||
if (phys_to_page(phys)) {
|
||||
|
||||
@ -58,6 +58,8 @@ extern char *syscall_name[];
|
||||
char *profile_event_names[] =
|
||||
{
|
||||
"page_fault",
|
||||
"page_fault_anon_clr_mem",
|
||||
"page_fault_file_clr_mem",
|
||||
"mpol_alloc_missed",
|
||||
"mmap_anon_contig_phys",
|
||||
"mmap_anon_no_contig_phys",
|
||||
|
||||
Reference in New Issue
Block a user