From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10E7039021F for ; Wed, 22 Jul 2026 02:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784687895; cv=none; b=S52RwGTNVNJTeVnYKbdLO/fxzeKWbbB+xm120TFKLM7b4Sq00ljAkT40Cif/e08df1oam0Cp/E4RWT1R6EIxHGLsC4r5yApeqbhqiOkjYycFcGyD2Md2PLBfZoPCO/QnZxXLenaTNclmDKqtgvFuFIamBT8/XwV8sqoURQvdyW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784687895; c=relaxed/simple; bh=hqiVirNhAxzE05TNxY2ZAdGDDmsJ1vVU7i6kKaw6O9Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B1EcxKJWDBxpk3XD3o5GVeIVUDaDaf4zFG9jB+xEbLmqVnEwglkEXDTEhnMZnHuSZSvmhZ3b9EpCEPnEsCKee58tXjeYvnA0UDNOFE1tX59I228Zko5BKibuOCkFTJG2nr7je6IVJLKh18+7Dig54nTwYmgPFGJHjlLsL/Uv+yg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CHwvJqY9; arc=none smtp.client-ip=91.218.175.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CHwvJqY9" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784687890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xcXo/rp9lf5MHL56oBcTVaqzJO6EIK+nDvQX1m6EcZw=; b=CHwvJqY9d1sj/rJecTZrAu3S91sbYI2+l89uTlpF79frfbvLnfz8w30Znc4r8nKthtKYRT LvKt9FQAJdtwZfTDGq9rODamsPUOSvapgHVlxYHymAijUfuzY7/zxi+gfM4zHZmlctCjet 03JQyIo1FFq1IzmAZtl4RL5uUXnr9t4= From: Ye Liu To: Andrew Morton Cc: Ye Liu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] tools/mm/page_owner_sort: show available sort keys in usage text Date: Wed, 22 Jul 2026 10:37:26 +0800 Message-Id: <20260722023726.600200-4-ye.liu@linux.dev> In-Reply-To: <20260722023726.600200-1-ye.liu@linux.dev> References: <20260722023726.600200-1-ye.liu@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Ye Liu The --sort option accepts abbreviated or complete key names, but the usage text never listed them. Users had to read the source or the documentation to discover valid keys. List all available keys (full form and abbreviation) with a brief description and examples directly in the --sort help section. Signed-off-by: Ye Liu --- tools/mm/page_owner_sort.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/mm/page_owner_sort.c b/tools/mm/page_owner_sort.c index 22e1761468d4..7a1bc054d295 100644 --- a/tools/mm/page_owner_sort.c +++ b/tools/mm/page_owner_sort.c @@ -762,6 +762,15 @@ static void usage(void) "\t\t\targument in the form of a comma-separated list with some\n" "\t\t\tcommon fields predefined (pid, tgid, comm, stacktrace, allocator, module)\n" "--sort \t\tSpecify sort order as: [+|-]key[,[+|-]key[,...]]\n" + "\t\t\tAvailable keys:\n" + "\t\t\t pid(p), tgid(tg), name(n), stacktrace(st),\n" + "\t\t\t txt(T), alloc_ts(at), allocator(ator), module(mod)\n" + "\t\t\tThe \"+\" is optional since default direction is\n" + "\t\t\tincreasing numerical or lexicographic order.\n" + "\t\t\tMixed use of abbreviated and complete-form is allowed.\n" + "\t\t\tExamples:\n" + "\t\t\t --sort=n,+pid,-tgid\n" + "\t\t\t --sort=mod,at\n" ); } -- 2.25.1