Add an option for using smaps_rollup 96/287896/2
authorSung-hun Kim <sfoon.kim@samsung.com>
Tue, 7 Feb 2023 09:46:36 +0000 (18:46 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Tue, 7 Feb 2023 11:45:22 +0000 (20:45 +0900)
commitf870732b3fa18a5a1de57568ba922c27b4f6733a
treef7c808956284322bd246be40302ae1ce814c5d0f
parent0c9b0923b34047adcd9b7571dbe16fada1550d48
Add an option for using smaps_rollup

Recent Linux kernel provides an entry in procfs, namely smaps_rollup,
to improve performance of user programs which want to get the statistics
of process memory like memps.

This patch add an option for using smaps_rollup. If the target kernel
does not provide smaps_rollup, memps falls back to default lookup path
which traverses the smaps file of the process.

Change-Id: I377e00f5eb92f5ba97c583329198f39741e6b2d2
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
memps.c