summaryrefslogtreecommitdiff
path: root/tools/mm
diff options
context:
space:
mode:
authorSteve Chou <steve_chou@pesi.com.tw>2023-04-11 11:49:28 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-04-16 10:41:25 -0700
commit9235756885e865070c4be2facda75262dbd85967 (patch)
tree20a6c21f25ce504dcb0a85c32ed20ca32de256a5 /tools/mm
parentd2c115baae6f793b5b01cff67799da17ffb1eda5 (diff)
tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used
When using cull option with 'tg' flag, the fprintf is using pid instead of tgid. It should use tgid instead. Link: https://lkml.kernel.org/r/20230411034929.2071501-1-steve_chou@pesi.com.tw Fixes: 9c8a0a8e599f4a ("tools/vm/page_owner_sort.c: support for user-defined culling rules") Signed-off-by: Steve Chou <steve_chou@pesi.com.tw> Cc: Jiajian Ye <yejiajian2018@email.szu.edu.cn> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/mm')
-rw-r--r--tools/mm/page_owner_sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mm/page_owner_sort.c b/tools/mm/page_owner_sort.c
index 7c2ac124cdc8..99798894b879 100644
--- a/tools/mm/page_owner_sort.c
+++ b/tools/mm/page_owner_sort.c
@@ -857,7 +857,7 @@ int main(int argc, char **argv)
if (cull & CULL_PID || filter & FILTER_PID)
fprintf(fout, ", PID %d", list[i].pid);
if (cull & CULL_TGID || filter & FILTER_TGID)
- fprintf(fout, ", TGID %d", list[i].pid);
+ fprintf(fout, ", TGID %d", list[i].tgid);
if (cull & CULL_COMM || filter & FILTER_COMM)
fprintf(fout, ", task_comm_name: %s", list[i].comm);
if (cull & CULL_ALLOCATOR) {