diff options
author | Simon Glass <sjg@chromium.org> | 2022-12-22 02:08:24 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2023-01-18 21:49:13 +0300 |
commit | b87f0818b8b16b44c0b75851fee4d0b77ee4974f (patch) | |
tree | 020059375bcd8781f996da7236b4181504354889 /tools | |
parent | 90cfae2ade358018bd46f84dba435eabccd4f8f6 (diff) | |
download | u-boot-b87f0818b8b16b44c0b75851fee4d0b77ee4974f.tar.xz |
trace: Adjust flags in proftool
The flags in this tool don't match the comments or help. Also the variable
names are quite confusing. Update them for consistency.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/proftool.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/proftool.c b/tools/proftool.c index ea7d07a277..0ba84d30c1 100644 --- a/tools/proftool.c +++ b/tools/proftool.c @@ -81,14 +81,15 @@ static void outf(int level, const char *fmt, ...) static void usage(void) { fprintf(stderr, - "Usage: proftool -cds -v3 <cmd> <profdata>\n" + "Usage: proftool [-cmtv] <cmd> <profdata>\n" "\n" "Commands\n" " dump-ftrace\t\tDump out textual data in ftrace format\n" "\n" "Options:\n" + " -c <cfg>\tSpecific config file\n" " -m <map>\tSpecify Systen.map file\n" - " -t <trace>\tSpecific trace data file (from U-Boot)\n" + " -t <fname>\tSpecify trace data file (from U-Boot 'trace calls')\n" " -v <0-4>\tSpecify verbosity\n"); exit(EXIT_FAILURE); } @@ -562,23 +563,23 @@ static int prof_tool(int argc, char *const argv[], int main(int argc, char *argv[]) { const char *map_fname = "System.map"; - const char *prof_fname = NULL; - const char *trace_config_fname = NULL; + const char *trace_fname = NULL; + const char *config_fname = NULL; int opt; verbose = 2; - while ((opt = getopt(argc, argv, "m:p:t:v:")) != -1) { + while ((opt = getopt(argc, argv, "c:m:t:v:")) != -1) { switch (opt) { - case 'm': - map_fname = optarg; + case 'c': + config_fname = optarg; break; - case 'p': - prof_fname = optarg; + case 'm': + map_fname = optarg; break; case 't': - trace_config_fname = optarg; + trace_fname = optarg; break; case 'v': @@ -594,6 +595,5 @@ int main(int argc, char *argv[]) usage(); debug("Debug enabled\n"); - return prof_tool(argc, argv, prof_fname, map_fname, - trace_config_fname); + return prof_tool(argc, argv, trace_fname, map_fname, config_fname); } |