Skip to content

Commit

Permalink
tools/vm/page_owner_sort.c: remove -c option
Browse files Browse the repository at this point in the history
The -c option is used to cull by stacktrace.  Now, --cull option has
been Added in page_owner_sort.c.  Culling by stacktrace is one of the
function of "--cull".  No need to set an extra parameter.  So remove -c
option.

Remove parsing of -c when parse parameter and remove "-c" from usage.

This work is coauthored by
        Shenghong Han
        Yixuan Cao
        Chongxi Zhao
        Jiajian Ye
        Yuhong Feng
        Yongqiang Liu

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Yinan Zhang <[email protected]>
Cc: Chongxi Zhao <[email protected]>
Cc: Georgi Djakov <[email protected]>
Cc: Jiajian Ye <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Sean Anderson <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Tang Bin <[email protected]>
Cc: Yixuan Cao <[email protected]>
Cc: Yongqiang Liu <[email protected]>
Cc: Yuhong Feng <[email protected]>
Cc: Zhenliang Wei <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Yinan Zhang authored and torvalds committed Apr 1, 2022
1 parent ada543a commit d8b7b3f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tools/vm/page_owner_sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ static void usage(void)
"-n\t\tSort by task command name.\n"
"-a\t\tSort by memory allocate time.\n"
"-r\t\tSort by memory release time.\n"
"-c\t\tCull by comparing stacktrace instead of total block.\n"
"-f\t\tFilter out the information of blocks whose memory has been released.\n"
"--pid <PID>\tSelect by pid. This selects the information of blocks whose process ID number equals to <PID>.\n"
"--tgid <TGID>\tSelect by tgid. This selects the information of blocks whose Thread Group ID number equals to <TGID>.\n"
Expand All @@ -466,14 +465,11 @@ int main(int argc, char **argv)
{ 0, 0, 0, 0},
};

while ((opt = getopt_long(argc, argv, "acfmnprstP", longopts, NULL)) != -1)
while ((opt = getopt_long(argc, argv, "afmnprstP", longopts, NULL)) != -1)
switch (opt) {
case 'a':
cmp = compare_ts;
break;
case 'c':
cull = cull | CULL_STACKTRACE;
break;
case 'f':
filter = filter | FILTER_UNRELEASE;
break;
Expand Down

0 comments on commit d8b7b3f

Please sign in to comment.