diff --git a/libbpf-tools/memleak.c b/libbpf-tools/memleak.c index 16db6023bee8..4e416a7fd9b0 100644 --- a/libbpf-tools/memleak.c +++ b/libbpf-tools/memleak.c @@ -200,8 +200,8 @@ static const struct argp_option argp_options[] = { {"wa-missing-free", 'F', 0, 0, "workaround to alleviate misjudgments when free is missing", 0 }, {"sample-rate", 's', "SAMPLE_RATE", 0, "sample every N-th allocation to decrease the overhead", 0 }, {"top", 'T', "TOP_STACKS", 0, "display only this many top allocating stacks (by size)", 0 }, - {"min-size", 'z', "MIN_SIZE", 0, "capture only allocations larger than this size", 0 }, - {"max-size", 'Z', "MAX_SIZE", 0, "capture only allocations smaller than this size", 0 }, + {"min-size", 'z', "MIN_SIZE", 0, "capture only allocations larger than or equal to this size", 0 }, + {"max-size", 'Z', "MAX_SIZE", 0, "capture only allocations smaller than or equal to this size", 0 }, {"obj", 'O', "OBJECT", 0, "attach to allocator functions in the specified object", 0 }, {"percpu", 'P', NULL, 0, "trace percpu allocations", 0 }, {"symbols-prefix", 'S', "SYMBOLS_PREFIX", 0, "memory allocator symbols prefix", 0 }, diff --git a/tools/memleak.py b/tools/memleak.py index 5003ac36c344..5948c4b4cd0e 100755 --- a/tools/memleak.py +++ b/tools/memleak.py @@ -104,9 +104,9 @@ def run_command_get_pid(command): parser.add_argument("-T", "--top", type=int, default=10, help="display only this many top allocating stacks (by size)") parser.add_argument("-z", "--min-size", type=int, - help="capture only allocations larger than this size") + help="capture only allocations larger than or equal to this size") parser.add_argument("-Z", "--max-size", type=int, - help="capture only allocations smaller than this size") + help="capture only allocations smaller than or equal to this size") parser.add_argument("-O", "--obj", type=str, default="c", help="attach to allocator functions in the specified object") parser.add_argument("--ebpf", action="store_true", diff --git a/tools/memleak_example.txt b/tools/memleak_example.txt index 05e8badcb510..4d4a2665dfc6 100644 --- a/tools/memleak_example.txt +++ b/tools/memleak_example.txt @@ -217,9 +217,9 @@ optional arguments: sample every N-th allocation to decrease the overhead -T TOP, --top TOP display only this many top allocating stacks (by size) -z MIN_SIZE, --min-size MIN_SIZE - capture only allocations larger than this size + capture only allocations larger than or equal to this size -Z MAX_SIZE, --max-size MAX_SIZE - capture only allocations smaller than this size + capture only allocations smaller than or equal to this size -O OBJ, --obj OBJ attach to allocator functions in the specified object --sort KEY report sorted in given key; available key list: size, count