Skip to content

Commit 9235756

Browse files
ssychouakpm00
authored andcommitted
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/[email protected] Fixes: 9c8a0a8 ("tools/vm/page_owner_sort.c: support for user-defined culling rules") Signed-off-by: Steve Chou <[email protected]> Cc: Jiajian Ye <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent d2c115b commit 9235756

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/mm/page_owner_sort.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ int main(int argc, char **argv)
857857
if (cull & CULL_PID || filter & FILTER_PID)
858858
fprintf(fout, ", PID %d", list[i].pid);
859859
if (cull & CULL_TGID || filter & FILTER_TGID)
860-
fprintf(fout, ", TGID %d", list[i].pid);
860+
fprintf(fout, ", TGID %d", list[i].tgid);
861861
if (cull & CULL_COMM || filter & FILTER_COMM)
862862
fprintf(fout, ", task_comm_name: %s", list[i].comm);
863863
if (cull & CULL_ALLOCATOR) {

0 commit comments

Comments
 (0)