aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchantra <chantra@users.noreply.github.com>2024-04-30 11:57:27 -0700
committerGitHub <noreply@github.com>2024-04-30 11:57:27 -0700
commit74fe7200ffb1d991c4e839f184c705f0a45006d9 (patch)
tree2efe21b5b1a5df8d2ed1340316885ad558f06406
parent679166bdee74302b46b14c3a8fe5c3db7198d3f4 (diff)
downloadbcc-74fe7200ffb1d991c4e839f184c705f0a45006d9.tar.gz
libbpf-tools: enforce missing-field-initializers warning and error on warnings (#4975)
In an internal build where `missing-field-initializers` would be enforce, libbpf-tools would fail to build with an error similar to: ``` tcptop.c:75:9: error: missing initializer for field 'group' of 'const struct argp_option' [-Werror=missing-field-initializers] 75 | { "nosummary", 'S', NULL, 0, "Skip system summary line"}, | ^ In file included from tcptop.c:10: /usr/include/argp.h:73:7: note: 'group' declared here 73 | int group; | ^~~~~ ``` This change tacks the default group value of 0 to all `struct argp_option` used in libbpf-tools. At the same time, I am taking the opportunity to promote warnings to error in order to prevent regressions from making it in. Signed-off-by: Manu Bretelle <chantr4@gmail.com>
-rw-r--r--libbpf-tools/Makefile2
-rw-r--r--libbpf-tools/bashreadline.c6
-rw-r--r--libbpf-tools/bindsnoop.c14
-rw-r--r--libbpf-tools/biolatency.c18
-rw-r--r--libbpf-tools/biopattern.c8
-rw-r--r--libbpf-tools/biosnoop.c14
-rw-r--r--libbpf-tools/biostacks.c8
-rw-r--r--libbpf-tools/biotop.c12
-rw-r--r--libbpf-tools/bitesize.c10
-rw-r--r--libbpf-tools/cachestat.c6
-rw-r--r--libbpf-tools/capable.c20
-rw-r--r--libbpf-tools/cpudist.c18
-rw-r--r--libbpf-tools/cpufreq.c10
-rw-r--r--libbpf-tools/drsnoop.c12
-rw-r--r--libbpf-tools/execsnoop.c24
-rw-r--r--libbpf-tools/exitsnoop.c14
-rw-r--r--libbpf-tools/filelife.c6
-rw-r--r--libbpf-tools/filetop.c14
-rw-r--r--libbpf-tools/fsdist.c12
-rw-r--r--libbpf-tools/fsslower.c14
-rw-r--r--libbpf-tools/funclatency.c24
-rw-r--r--libbpf-tools/futexctn.c20
-rw-r--r--libbpf-tools/gethostlatency.c8
-rw-r--r--libbpf-tools/hardirqs.c14
-rw-r--r--libbpf-tools/javagc.c8
-rw-r--r--libbpf-tools/klockstat.c36
-rw-r--r--libbpf-tools/llcstat.c8
-rw-r--r--libbpf-tools/mdflush.c4
-rw-r--r--libbpf-tools/memleak.c30
-rw-r--r--libbpf-tools/mountsnoop.c10
-rw-r--r--libbpf-tools/numamove.c4
-rw-r--r--libbpf-tools/offcputime.c22
-rw-r--r--libbpf-tools/oomkill.c4
-rw-r--r--libbpf-tools/opensnoop.c24
-rw-r--r--libbpf-tools/profile.c24
-rw-r--r--libbpf-tools/readahead.c6
-rw-r--r--libbpf-tools/runqlat.c18
-rw-r--r--libbpf-tools/runqlen.c14
-rw-r--r--libbpf-tools/runqslower.c10
-rw-r--r--libbpf-tools/sigsnoop.c14
-rw-r--r--libbpf-tools/slabratetop.c12
-rw-r--r--libbpf-tools/softirqs.c12
-rw-r--r--libbpf-tools/solisten.c8
-rw-r--r--libbpf-tools/statsnoop.c10
-rw-r--r--libbpf-tools/syncsnoop.c4
-rw-r--r--libbpf-tools/syscount.c26
-rw-r--r--libbpf-tools/tcpconnect.c22
-rw-r--r--libbpf-tools/tcpconnlat.c10
-rw-r--r--libbpf-tools/tcplife.c18
-rw-r--r--libbpf-tools/tcppktlat.c16
-rw-r--r--libbpf-tools/tcprtt.c26
-rw-r--r--libbpf-tools/tcpstates.c16
-rw-r--r--libbpf-tools/tcpsynbl.c10
-rw-r--r--libbpf-tools/tcptop.c20
-rw-r--r--libbpf-tools/tcptracer.c16
-rw-r--r--libbpf-tools/vfsstat.c4
-rw-r--r--libbpf-tools/wakeuptime.c16
57 files changed, 395 insertions, 395 deletions
diff --git a/libbpf-tools/Makefile b/libbpf-tools/Makefile
index 0ae0d861..c5d4cc1d 100644
--- a/libbpf-tools/Makefile
+++ b/libbpf-tools/Makefile
@@ -9,7 +9,7 @@ LIBBPF_SRC := $(abspath ../src/cc/libbpf/src)
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
LIBBLAZESYM_SRC := $(abspath blazesym/target/release/libblazesym.a)
INCLUDES := -I$(OUTPUT) -I../src/cc/libbpf/include/uapi
-CFLAGS := -g -O2 -Wall
+CFLAGS := -g -O2 -Wall -Wmissing-field-initializers -Werror
BPFCFLAGS := -g -O2 -Wall
INSTALL ?= install
prefix ?= /usr/local
diff --git a/libbpf-tools/bashreadline.c b/libbpf-tools/bashreadline.c
index 41b6a600..a83141e8 100644
--- a/libbpf-tools/bashreadline.c
+++ b/libbpf-tools/bashreadline.c
@@ -35,9 +35,9 @@ const char argp_program_doc[] =
" bashreadline -s /usr/lib/libreadline.so\n";
static const struct argp_option opts[] = {
- { "shared", 's', "PATH", 0, "the location of libreadline.so library" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "shared", 's', "PATH", 0, "the location of libreadline.so library", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/bindsnoop.c b/libbpf-tools/bindsnoop.c
index 00cc834c..8247dc8f 100644
--- a/libbpf-tools/bindsnoop.c
+++ b/libbpf-tools/bindsnoop.c
@@ -64,13 +64,13 @@ const char argp_program_doc[] =
" SOL_SOCKET SO_REUSEPORT ....r\n";
static const struct argp_option opts[] = {
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "failed", 'x', NULL, 0, "Include errors on output." },
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "ports", 'P', "PORTS", 0, "Comma-separated list of ports to trace." },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "failed", 'x', NULL, 0, "Include errors on output.", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "ports", 'P', "PORTS", 0, "Comma-separated list of ports to trace.", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/biolatency.c b/libbpf-tools/biolatency.c
index 1a730f50..7ba55be5 100644
--- a/libbpf-tools/biolatency.c
+++ b/libbpf-tools/biolatency.c
@@ -58,15 +58,15 @@ const char argp_program_doc[] =
" biolatency -c CG # Trace process under cgroupsPath CG\n";
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "milliseconds", 'm', NULL, 0, "Millisecond histogram" },
- { "queued", 'Q', NULL, 0, "Include OS queued time in I/O time" },
- { "disk", 'D', NULL, 0, "Print a histogram per disk device" },
- { "flag", 'F', NULL, 0, "Print a histogram per set of I/O flags" },
- { "disk", 'd', "DISK", 0, "Trace this disk only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path"},
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "milliseconds", 'm', NULL, 0, "Millisecond histogram", 0 },
+ { "queued", 'Q', NULL, 0, "Include OS queued time in I/O time", 0 },
+ { "disk", 'D', NULL, 0, "Print a histogram per disk device", 0 },
+ { "flag", 'F', NULL, 0, "Print a histogram per set of I/O flags", 0 },
+ { "disk", 'd', "DISK", 0, "Trace this disk only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/biopattern.c b/libbpf-tools/biopattern.c
index 2f7480f6..396995c9 100644
--- a/libbpf-tools/biopattern.c
+++ b/libbpf-tools/biopattern.c
@@ -43,10 +43,10 @@ const char argp_program_doc[] =
" biopattern -d sdc # trace sdc only\n";
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "disk", 'd', "DISK", 0, "Trace this disk only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "disk", 'd', "DISK", 0, "Trace this disk only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/biosnoop.c b/libbpf-tools/biosnoop.c
index 1243a5cf..d0f70feb 100644
--- a/libbpf-tools/biosnoop.c
+++ b/libbpf-tools/biosnoop.c
@@ -54,13 +54,13 @@ const char argp_program_doc[] =
" biosnoop -m 1 # trace for slower than 1ms\n";
static const struct argp_option opts[] = {
- { "queued", 'Q', NULL, 0, "Include OS queued time in I/O time" },
- { "disk", 'd', "DISK", 0, "Trace this disk only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified/CG", 0, "Trace process in cgroup path"},
- { "min", 'm', "MIN", 0, "Min latency to trace, in ms" },
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "queued", 'Q', NULL, 0, "Include OS queued time in I/O time", 0 },
+ { "disk", 'd', "DISK", 0, "Trace this disk only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified/CG", 0, "Trace process in cgroup path", 0 },
+ { "min", 'm', "MIN", 0, "Min latency to trace, in ms", 0 },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/biostacks.c b/libbpf-tools/biostacks.c
index e7875f76..3daf3e8d 100644
--- a/libbpf-tools/biostacks.c
+++ b/libbpf-tools/biostacks.c
@@ -36,10 +36,10 @@ const char argp_program_doc[] =
" biostacks -d sdc # trace sdc only\n";
static const struct argp_option opts[] = {
- { "disk", 'd', "DISK", 0, "Trace this disk only" },
- { "milliseconds", 'm', NULL, 0, "Millisecond histogram" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "disk", 'd', "DISK", 0, "Trace this disk only", 0 },
+ { "milliseconds", 'm', NULL, 0, "Millisecond histogram", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/biotop.c b/libbpf-tools/biotop.c
index 904048a0..70e61151 100644
--- a/libbpf-tools/biotop.c
+++ b/libbpf-tools/biotop.c
@@ -101,12 +101,12 @@ const char argp_program_doc[] =
" biotop -p 181 # only trace PID 1216\n";
static const struct argp_option opts[] = {
- { "noclear", 'C', NULL, 0, "Don't clear the screen" },
- { "sort", 's', "SORT", 0, "Sort columns, default all [all, io, bytes, time]" },
- { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20" },
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "noclear", 'C', NULL, 0, "Don't clear the screen", 0 },
+ { "sort", 's', "SORT", 0, "Sort columns, default all [all, io, bytes, time]", 0 },
+ { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/bitesize.c b/libbpf-tools/bitesize.c
index 9eafd38c..e9be1d8f 100644
--- a/libbpf-tools/bitesize.c
+++ b/libbpf-tools/bitesize.c
@@ -44,11 +44,11 @@ const char argp_program_doc[] =
" bitesize -c fio # trace fio only\n";
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "comm", 'c', "COMM", 0, "Trace this comm only" },
- { "disk", 'd', "DISK", 0, "Trace this disk only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "comm", 'c', "COMM", 0, "Trace this comm only", 0 },
+ { "disk", 'd', "DISK", 0, "Trace this disk only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/cachestat.c b/libbpf-tools/cachestat.c
index 6ee17f83..96d15718 100644
--- a/libbpf-tools/cachestat.c
+++ b/libbpf-tools/cachestat.c
@@ -42,9 +42,9 @@ const char argp_program_doc[] =
" cachestat 1 10 # print 1 second summaries, 10 times\n";
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Print timestamp" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Print timestamp", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/capable.c b/libbpf-tools/capable.c
index 84cf6a22..df466321 100644
--- a/libbpf-tools/capable.c
+++ b/libbpf-tools/capable.c
@@ -106,18 +106,18 @@ const char argp_program_doc[] =
#define OPT_STACK_STORAGE_SIZE 2 /* --stack-storage-size */
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "kernel-stack", 'K', NULL, 0, "output kernel stack trace" },
- { "user-stack", 'U', NULL, 0, "output user stack trace" },
- { "extra-fields", 'x', NULL, 0, "extra fields: show TID and INSETID columns" },
- { "unique", 'u', "off", 0, "Print unique output for <pid> or <cgroup> (default:off)" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "kernel-stack", 'K', NULL, 0, "output kernel stack trace", 0 },
+ { "user-stack", 'U', NULL, 0, "output user stack trace", 0 },
+ { "extra-fields", 'x', NULL, 0, "extra fields: show TID and INSETID columns", 0 },
+ { "unique", 'u', "off", 0, "Print unique output for <pid> or <cgroup> (default:off)", 0 },
{ "perf-max-stack-depth", OPT_PERF_MAX_STACK_DEPTH,
- "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)" },
+ "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)", 0 },
{ "stack-storage-size", OPT_STACK_STORAGE_SIZE, "STACK-STORAGE-SIZE", 0,
- "the number of unique stack traces that can be stored and displayed (default 1024)" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "the number of unique stack traces that can be stored and displayed (default 1024)", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/cpudist.c b/libbpf-tools/cpudist.c
index 33e56155..b030ff0b 100644
--- a/libbpf-tools/cpudist.c
+++ b/libbpf-tools/cpudist.c
@@ -53,15 +53,15 @@ const char argp_program_doc[] =
" cpudist -p 185 # trace PID 185 only";
static const struct argp_option opts[] = {
- { "offcpu", 'O', NULL, 0, "Measure off-CPU time" },
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "milliseconds", 'm', NULL, 0, "Millisecond histogram" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "pids", 'P', NULL, 0, "Print a histogram per process ID" },
- { "tids", 'L', NULL, 0, "Print a histogram per thread ID" },
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "offcpu", 'O', NULL, 0, "Measure off-CPU time", 0 },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "milliseconds", 'm', NULL, 0, "Millisecond histogram", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "pids", 'P', NULL, 0, "Print a histogram per process ID", 0 },
+ { "tids", 'L', NULL, 0, "Print a histogram per thread ID", 0 },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/cpufreq.c b/libbpf-tools/cpufreq.c
index 918bc0bb..4912ad89 100644
--- a/libbpf-tools/cpufreq.c
+++ b/libbpf-tools/cpufreq.c
@@ -44,11 +44,11 @@ const char argp_program_doc[] =
" cpufreq -f 199 # sample CPU freq at 199HZ\n";
static const struct argp_option opts[] = {
- { "duration", 'd', "DURATION", 0, "Duration to sample in seconds" },
- { "frequency", 'f', "FREQUENCY", 0, "Sample with a certain frequency" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "duration", 'd', "DURATION", 0, "Duration to sample in seconds", 0 },
+ { "frequency", 'f', "FREQUENCY", 0, "Sample with a certain frequency", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/drsnoop.c b/libbpf-tools/drsnoop.c
index 0c1efafd..01d37b54 100644
--- a/libbpf-tools/drsnoop.c
+++ b/libbpf-tools/drsnoop.c
@@ -45,12 +45,12 @@ const char argp_program_doc[] =
" drsnoop -e # trace all direct reclaim events with extended faileds\n";
static const struct argp_option opts[] = {
- { "duration", 'd', "DURATION", 0, "Total duration of trace in seconds" },
- { "extended", 'e', NULL, 0, "Extended fields output" },
- { "pid", 'p', "PID", 0, "Process PID to trace" },
- { "tid", 't', "TID", 0, "Thread TID to trace" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "duration", 'd', "DURATION", 0, "Total duration of trace in seconds", 0 },
+ { "extended", 'e', NULL, 0, "Extended fields output", 0 },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
+ { "tid", 't', "TID", 0, "Thread TID to trace", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/execsnoop.c b/libbpf-tools/execsnoop.c
index 6342550b..8d3a0fb2 100644
--- a/libbpf-tools/execsnoop.c
+++ b/libbpf-tools/execsnoop.c
@@ -64,19 +64,19 @@ const char argp_program_doc[] =
" ./execsnoop -c CG # Trace process under cgroupsPath CG\n";
static const struct argp_option opts[] = {
- { "time", 'T', NULL, 0, "include time column on output (HH:MM:SS)" },
- { "timestamp", 't', NULL, 0, "include timestamp on output" },
- { "fails", 'x', NULL, 0, "include failed exec()s" },
- { "uid", 'u', "UID", 0, "trace this UID only" },
- { "quote", 'q', NULL, 0, "Add quotemarks (\") around arguments" },
- { "name", 'n', "NAME", 0, "only print commands matching this name, any arg" },
- { "line", 'l', "LINE", 0, "only print commands where arg contains this line" },
- { "print-uid", 'U', NULL, 0, "print UID column" },
+ { "time", 'T', NULL, 0, "include time column on output (HH:MM:SS)", 0 },
+ { "timestamp", 't', NULL, 0, "include timestamp on output", 0 },
+ { "fails", 'x', NULL, 0, "include failed exec()s", 0 },
+ { "uid", 'u', "UID", 0, "trace this UID only", 0 },
+ { "quote", 'q', NULL, 0, "Add quotemarks (\") around arguments", 0 },
+ { "name", 'n', "NAME", 0, "only print commands matching this name, any arg", 0 },
+ { "line", 'l', "LINE", 0, "only print commands where arg contains this line", 0 },
+ { "print-uid", 'U', NULL, 0, "print UID column", 0 },
{ "max-args", MAX_ARGS_KEY, "MAX_ARGS", 0,
- "maximum number of arguments parsed and displayed, defaults to 20" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path"},
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "maximum number of arguments parsed and displayed, defaults to 20", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/exitsnoop.c b/libbpf-tools/exitsnoop.c
index 2e39a6cb..ed9a2628 100644
--- a/libbpf-tools/exitsnoop.c
+++ b/libbpf-tools/exitsnoop.c
@@ -57,13 +57,13 @@ const char argp_program_doc[] =
" exitsnoop -c CG # Trace process under cgroupsPath CG\n";
static const struct argp_option opts[] = {
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "failed", 'x', NULL, 0, "Trace error exits only." },
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "threaded", 'T', NULL, 0, "Trace by thread." },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path"},
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "failed", 'x', NULL, 0, "Trace error exits only.", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "threaded", 'T', NULL, 0, "Trace by thread.", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
{},
};
diff --git a/libbpf-tools/filelife.c b/libbpf-tools/filelife.c
index 8b2f3075..c0f0cdf2 100644
--- a/libbpf-tools/filelife.c
+++ b/libbpf-tools/filelife.c
@@ -43,9 +43,9 @@ const char argp_program_doc[] =
" filelife -p 123 # trace pid 123\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process PID to trace" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/filetop.c b/libbpf-tools/filetop.c
index cf69836f..083b7022 100644
--- a/libbpf-tools/filetop.c
+++ b/libbpf-tools/filetop.c
@@ -59,13 +59,13 @@ const char argp_program_doc[] =
" filetop 5 10 # 5s summaries, 10 times\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "noclear", 'C', NULL, 0, "Don't clear the screen" },
- { "all", 'a', NULL, 0, "Include special files" },
- { "sort", 's', "SORT", 0, "Sort columns, default all [all, reads, writes, rbytes, wbytes]" },
- { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "noclear", 'C', NULL, 0, "Don't clear the screen", 0 },
+ { "all", 'a', NULL, 0, "Include special files", 0 },
+ { "sort", 's', "SORT", 0, "Sort columns, default all [all, reads, writes, rbytes, wbytes]", 0 },
+ { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/fsdist.c b/libbpf-tools/fsdist.c
index b51244d1..ef2b27f5 100644
--- a/libbpf-tools/fsdist.c
+++ b/libbpf-tools/fsdist.c
@@ -115,12 +115,12 @@ const char argp_program_doc[] =
" fsdist -t btrfs -m 5 # trace btrfs operation, 5s summaries, in ms\n";
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Print timestamp" },
- { "milliseconds", 'm', NULL, 0, "Millisecond histogram" },
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "type", 't', "Filesystem", 0, "Which filesystem to trace, [btrfs/ext4/nfs/xfs/f2fs]" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Print timestamp", 0 },
+ { "milliseconds", 'm', NULL, 0, "Millisecond histogram", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "type", 't', "Filesystem", 0, "Which filesystem to trace, [btrfs/ext4/nfs/xfs/f2fs]", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/fsslower.c b/libbpf-tools/fsslower.c
index ba960e90..adb15520 100644
--- a/libbpf-tools/fsslower.c
+++ b/libbpf-tools/fsslower.c
@@ -109,13 +109,13 @@ const char argp_program_doc[] =
" fsslower -t xfs -c -d 1 # trace xfs operations for 1s with csv output\n";
static const struct argp_option opts[] = {
- { "csv", 'c', NULL, 0, "Output as csv" },
- { "duration", 'd', "DURATION", 0, "Total duration of trace in seconds" },
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "min", 'm', "MIN", 0, "Min latency to trace, in ms (default 10)" },
- { "type", 't', "Filesystem", 0, "Which filesystem to trace, [btrfs/ext4/nfs/xfs/f2fs]" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "csv", 'c', NULL, 0, "Output as csv", 0 },
+ { "duration", 'd', "DURATION", 0, "Total duration of trace in seconds", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "min", 'm', "MIN", 0, "Min latency to trace, in ms (default 10)", 0 },
+ { "type", 't', "Filesystem", 0, "Which filesystem to trace, [btrfs/ext4/nfs/xfs/f2fs]", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/funclatency.c b/libbpf-tools/funclatency.c
index 8012b09d..aa881cc6 100644
--- a/libbpf-tools/funclatency.c
+++ b/libbpf-tools/funclatency.c
@@ -74,18 +74,18 @@ static const char program_doc[] =
;
static const struct argp_option opts[] = {
- { "milliseconds", 'm', NULL, 0, "Output in milliseconds"},
- { "microseconds", 'u', NULL, 0, "Output in microseconds"},
- {0, 0, 0, 0, ""},
- { "pid", 'p', "PID", 0, "Process ID to trace"},
- {0, 0, 0, 0, ""},
- { "interval", 'i', "INTERVAL", 0, "Summary interval in seconds"},
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "duration", 'd', "DURATION", 0, "Duration to trace"},
- { "timestamp", 'T', NULL, 0, "Print timestamp"},
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "kprobes", 'k', NULL, 0, "Use kprobes instead of fentry" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help"},
+ { "milliseconds", 'm', NULL, 0, "Output in milliseconds", 0 },
+ { "microseconds", 'u', NULL, 0, "Output in microseconds", 0 },
+ {0, 0, 0, 0, "", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ {0, 0, 0, 0, "", 0 },
+ { "interval", 'i', "INTERVAL", 0, "Summary interval in seconds", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "duration", 'd', "DURATION", 0, "Duration to trace", 0 },
+ { "timestamp", 'T', NULL, 0, "Print timestamp", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "kprobes", 'k', NULL, 0, "Use kprobes instead of fentry", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/futexctn.c b/libbpf-tools/futexctn.c
index 93736ee3..4a780fb2 100644
--- a/libbpf-tools/futexctn.c
+++ b/libbpf-tools/futexctn.c
@@ -69,18 +69,18 @@ const char argp_program_doc[] =
#define OPT_STACK_STORAGE_SIZE 2 /* --stack-storage-size */
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "tid", 't', "TID", 0, "Trace this TID only" },
- { "lock", 'l', "LOCK", 0, "Trace this lock only" },
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "milliseconds", 'm', NULL, 0, "Millisecond histogram" },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "tid", 't', "TID", 0, "Trace this TID only", 0 },
+ { "lock", 'l', "LOCK", 0, "Trace this lock only", 0 },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "milliseconds", 'm', NULL, 0, "Millisecond histogram", 0 },
{ "perf-max-stack-depth", OPT_PERF_MAX_STACK_DEPTH,
- "PERF-MAX-STACK-DEPTH", 0, "the limit for the stack traces (default 127)" },
+ "PERF-MAX-STACK-DEPTH", 0, "the limit for the stack traces (default 127)", 0 },
{ "stack-storage-size", OPT_STACK_STORAGE_SIZE, "STACK-STORAGE-SIZE", 0,
- "the number of unique stack traces that can be stored and displayed (default 1024)" },
- { "summary", 's', NULL, 0, "Summary futex contention latency" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "the number of unique stack traces that can be stored and displayed (default 1024)", 0 },
+ { "summary", 's', NULL, 0, "Summary futex contention latency", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/gethostlatency.c b/libbpf-tools/gethostlatency.c
index 71ae78c5..49ce805f 100644
--- a/libbpf-tools/gethostlatency.c
+++ b/libbpf-tools/gethostlatency.c
@@ -45,10 +45,10 @@ const char argp_program_doc[] =
" gethostlatency -p 1216 # only trace PID 1216\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "libc", 'l', "LIBC", 0, "Specify which libc.so to use" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "libc", 'l', "LIBC", 0, "Specify which libc.so to use", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/hardirqs.c b/libbpf-tools/hardirqs.c
index 49a245d3..b5257d95 100644
--- a/libbpf-tools/hardirqs.c
+++ b/libbpf-tools/hardirqs.c
@@ -50,13 +50,13 @@ const char argp_program_doc[] =
" hardirqs -NT 1 # 1s summaries, nanoseconds, and timestamps\n";
static const struct argp_option opts[] = {
- { "count", 'C', NULL, 0, "Show event counts instead of timing" },
- { "distributed", 'd', NULL, 0, "Show distributions as histograms" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "nanoseconds", 'N', NULL, 0, "Output in nanoseconds" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "count", 'C', NULL, 0, "Show event counts instead of timing", 0 },
+ { "distributed", 'd', NULL, 0, "Show distributions as histograms", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "nanoseconds", 'N', NULL, 0, "Output in nanoseconds", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/javagc.c b/libbpf-tools/javagc.c
index 883ae703..8979d8f6 100644
--- a/libbpf-tools/javagc.c
+++ b/libbpf-tools/javagc.c
@@ -46,10 +46,10 @@ const char argp_program_doc[] =
"javagc -p 185 -t 100 # trace PID 185 java gc time beyond 100us\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "time", 't', "TIME", 0, "Java gc time" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "time", 't', "TIME", 0, "Java gc time", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/klockstat.c b/libbpf-tools/klockstat.c
index 505c9aed..aa60f010 100644
--- a/libbpf-tools/klockstat.c
+++ b/libbpf-tools/klockstat.c
@@ -94,24 +94,24 @@ static const char program_doc[] =
;
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Filter by process ID" },
- { "tid", 't', "TID", 0, "Filter by thread ID" },
- { 0, 0, 0, 0, "" },
- { "caller", 'c', "FUNC", 0, "Filter by caller string prefix" },
- { "lock", 'L', "LOCK", 0, "Filter by specific ksym lock name" },
- { 0, 0, 0, 0, "" },
- { "locks", 'n', "NR_LOCKS", 0, "Number of locks or threads to print" },
- { "stacks", 's', "NR_STACKS", 0, "Number of stack entries to print per lock" },
- { "sort", 'S', "SORT", 0, "Sort by field:\n acq_[max|total|count]\n hld_[max|total|count]" },
- { 0, 0, 0, 0, "" },
- { "duration", 'd', "SECONDS", 0, "Duration to trace" },
- { "interval", 'i', "SECONDS", 0, "Print interval" },
- { "reset", 'R', NULL, 0, "Reset stats each interval" },
- { "timestamp", 'T', NULL, 0, "Print timestamp" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "per-thread", 'P', NULL, 0, "Print per-thread stats" },
-
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Filter by process ID", 0 },
+ { "tid", 't', "TID", 0, "Filter by thread ID", 0 },
+ { 0, 0, 0, 0, "", 0 },
+ { "caller", 'c', "FUNC", 0, "Filter by caller string prefix", 0 },
+ { "lock", 'L', "LOCK", 0, "Filter by specific ksym lock name", 0 },
+ { 0, 0, 0, 0, "", 0 },
+ { "locks", 'n', "NR_LOCKS", 0, "Number of locks or threads to print", 0 },
+ { "stacks", 's', "NR_STACKS", 0, "Number of stack entries to print per lock", 0 },
+ { "sort", 'S', "SORT", 0, "Sort by field:\n acq_[max|total|count]\n hld_[max|total|count]", 0 },
+ { 0, 0, 0, 0, "", 0 },
+ { "duration", 'd', "SECONDS", 0, "Duration to trace", 0 },
+ { "interval", 'i', "SECONDS", 0, "Print interval", 0 },
+ { "reset", 'R', NULL, 0, "Reset stats each interval", 0 },
+ { "timestamp", 'T', NULL, 0, "Print timestamp", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "per-thread", 'P', NULL, 0, "Print per-thread stats", 0 },
+
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/llcstat.c b/libbpf-tools/llcstat.c
index c10874b8..fc215657 100644
--- a/libbpf-tools/llcstat.c
+++ b/libbpf-tools/llcstat.c
@@ -40,11 +40,11 @@ const char argp_program_doc[] =
static const struct argp_option opts[] = {
{ "sample_period", 'c', "SAMPLE_PERIOD", 0, "Sample one in this many "
- "number of cache reference / miss events" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
+ "number of cache reference / miss events", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
{ "tid", 't', NULL, 0,
- "Summarize cache references and misses by PID/TID" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "Summarize cache references and misses by PID/TID", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/mdflush.c b/libbpf-tools/mdflush.c
index f373bcfa..5c778690 100644
--- a/libbpf-tools/mdflush.c
+++ b/libbpf-tools/mdflush.c
@@ -36,8 +36,8 @@ const char argp_program_doc[] =
"USAGE: mdflush\n";
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/memleak.c b/libbpf-tools/memleak.c
index 39a8ccdc..eae32fea 100644
--- a/libbpf-tools/memleak.c
+++ b/libbpf-tools/memleak.c
@@ -191,21 +191,21 @@ const char argp_args_doc[] =
static const struct argp_option argp_options[] = {
// name/longopt:str, key/shortopt:int, arg:str, flags:int, doc:str
- {"pid", 'p', "PID", 0, "process ID to trace. if not specified, trace kernel allocs"},
- {"trace", 't', 0, 0, "print trace messages for each alloc/free call" },
- {"show-allocs", 'a', 0, 0, "show allocation addresses and sizes as well as call stacks"},
- {"older", 'o', "AGE_MS", 0, "prune allocations younger than this age in milliseconds"},
- {"command", 'c', "COMMAND", 0, "execute and trace the specified command"},
- {"combined-only", 'C', 0, 0, "show combined allocation statistics only"},
- {"wa-missing-free", 'F', 0, 0, "workaround to alleviate misjudgments when free is missing"},
- {"sample-rate", 's', "SAMPLE_RATE", 0, "sample every N-th allocation to decrease the overhead"},
- {"top", 'T', "TOP_STACKS", 0, "display only this many top allocating stacks (by size)"},
- {"min-size", 'z', "MIN_SIZE", 0, "capture only allocations larger than this size"},
- {"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"},
- {"symbols-prefix", 'S', "SYMBOLS_PREFIX", 0, "memory allocator symbols prefix"},
- {"verbose", 'v', NULL, 0, "verbose debug output" },
+ {"pid", 'p', "PID", 0, "process ID to trace. if not specified, trace kernel allocs", 0 },
+ {"trace", 't', 0, 0, "print trace messages for each alloc/free call", 0 },
+ {"show-allocs", 'a', 0, 0, "show allocation addresses and sizes as well as call stacks", 0 },
+ {"older", 'o', "AGE_MS", 0, "prune allocations younger than this age in milliseconds", 0 },
+ {"command", 'c', "COMMAND", 0, "execute and trace the specified command", 0 },
+ {"combined-only", 'C', 0, 0, "show combined allocation statistics only", 0 },
+ {"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 },
+ {"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 },
+ {"verbose", 'v', NULL, 0, "verbose debug output", 0 },
{},
};
diff --git a/libbpf-tools/mountsnoop.c b/libbpf-tools/mountsnoop.c
index 5ff0ce64..791358c5 100644
--- a/libbpf-tools/mountsnoop.c
+++ b/libbpf-tools/mountsnoop.c
@@ -90,11 +90,11 @@ const char argp_program_doc[] =
" mountsnoop -p 1216 # only trace PID 1216\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "detailed", 'd', NULL, 0, "Output result in detail mode" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "detailed", 'd', NULL, 0, "Output result in detail mode", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/numamove.c b/libbpf-tools/numamove.c
index f382e349..25bfae9e 100644
--- a/libbpf-tools/numamove.c
+++ b/libbpf-tools/numamove.c
@@ -34,8 +34,8 @@ const char argp_program_doc[] =
" numamove # Show page migrations' count and latency";
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/offcputime.c b/libbpf-tools/offcputime.c
index 0eec099c..c70bccdd 100644
--- a/libbpf-tools/offcputime.c
+++ b/libbpf-tools/offcputime.c
@@ -62,23 +62,23 @@ const char argp_program_doc[] =
#define OPT_STATE 3 /* --state */
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "tid", 't', "TID", 0, "Trace this TID only" },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "tid", 't', "TID", 0, "Trace this TID only", 0 },
{ "user-threads-only", 'u', NULL, 0,
- "User threads only (no kernel threads)" },
+ "User threads only (no kernel threads)", 0 },
{ "kernel-threads-only", 'k', NULL, 0,
- "Kernel threads only (no user threads)" },
+ "Kernel threads only (no user threads)", 0 },
{ "perf-max-stack-depth", OPT_PERF_MAX_STACK_DEPTH,
- "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)" },
+ "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)", 0 },
{ "stack-storage-size", OPT_STACK_STORAGE_SIZE, "STACK-STORAGE-SIZE", 0,
- "the number of unique stack traces that can be stored and displayed (default 1024)" },
+ "the number of unique stack traces that can be stored and displayed (default 1024)", 0 },
{ "min-block-time", 'm', "MIN-BLOCK-TIME", 0,
- "the amount of time in microseconds over which we store traces (default 1)" },
+ "the amount of time in microseconds over which we store traces (default 1)", 0 },
{ "max-block-time", 'M', "MAX-BLOCK-TIME", 0,
- "the amount of time in microseconds under which we store traces (default U64_MAX)" },
- { "state", OPT_STATE, "STATE", 0, "filter on this thread state bitmask (eg, 2 == TASK_UNINTERRUPTIBLE) see include/linux/sched.h" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "the amount of time in microseconds under which we store traces (default U64_MAX)", 0 },
+ { "state", OPT_STATE, "STATE", 0, "filter on this thread state bitmask (eg, 2 == TASK_UNINTERRUPTIBLE) see include/linux/sched.h", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/oomkill.c b/libbpf-tools/oomkill.c
index e837e797..586e8b7c 100644
--- a/libbpf-tools/oomkill.c
+++ b/libbpf-tools/oomkill.c
@@ -38,8 +38,8 @@ const char argp_program_doc[] =
" oomkill # trace OOM kills\n";
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/opensnoop.c b/libbpf-tools/opensnoop.c
index 008098f7..f47828ba 100644
--- a/libbpf-tools/opensnoop.c
+++ b/libbpf-tools/opensnoop.c
@@ -87,19 +87,19 @@ const char argp_program_doc[] =
"";
static const struct argp_option opts[] = {
- { "duration", 'd', "DURATION", 0, "Duration to trace"},
- { "extended-fields", 'e', NULL, 0, "Print extended fields"},
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help"},
- { "name", 'n', "NAME", 0, "Trace process names containing this"},
- { "pid", 'p', "PID", 0, "Process ID to trace"},
- { "tid", 't', "TID", 0, "Thread ID to trace"},
- { "timestamp", 'T', NULL, 0, "Print timestamp"},
- { "uid", 'u', "UID", 0, "User ID to trace"},
- { "print-uid", 'U', NULL, 0, "Print UID"},
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "failed", 'x', NULL, 0, "Failed opens only"},
+ { "duration", 'd', "DURATION", 0, "Duration to trace", 0 },
+ { "extended-fields", 'e', NULL, 0, "Print extended fields", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
+ { "name", 'n', "NAME", 0, "Trace process names containing this", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "tid", 't', "TID", 0, "Thread ID to trace", 0 },
+ { "timestamp", 'T', NULL, 0, "Print timestamp", 0 },
+ { "uid", 'u', "UID", 0, "User ID to trace", 0 },
+ { "print-uid", 'U', NULL, 0, "Print UID", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "failed", 'x', NULL, 0, "Failed opens only", 0 },
#ifdef USE_BLAZESYM
- { "callers", 'c', NULL, 0, "Show calling functions"},
+ { "callers", 'c', NULL, 0, "Show calling functions", 0 },
#endif
{},
};
diff --git a/libbpf-tools/profile.c b/libbpf-tools/profile.c
index 95af848e..c8128b18 100644
--- a/libbpf-tools/profile.c
+++ b/libbpf-tools/profile.c
@@ -93,22 +93,22 @@ const char argp_program_doc[] =
" profile -K # only show kernel space stacks (no user)\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "profile process with this PID only" },
- { "tid", 'L', "TID", 0, "profile thread with this TID only" },
+ { "pid", 'p', "PID", 0, "profile process with this PID only", 0 },
+ { "tid", 'L', "TID", 0, "profile thread with this TID only", 0 },
{ "user-stacks-only", 'U', NULL, 0,
- "show stacks from user space only (no kernel space stacks)" },
+ "show stacks from user space only (no kernel space stacks)", 0 },
{ "kernel-stacks-only", 'K', NULL, 0,
- "show stacks from kernel space only (no user space stacks)" },
- { "frequency", 'F', "FREQUENCY", 0, "sample frequency, Hertz" },
- { "delimited", 'd', NULL, 0, "insert delimiter between kernel/user stacks" },
- { "include-idle ", 'I', NULL, 0, "include CPU idle stacks" },
+ "show stacks from kernel space only (no user space stacks)", 0 },
+ { "frequency", 'F', "FREQUENCY", 0, "sample frequency, Hertz", 0 },
+ { "delimited", 'd', NULL, 0, "insert delimiter between kernel/user stacks", 0 },
+ { "include-idle ", 'I', NULL, 0, "include CPU idle stacks", 0 },
{ "stack-storage-size", OPT_STACK_STORAGE_SIZE, "STACK-STORAGE-SIZE", 0,
- "the number of unique stack traces that can be stored and displayed (default 1024)" },
- { "cpu", 'C', "CPU", 0, "cpu number to run profile on" },
+ "the number of unique stack traces that can be stored and displayed (default 1024)", 0 },
+ { "cpu", 'C', "CPU", 0, "cpu number to run profile on", 0 },
{ "perf-max-stack-depth", OPT_PERF_MAX_STACK_DEPTH,
- "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/readahead.c b/libbpf-tools/readahead.c
index 13ea4e6c..df1854af 100644
--- a/libbpf-tools/readahead.c
+++ b/libbpf-tools/readahead.c
@@ -35,9 +35,9 @@ const char argp_program_doc[] =
" readahead -d 10 # trace for 10 seconds only\n";
static const struct argp_option opts[] = {
- { "duration", 'd', "DURATION", 0, "Duration to trace"},
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "duration", 'd', "DURATION", 0, "Duration to trace", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/runqlat.c b/libbpf-tools/runqlat.c
index 4c4c1706..59a3e70e 100644
--- a/libbpf-tools/runqlat.c
+++ b/libbpf-tools/runqlat.c
@@ -55,15 +55,15 @@ const char argp_program_doc[] =
#define OPT_PIDNSS 1 /* --pidnss */
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "milliseconds", 'm', NULL, 0, "Millisecond histogram" },
- { "pidnss", OPT_PIDNSS, NULL, 0, "Print a histogram per PID namespace" },
- { "pids", 'P', NULL, 0, "Print a histogram per process ID" },
- { "tids", 'L', NULL, 0, "Print a histogram per thread ID" },
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path"},
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "milliseconds", 'm', NULL, 0, "Millisecond histogram", 0 },
+ { "pidnss", OPT_PIDNSS, NULL, 0, "Print a histogram per PID namespace", 0 },
+ { "pids", 'P', NULL, 0, "Print a histogram per process ID", 0 },
+ { "tids", 'L', NULL, 0, "Print a histogram per thread ID", 0 },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/runqlen.c b/libbpf-tools/runqlen.c
index c710949c..6e3978e8 100644
--- a/libbpf-tools/runqlen.c
+++ b/libbpf-tools/runqlen.c
@@ -60,13 +60,13 @@ const char argp_program_doc[] =
" runqlen -f 199 # sample at 199HZ\n";
static const struct argp_option opts[] = {
- { "cpus", 'C', NULL, 0, "Print output for each CPU separately" },
- { "frequency", 'f', "FREQUENCY", 0, "Sample with a certain frequency" },
- { "runqocc", 'O', NULL, 0, "Report run queue occupancy" },
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "host", 'H', NULL, 0, "Report nr_running from host's rq" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "cpus", 'C', NULL, 0, "Print output for each CPU separately", 0 },
+ { "frequency", 'f', "FREQUENCY", 0, "Sample with a certain frequency", 0 },
+ { "runqocc", 'O', NULL, 0, "Report run queue occupancy", 0 },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "host", 'H', NULL, 0, "Report nr_running from host's rq", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/runqslower.c b/libbpf-tools/runqslower.c
index ed579eec..f41ef7d7 100644
--- a/libbpf-tools/runqslower.c
+++ b/libbpf-tools/runqslower.c
@@ -43,11 +43,11 @@ const char argp_program_doc[] =
" runqslower -P # also show previous task name and TID\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process PID to trace"},
- { "tid", 't', "TID", 0, "Thread TID to trace"},
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "previous", 'P', NULL, 0, "also show previous task name and TID" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
+ { "tid", 't', "TID", 0, "Thread TID to trace", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "previous", 'P', NULL, 0, "also show previous task name and TID", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/sigsnoop.c b/libbpf-tools/sigsnoop.c
index e10d026e..8a95b82a 100644
--- a/libbpf-tools/sigsnoop.c
+++ b/libbpf-tools/sigsnoop.c
@@ -81,13 +81,13 @@ const char argp_program_doc[] =
" sigsnoop -s 9 # only trace signal 9\n";
static const struct argp_option opts[] = {
- { "failed", 'x', NULL, 0, "Trace failed signals only." },
- { "kill", 'k', NULL, 0, "Trace signals issued by kill syscall only." },
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "signal", 's', "SIGNAL", 0, "Signal to trace." },
- { "name", 'n', NULL, 0, "Output signal name instead of signal number." },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "failed", 'x', NULL, 0, "Trace failed signals only.", 0 },
+ { "kill", 'k', NULL, 0, "Trace signals issued by kill syscall only.", 0 },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "signal", 's', "SIGNAL", 0, "Signal to trace.", 0 },
+ { "name", 'n', NULL, 0, "Output signal name instead of signal number.", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/slabratetop.c b/libbpf-tools/slabratetop.c
index 2ca4cc65..bfe7fc69 100644
--- a/libbpf-tools/slabratetop.c
+++ b/libbpf-tools/slabratetop.c
@@ -57,12 +57,12 @@ const char argp_program_doc[] =
" slabratetop 5 10 # 5s summaries, 10 times\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "noclear", 'C', NULL, 0, "Don't clear the screen" },
- { "sort", 's', "SORT", 0, "Sort columns, default size [name, count, size]" },
- { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "noclear", 'C', NULL, 0, "Don't clear the screen", 0 },
+ { "sort", 's', "SORT", 0, "Sort columns, default size [name, count, size]", 0 },
+ { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/softirqs.c b/libbpf-tools/softirqs.c
index 66c0f0f4..615e41ca 100644
--- a/libbpf-tools/softirqs.c
+++ b/libbpf-tools/softirqs.c
@@ -47,12 +47,12 @@ const char argp_program_doc[] =
" softirqs -NT 1 # 1s summaries, nanoseconds, and timestamps\n";
static const struct argp_option opts[] = {
- { "distributed", 'd', NULL, 0, "Show distributions as histograms" },
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "nanoseconds", 'N', NULL, 0, "Output in nanoseconds" },
- { "count", 'C', NULL, 0, "Show event counts with timing" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "distributed", 'd', NULL, 0, "Show distributions as histograms", 0 },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "nanoseconds", 'N', NULL, 0, "Output in nanoseconds", 0 },
+ { "count", 'C', NULL, 0, "Show event counts with timing", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/solisten.c b/libbpf-tools/solisten.c
index bc802b90..6bdad6fb 100644
--- a/libbpf-tools/solisten.c
+++ b/libbpf-tools/solisten.c
@@ -47,10 +47,10 @@ const char argp_program_doc[] =
" solisten -p 1216 # only trace PID 1216\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/statsnoop.c b/libbpf-tools/statsnoop.c
index 8a8d335f..7ab20feb 100644
--- a/libbpf-tools/statsnoop.c
+++ b/libbpf-tools/statsnoop.c
@@ -42,11 +42,11 @@ const char argp_program_doc[] =
" statsnoop -p 1216 # only trace PID 1216\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "failed", 'x', NULL, 0, "Only show failed stats" },
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "failed", 'x', NULL, 0, "Only show failed stats", 0 },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/syncsnoop.c b/libbpf-tools/syncsnoop.c
index 520d53d7..e4c578d5 100644
--- a/libbpf-tools/syncsnoop.c
+++ b/libbpf-tools/syncsnoop.c
@@ -31,8 +31,8 @@ const char argp_program_doc[] =
" syncsnoop # trace sync syscalls\n";
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/syscount.c b/libbpf-tools/syscount.c
index eeda6a37..399c98f2 100644
--- a/libbpf-tools/syscount.c
+++ b/libbpf-tools/syscount.c
@@ -45,22 +45,22 @@ static const char argp_program_doc[] =
;
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "pid", 'p', "PID", 0, "Process PID to trace" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
{ "interval", 'i', "INTERVAL", 0, "Print summary at this interval"
- " (seconds), 0 for infinite wait (default)" },
- { "duration", 'd', "DURATION", 0, "Total tracing duration (seconds)" },
- { "top", 'T', "TOP", 0, "Print only the top syscalls (default 10)" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified/<CG>", 0, "Trace process in cgroup path"},
- { "failures", 'x', NULL, 0, "Trace only failed syscalls" },
- { "latency", 'L', NULL, 0, "Collect syscall latency" },
+ " (seconds), 0 for infinite wait (default)", 0 },
+ { "duration", 'd', "DURATION", 0, "Total tracing duration (seconds)", 0 },
+ { "top", 'T', "TOP", 0, "Print only the top syscalls (default 10)", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified/<CG>", 0, "Trace process in cgroup path", 0 },
+ { "failures", 'x', NULL, 0, "Trace only failed syscalls", 0 },
+ { "latency", 'L', NULL, 0, "Collect syscall latency", 0 },
{ "milliseconds", 'm', NULL, 0, "Display latency in milliseconds"
- " (default: microseconds)" },
- { "process", 'P', NULL, 0, "Count by process and not by syscall" },
+ " (default: microseconds)", 0 },
+ { "process", 'P', NULL, 0, "Count by process and not by syscall", 0 },
{ "errno", 'e', "ERRNO", 0, "Trace only syscalls that return this error"
- "(numeric or EPERM, etc.)" },
- { "list", 'l', NULL, 0, "Print list of recognized syscalls and exit" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "(numeric or EPERM, etc.)", 0 },
+ { "list", 'l', NULL, 0, "Print list of recognized syscalls and exit", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcpconnect.c b/libbpf-tools/tcpconnect.c
index 08e0612e..780fa619 100644
--- a/libbpf-tools/tcpconnect.c
+++ b/libbpf-tools/tcpconnect.c
@@ -104,18 +104,18 @@ static int get_uint(const char *arg, unsigned int *ret,
}
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "count", 'c', NULL, 0, "Count connects per src ip and dst ip/port" },
- { "print-uid", 'U', NULL, 0, "Include UID on output" },
- { "pid", 'p', "PID", 0, "Process PID to trace" },
- { "uid", 'u', "UID", 0, "Process UID to trace" },
- { "source-port", 's', NULL, 0, "Consider source port when counting" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "count", 'c', NULL, 0, "Count connects per src ip and dst ip/port", 0 },
+ { "print-uid", 'U', NULL, 0, "Include UID on output", 0 },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
+ { "uid", 'u', "UID", 0, "Process UID to trace", 0 },
+ { "source-port", 's', NULL, 0, "Consider source port when counting", 0 },
{ "port", 'P', "PORTS", 0,
- "Comma-separated list of destination ports to trace" },
- { "cgroupmap", 'C', "PATH", 0, "trace cgroups in this map" },
- { "mntnsmap", 'M', "PATH", 0, "trace mount namespaces in this map" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "Comma-separated list of destination ports to trace", 0 },
+ { "cgroupmap", 'C', "PATH", 0, "trace cgroups in this map", 0 },
+ { "mntnsmap", 'M', "PATH", 0, "trace mount namespaces in this map", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcpconnlat.c b/libbpf-tools/tcpconnlat.c
index 0e345da7..2836ae09 100644
--- a/libbpf-tools/tcpconnlat.c
+++ b/libbpf-tools/tcpconnlat.c
@@ -45,11 +45,11 @@ const char argp_program_doc[] =
" tcpconnlat -L # include LPORT while printing outputs\n";
static const struct argp_option opts[] = {
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "pid", 'p', "PID", 0, "Trace this PID only" },
- { "lport", 'L', NULL, 0, "Include LPORT on output" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "pid", 'p', "PID", 0, "Trace this PID only", 0 },
+ { "lport", 'L', NULL, 0, "Include LPORT on output", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcplife.c b/libbpf-tools/tcplife.c
index c4639233..99d34f5a 100644
--- a/libbpf-tools/tcplife.c
+++ b/libbpf-tools/tcplife.c
@@ -45,15 +45,15 @@ const char argp_program_doc[] =
" tcplife -p 1215 -4 # trace IPv4 only\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "ipv4", '4', NULL, 0, "Trace IPv4 only" },
- { "ipv6", '6', NULL, 0, "Trace IPv6 only" },
- { "wide", 'w', NULL, 0, "Wide column output (fits IPv6 addresses)" },
- { "time", 'T', NULL, 0, "Include timestamp on output" },
- { "localport", 'L', "LOCALPORT", 0, "Comma-separated list of local ports to trace." },
- { "remoteport", 'D', "REMOTEPORT", 0, "Comma-separated list of remote ports to trace." },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "ipv4", '4', NULL, 0, "Trace IPv4 only", 0 },
+ { "ipv6", '6', NULL, 0, "Trace IPv6 only", 0 },
+ { "wide", 'w', NULL, 0, "Wide column output (fits IPv6 addresses)", 0 },
+ { "time", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "localport", 'L', "LOCALPORT", 0, "Comma-separated list of local ports to trace.", 0 },
+ { "remoteport", 'D', "REMOTEPORT", 0, "Comma-separated list of remote ports to trace.", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcppktlat.c b/libbpf-tools/tcppktlat.c
index 9c63bb3c..4b1c2241 100644
--- a/libbpf-tools/tcppktlat.c
+++ b/libbpf-tools/tcppktlat.c
@@ -48,14 +48,14 @@ const char argp_program_doc[] =
" tcppktlat 1000 # filter for latency higher than 1000us";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process PID to trace"},
- { "tid", 't', "TID", 0, "Thread TID to trace"},
- { "timestamp", 'T', NULL, 0, "include timestamp on output" },
- { "lport", 'l', "LPORT", 0, "filter for local port" },
- { "rport", 'r', "RPORT", 0, "filter for remote port" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "wide", 'w', NULL, 0, "Wide column output (fits IPv6 addresses)" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
+ { "tid", 't', "TID", 0, "Thread TID to trace", 0 },
+ { "timestamp", 'T', NULL, 0, "include timestamp on output", 0 },
+ { "lport", 'l', "LPORT", 0, "filter for local port", 0 },
+ { "rport", 'r', "RPORT", 0, "filter for remote port", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "wide", 'w', NULL, 0, "Wide column output (fits IPv6 addresses)", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcprtt.c b/libbpf-tools/tcprtt.c
index 2ca883c3..5750e119 100644
--- a/libbpf-tools/tcprtt.c
+++ b/libbpf-tools/tcprtt.c
@@ -58,21 +58,21 @@ const char argp_program_doc[] =
" tcprtt -e # show extension summary(average)\n";
static const struct argp_option opts[] = {
- { "interval", 'i', "INTERVAL", 0, "summary interval, seconds" },
- { "duration", 'd', "DURATION", 0, "total duration of trace, seconds" },
- { "timestamp", 'T', NULL, 0, "include timestamp on output" },
- { "millisecond", 'm', NULL, 0, "millisecond histogram" },
- { "lport", 'p', "LPORT", 0, "filter for local port" },
- { "rport", 'P', "RPORT", 0, "filter for remote port" },
- { "laddr", 'a', "LADDR", 0, "filter for local address" },
- { "raddr", 'A', "RADDR", 0, "filter for remote address" },
+ { "interval", 'i', "INTERVAL", 0, "summary interval, seconds", 0 },
+ { "duration", 'd', "DURATION", 0, "total duration of trace, seconds", 0 },
+ { "timestamp", 'T', NULL, 0, "include timestamp on output", 0 },
+ { "millisecond", 'm', NULL, 0, "millisecond histogram", 0 },
+ { "lport", 'p', "LPORT", 0, "filter for local port", 0 },
+ { "rport", 'P', "RPORT", 0, "filter for remote port", 0 },
+ { "laddr", 'a', "LADDR", 0, "filter for local address", 0 },
+ { "raddr", 'A', "RADDR", 0, "filter for remote address", 0 },
{ "byladdr", 'b', NULL, 0,
- "show sockets histogram by local address" },
+ "show sockets histogram by local address", 0 },
{ "byraddr", 'B', NULL, 0,
- "show sockets histogram by remote address" },
- { "extension", 'e', NULL, 0, "show extension summary(average)" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "show sockets histogram by remote address", 0 },
+ { "extension", 'e', NULL, 0, "show extension summary(average)", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcpstates.c b/libbpf-tools/tcpstates.c
index 3e0bd353..8f5d6a35 100644
--- a/libbpf-tools/tcpstates.c
+++ b/libbpf-tools/tcpstates.c
@@ -65,14 +65,14 @@ const char argp_program_doc[] =
" tcpstates -D 80 # only trace remote port 80\n";
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "ipv4", '4', NULL, 0, "Trace IPv4 family only" },
- { "ipv6", '6', NULL, 0, "Trace IPv6 family only" },
- { "wide", 'w', NULL, 0, "Wide column output (fits IPv6 addresses)" },
- { "localport", 'L', "LPORT", 0, "Comma-separated list of local ports to trace." },
- { "remoteport", 'D', "DPORT", 0, "Comma-separated list of remote ports to trace." },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "ipv4", '4', NULL, 0, "Trace IPv4 family only", 0 },
+ { "ipv6", '6', NULL, 0, "Trace IPv6 family only", 0 },
+ { "wide", 'w', NULL, 0, "Wide column output (fits IPv6 addresses)", 0 },
+ { "localport", 'L', "LPORT", 0, "Comma-separated list of local ports to trace.", 0 },
+ { "remoteport", 'D', "DPORT", 0, "Comma-separated list of remote ports to trace.", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcpsynbl.c b/libbpf-tools/tcpsynbl.c
index ea5fd98c..1150c693 100644
--- a/libbpf-tools/tcpsynbl.c
+++ b/libbpf-tools/tcpsynbl.c
@@ -46,11 +46,11 @@ const char argp_program_doc[] =
static const struct argp_option opts[] = {
- { "timestamp", 'T', NULL, 0, "Include timestamp on output" },
- { "ipv4", '4', NULL, 0, "Trace IPv4 family only" },
- { "ipv6", '6', NULL, 0, "Trace IPv6 family only" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "timestamp", 'T', NULL, 0, "Include timestamp on output", 0 },
+ { "ipv4", '4', NULL, 0, "Trace IPv4 family only", 0 },
+ { "ipv6", '6', NULL, 0, "Trace IPv6 family only", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcptop.c b/libbpf-tools/tcptop.c
index 6cd3fd4e..d19fb939 100644
--- a/libbpf-tools/tcptop.c
+++ b/libbpf-tools/tcptop.c
@@ -68,16 +68,16 @@ const char argp_program_doc[] =
" tcptop 5 10 # 5s summaries, 10 times\n";
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "Process ID to trace" },
- { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path" },
- { "ipv4", '4', NULL, 0, "trace IPv4 family only" },
- { "ipv6", '6', NULL, 0, "trace IPv6 family only" },
- { "nosummary", 'S', NULL, 0, "Skip system summary line"},
- { "noclear", 'C', NULL, 0, "Don't clear the screen" },
- { "sort", 's', "SORT", 0, "Sort columns, default all [all, sent, received]" },
- { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20" },
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "pid", 'p', "PID", 0, "Process ID to trace", 0 },
+ { "cgroup", 'c', "/sys/fs/cgroup/unified", 0, "Trace process in cgroup path", 0 },
+ { "ipv4", '4', NULL, 0, "trace IPv4 family only", 0 },
+ { "ipv6", '6', NULL, 0, "trace IPv6 family only", 0 },
+ { "nosummary", 'S', NULL, 0, "Skip system summary line", 0 },
+ { "noclear", 'C', NULL, 0, "Don't clear the screen", 0 },
+ { "sort", 's', "SORT", 0, "Sort columns, default all [all, sent, received]", 0 },
+ { "rows", 'r', "ROWS", 0, "Maximum rows to print, default 20", 0 },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/tcptracer.c b/libbpf-tools/tcptracer.c
index 3ba921ae..8e15fe9f 100644
--- a/libbpf-tools/tcptracer.c
+++ b/libbpf-tools/tcptracer.c
@@ -75,14 +75,14 @@ static int get_uint(const char *arg, unsigned int *ret,
}
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { "timestamp", 't', NULL, 0, "Include timestamp on output" },
- { "print-uid", 'U', NULL, 0, "Include UID on output" },
- { "pid", 'p', "PID", 0, "Process PID to trace" },
- { "uid", 'u', "UID", 0, "Process UID to trace" },
- { "cgroupmap", 'C', "PATH", 0, "trace cgroups in this map" },
- { "mntnsmap", 'M', "PATH", 0, "trace mount namespaces in this map" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { "timestamp", 't', NULL, 0, "Include timestamp on output", 0 },
+ { "print-uid", 'U', NULL, 0, "Include UID on output", 0 },
+ { "pid", 'p', "PID", 0, "Process PID to trace", 0 },
+ { "uid", 'u', "UID", 0, "Process UID to trace", 0 },
+ { "cgroupmap", 'C', "PATH", 0, "trace cgroups in this map", 0 },
+ { "mntnsmap", 'M', "PATH", 0, "trace mount namespaces in this map", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/vfsstat.c b/libbpf-tools/vfsstat.c
index a20ff260..40699ecb 100644
--- a/libbpf-tools/vfsstat.c
+++ b/libbpf-tools/vfsstat.c
@@ -23,8 +23,8 @@ static const char argp_program_doc[] =
static char args_doc[] = "[interval [count]]";
static const struct argp_option opts[] = {
- { "verbose", 'v', NULL, 0, "Verbose debug output" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};
diff --git a/libbpf-tools/wakeuptime.c b/libbpf-tools/wakeuptime.c
index 8eedbd0f..6b25d8ab 100644
--- a/libbpf-tools/wakeuptime.c
+++ b/libbpf-tools/wakeuptime.c
@@ -52,18 +52,18 @@ const char argp_program_doc[] =
#define OPT_STACK_STORAGE_SIZE 2 /* --stack-storage-size */
static const struct argp_option opts[] = {
- { "pid", 'p', "PID", 0, "trace this PID only"},
- { "verbose", 'v', NULL, 0, "show raw addresses" },
- { "user-threads-only", 'u', NULL, 0, "user threads only (no kernel threads)" },
+ { "pid", 'p', "PID", 0, "trace this PID only", 0 },
+ { "verbose", 'v', NULL, 0, "show raw addresses", 0 },
+ { "user-threads-only", 'u', NULL, 0, "user threads only (no kernel threads)", 0 },
{ "perf-max-stack-depth", OPT_PERF_MAX_STACK_DEPTH,
- "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)" },
+ "PERF-MAX-STACK-DEPTH", 0, "the limit for both kernel and user stack traces (default 127)", 0 },
{ "stack-storage-size", OPT_STACK_STORAGE_SIZE, "STACK-STORAGE-SIZE", 0,
- "the number of unique stack traces that can be stored and displayed (default 1024)" },
+ "the number of unique stack traces that can be stored and displayed (default 1024)", 0 },
{ "min-block-time", 'm', "MIN-BLOCK-TIME", 0,
- "the amount of time in microseconds over which we store traces (default 1)" },
+ "the amount of time in microseconds over which we store traces (default 1)", 0 },
{ "max-block-time", 'M', "MAX-BLOCK-TIME", 0,
- "the amount of time in microseconds under which we store traces (default U64_MAX)" },
- { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
+ "the amount of time in microseconds under which we store traces (default U64_MAX)", 0 },
+ { NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help", 0 },
{},
};