profile: more detailed profiling of file PFs
This commit is contained in:
@ -231,6 +231,9 @@ static int devobj_get_page(struct memobj *memobj, off_t off, int p2align, uintpt
|
|||||||
|
|
||||||
memobj_lock(&obj->memobj);
|
memobj_lock(&obj->memobj);
|
||||||
pfn = obj->pfn_table[ix];
|
pfn = obj->pfn_table[ix];
|
||||||
|
#ifdef PROFILE_ENABLE
|
||||||
|
profile_event_add(PROFILE_page_fault_dev_file, PAGE_SIZE);
|
||||||
|
#endif // PROFILE_ENABLE
|
||||||
if (!(pfn & PFN_VALID)) {
|
if (!(pfn & PFN_VALID)) {
|
||||||
memobj_unlock(&obj->memobj);
|
memobj_unlock(&obj->memobj);
|
||||||
|
|
||||||
|
|||||||
@ -487,6 +487,10 @@ static int fileobj_get_page(struct memobj *memobj, off_t off,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PROFILE_ENABLE
|
||||||
|
profile_event_add(PROFILE_page_fault_file, PAGE_SIZE);
|
||||||
|
#endif // PROFILE_ENABLE
|
||||||
|
|
||||||
mcs_rwlock_writer_lock_noirq(&obj->page_hash_locks[hash],
|
mcs_rwlock_writer_lock_noirq(&obj->page_hash_locks[hash],
|
||||||
&mcs_node);
|
&mcs_node);
|
||||||
page = __fileobj_page_hash_lookup(obj, hash, off);
|
page = __fileobj_page_hash_lookup(obj, hash, off);
|
||||||
|
|||||||
@ -34,6 +34,8 @@ struct profile_event {
|
|||||||
enum profile_event_type {
|
enum profile_event_type {
|
||||||
PROFILE_page_fault = PROFILE_EVENT_MIN,
|
PROFILE_page_fault = PROFILE_EVENT_MIN,
|
||||||
PROFILE_page_fault_anon_clr,
|
PROFILE_page_fault_anon_clr,
|
||||||
|
PROFILE_page_fault_file,
|
||||||
|
PROFILE_page_fault_dev_file,
|
||||||
PROFILE_page_fault_file_clr,
|
PROFILE_page_fault_file_clr,
|
||||||
PROFILE_mpol_alloc_missed,
|
PROFILE_mpol_alloc_missed,
|
||||||
PROFILE_mmap_anon_contig_phys,
|
PROFILE_mmap_anon_contig_phys,
|
||||||
|
|||||||
@ -59,6 +59,8 @@ char *profile_event_names[] =
|
|||||||
{
|
{
|
||||||
"page_fault",
|
"page_fault",
|
||||||
"page_fault_anon_clr_mem",
|
"page_fault_anon_clr_mem",
|
||||||
|
"page_fault_file",
|
||||||
|
"page_fault_dev_file",
|
||||||
"page_fault_file_clr_mem",
|
"page_fault_file_clr_mem",
|
||||||
"mpol_alloc_missed",
|
"mpol_alloc_missed",
|
||||||
"mmap_anon_contig_phys",
|
"mmap_anon_contig_phys",
|
||||||
|
|||||||
Reference in New Issue
Block a user