PROFILE_mmap_anon_no_contig_phys: profile ANON mmap()s that couldn't be backed by contiguous physical memory
This commit is contained in:
@ -34,6 +34,7 @@ struct profile_event {
|
|||||||
enum profile_event_type {
|
enum profile_event_type {
|
||||||
PROFILE_page_fault = PROFILE_EVENT_MIN,
|
PROFILE_page_fault = PROFILE_EVENT_MIN,
|
||||||
PROFILE_mpol_alloc_missed,
|
PROFILE_mpol_alloc_missed,
|
||||||
|
PROFILE_mmap_anon_no_contig_phys,
|
||||||
PROFILE_EVENT_MAX /* Should be the last event type */
|
PROFILE_EVENT_MAX /* Should be the last event type */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -59,6 +59,7 @@ char *profile_event_names[] =
|
|||||||
{
|
{
|
||||||
"page_fault",
|
"page_fault",
|
||||||
"mpol_alloc_missed",
|
"mpol_alloc_missed",
|
||||||
|
"mmap_anon_no_contig_phys",
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1242,6 +1242,9 @@ do_mmap(const intptr_t addr0, const size_t len0, const int prot,
|
|||||||
vrflags |= VR_DEMAND_PAGING;
|
vrflags |= VR_DEMAND_PAGING;
|
||||||
populated_mapping = 0;
|
populated_mapping = 0;
|
||||||
|
|
||||||
|
#ifdef PROFILE_ENABLE
|
||||||
|
profile_event_add(PROFILE_mmap_anon_no_contig_phys, len);
|
||||||
|
#endif // PROFILE_ENABLE
|
||||||
error = zeroobj_create(&memobj);
|
error = zeroobj_create(&memobj);
|
||||||
if (error) {
|
if (error) {
|
||||||
ekprintf("%s: zeroobj_create failed, error: %d\n",
|
ekprintf("%s: zeroobj_create failed, error: %d\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user