Skip to content

Commit

Permalink
libbpf-tools/memleak: Add verbose option (iovisor#4899)
Browse files Browse the repository at this point in the history
Add -v(--verbose) option to display libbpf log

Co-authored-by: Eunseon Lee <[email protected]>
  • Loading branch information
ekyooo and ekyooo committed Feb 6, 2024
1 parent 0ccffc7 commit 2f915b9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libbpf-tools/memleak.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static const struct argp_option argp_options[] = {
{"max-size", 'Z', "MAX_SIZE", 0, "capture only allocations smaller than this size"},
{"obj", 'O', "OBJECT", 0, "attach to allocator functions in the specified object"},
{"percpu", 'P', NULL, 0, "trace percpu allocations"},
{"verbose", 'v', NULL, 0, "verbose debug output" },
{},
};

Expand Down Expand Up @@ -541,6 +542,9 @@ error_t argp_parse_arg(int key, char *arg, struct argp_state *state)
case 'P':
env.percpu = true;
break;
case 'v':
env.verbose = true;
break;
case ARGP_KEY_ARG:
pos_args++;

Expand Down

0 comments on commit 2f915b9

Please sign in to comment.