Home
last modified time | relevance | path

Searched refs:ker (Results 1 – 9 of 9) sorted by relevance

/system/extras/libpagemap/
Dpm_kernel.c29 pm_kernel_t *ker; in pm_kernel_create() local
35 ker = calloc(1, sizeof(*ker)); in pm_kernel_create()
36 if (!ker) in pm_kernel_create()
39 ker->kpagecount_fd = open("/proc/kpagecount", O_RDONLY); in pm_kernel_create()
40 if (ker->kpagecount_fd < 0) { in pm_kernel_create()
42 free(ker); in pm_kernel_create()
46 ker->kpageflags_fd = open("/proc/kpageflags", O_RDONLY); in pm_kernel_create()
47 if (ker->kpageflags_fd < 0) { in pm_kernel_create()
49 close(ker->kpagecount_fd); in pm_kernel_create()
50 free(ker); in pm_kernel_create()
[all …]
Dpm_map.c48 usage.vss += map->proc->ker->pagesize; in pm_map_usage_flags()
57 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags()
65 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_usage_flags()
69 usage.rss += (count >= 1) ? map->proc->ker->pagesize : (0); in pm_map_usage_flags()
70 usage.pss += (count >= 1) ? (map->proc->ker->pagesize / count) : (0); in pm_map_usage_flags()
71 usage.uss += (count == 1) ? (map->proc->ker->pagesize) : (0); in pm_map_usage_flags()
73 usage.swap += map->proc->ker->pagesize; in pm_map_usage_flags()
108 error = pm_kernel_flags(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_workingset()
115 error = pm_kernel_count(map->proc->ker, PM_PAGEMAP_PFN(pagemap[i]), in pm_map_workingset()
119 ws.vss += map->proc->ker->pagesize; in pm_map_workingset()
[all …]
Dpm_process.c33 int pm_process_create(pm_kernel_t *ker, pid_t pid, pm_process_t **proc_out) { in pm_process_create() argument
38 if (!ker || !proc_out) in pm_process_create()
45 proc->ker = ker; in pm_process_create()
125 firstpage = low / proc->ker->pagesize; in pm_process_pagemap_range()
126 numpages = (high - low) / proc->ker->pagesize; in pm_process_pagemap_range()
/system/extras/libpagemap/include/pagemap/
Dpagemap.h89 pm_kernel_t *ker; member
115 #define pm_kernel_pagesize(ker) ((ker)->pagesize) argument
120 int pm_kernel_pids(pm_kernel_t *ker, pid_t **pids_out, size_t *len);
124 int pm_kernel_count(pm_kernel_t *ker, uint64_t pfn, uint64_t *count_out);
128 int pm_kernel_flags(pm_kernel_t *ker, uint64_t pfn, uint64_t *flags_out);
161 int pm_kernel_destroy(pm_kernel_t *ker);
168 int pm_process_create(pm_kernel_t *ker, pid_t pid, pm_process_t **proc_out);
/system/extras/ksmutils/
Dksminfo.c70 pm_kernel_t *ker; in main() local
111 error = pm_kernel_create(&ker); in main()
119 error = pm_kernel_pids(ker, &pids, &num_procs); in main()
153 error = pm_process_create(ker, pids[i], &proc); in main()
195 pm_kernel_t *ker; in read_pages() local
211 ker = maps[0]->proc->ker; in read_pages()
217 data = malloc(pm_kernel_pagesize(ker)); in read_pages()
238 error = pm_kernel_flags(ker, PM_PAGEMAP_PFN(pagemap[j]), &flags); in read_pages()
247 vaddr = pm_map_start(maps[i]) + j * pm_kernel_pagesize(ker); in read_pages()
253 ssize_t len = read(fd, data, pm_kernel_pagesize(ker)); in read_pages()
[all …]
/system/extras/procmem/
Dprocmem.c46 pm_kernel_t *ker; in main() local
103 error = pm_kernel_create(&ker); in main()
110 pagesize = pm_kernel_pagesize(ker); in main()
112 error = pm_process_create(ker, pid, &proc); in main()
193 address = pm_map_start(mi->map) + j * ker->pagesize; in main()
198 error = pm_kernel_count(ker, PM_PAGEMAP_PFN(mapentry), &count); in main()
204 error = pm_kernel_flags(ker, PM_PAGEMAP_PFN(mapentry), &flags); in main()
/system/core/libmemtrack/
Dmemtrack_test.c76 pm_kernel_t *ker; in main() local
91 ret = pm_kernel_create(&ker); in main()
98 ret = pm_kernel_pids(ker, &pids, &num_procs); in main()
/system/extras/librank/
Dlibrank.c204 pm_kernel_t *ker; in main() local
321 error = pm_kernel_create(&ker); in main()
328 error = pm_kernel_pids(ker, &pids, &num_procs); in main()
335 error = pm_process_create(ker, pids[i], &proc); in main()
/system/extras/procrank/
Dprocrank.c177 pm_kernel_t *ker; in main() local
232 error = pm_kernel_create(&ker); in main()
239 error = pm_kernel_pids(ker, &pids, &num_procs); in main()
260 error = pm_process_create(ker, pids[i], &proc); in main()