• Home
  • Raw
  • Download

Lines Matching refs:map

22 int pm_map_pagemap(pm_map_t *map, uint64_t **pagemap_out, size_t *len) {  in pm_map_pagemap()  argument
23 if (!map) in pm_map_pagemap()
26 return pm_process_pagemap_range(map->proc, map->start, map->end, in pm_map_pagemap()
30 int pm_map_usage_flags(pm_map_t *map, pm_memusage_t *usage_out, in pm_map_usage_flags() argument
38 if (!map || !usage_out) in pm_map_usage_flags()
41 error = pm_map_pagemap(map, &pagemap, &len); in pm_map_usage_flags()
47 usage.vss += map->proc->ker->pagesize; in pm_map_usage_flags()
55 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags()
63 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags()
67 usage.rss += (count >= 1) ? map->proc->ker->pagesize : (0); in pm_map_usage_flags()
68 usage.pss += (count >= 1) ? (map->proc->ker->pagesize / count) : (0); in pm_map_usage_flags()
69 usage.uss += (count == 1) ? (map->proc->ker->pagesize) : (0); in pm_map_usage_flags()
71 usage.swap += map->proc->ker->pagesize; in pm_map_usage_flags()
85 int pm_map_usage(pm_map_t *map, pm_memusage_t *usage_out) { in pm_map_usage() argument
86 return pm_map_usage_flags(map, usage_out, 0, 0); in pm_map_usage()
89 int pm_map_workingset(pm_map_t *map, pm_memusage_t *ws_out) { in pm_map_workingset() argument
96 if (!map || !ws_out) in pm_map_workingset()
99 error = pm_map_pagemap(map, &pagemap, &len); in pm_map_workingset()
105 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_workingset()
112 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_workingset()
116 ws.vss += map->proc->ker->pagesize; in pm_map_workingset()
118 ws.rss += (count >= 1) ? (map->proc->ker->pagesize) : (0); in pm_map_workingset()
119 ws.pss += (count >= 1) ? (map->proc->ker->pagesize / count) : (0); in pm_map_workingset()
120 ws.uss += (count == 1) ? (map->proc->ker->pagesize) : (0); in pm_map_workingset()
133 int pm_map_destroy(pm_map_t *map) { in pm_map_destroy() argument
134 if (!map) in pm_map_destroy()
137 free(map->name); in pm_map_destroy()
138 free(map); in pm_map_destroy()