From nobody Wed Feb 11 18:14:05 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85B40C7619A for ; Tue, 11 Apr 2023 03:57:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbjDKD5N (ORCPT ); Mon, 10 Apr 2023 23:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjDKD5L (ORCPT ); Mon, 10 Apr 2023 23:57:11 -0400 X-Greylist: delayed 392 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 10 Apr 2023 20:57:08 PDT Received: from pesi.com.tw (mail.pesi.com.tw [59.120.71.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77FA21BC9 for ; Mon, 10 Apr 2023 20:57:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by pesi.com.tw (Postfix) with SMTP id 1335C61170 for ; Tue, 11 Apr 2023 11:50:33 +0800 (CST) DKIM-Filter: OpenDKIM Filter v2.11.0 pesi.com.tw 1335C61170 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pesi.com.tw; s=default; t=1681185033; bh=GXg5TNPseTLX/q3lrTI4oKFUZtKZaCTZne4J784F/dY=; h=From:To:Cc:Subject:Date:From; b=r6BtIqbvJnIUQj/pR7cO5x/4yOHjGAitm7yPN5nivl6X8QO5T9krEq3IYHkviXbwx aXhvZxiTEZSWzSrh3T7ziALVSusXn7QrIPS9gUmFjHrdQ9kYFlefstqfanXOjQO5ap D5pYUVDMm20GdfWnhW6TZyCIyuDSSQt8dzysI8ow= Received: from localhost.localdomain (125-228-196-244.hinet-ip.hinet.net [125.228.196.244]) by pesi.com.tw (Postfix) with ESMTPA id C239961101; Tue, 11 Apr 2023 11:50:28 +0800 (CST) From: Steve Chou To: akpm@linux-foundation.org Cc: Steve Chou , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] tools/mm/page_owner_sort.c: fix TGID output when cull=tg is used Date: Tue, 11 Apr 2023 11:49:28 +0800 Message-Id: <20230411034929.2071501-1-steve_chou@pesi.com.tw> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When using cull option with 'tg' flag, the fprintf is using pid instead of tgid. It should use tgid instead. Signed-off-by: Steve Chou --- tools/mm/page_owner_sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { --=20 2.25.1