diff options
| author | Jerome Forissier <[email protected]> | 2024-12-13 13:45:36 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-12-31 19:00:46 -0600 |
| commit | 60a684e0a9f341d96c30ce0e1e472d7a203c85aa (patch) | |
| tree | 601b5741220ea12963a8af890c7c8984caeb0206 /cmd/trace.c | |
| parent | c3c20a5e3c04c7c9e0866812f6b615ec15af06d9 (diff) | |
trace: add support for 'trace wipe'
Implement a 'trace wipe' command to delete the currently accumulated
trace data. This comes handy when someone needs to trace a particular
command. For example:
=> trace pause; trace wipe
=> trace resume; dhcp; trace pause
=> trace stats
=> trace calls 0x02100000 0x10000000
=> tftpput $profbase $profoffset 192.168.0.16:trace.bin
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'cmd/trace.c')
| -rw-r--r-- | cmd/trace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/trace.c b/cmd/trace.c index 937e6a682ad..d36008720db 100644 --- a/cmd/trace.c +++ b/cmd/trace.c @@ -100,6 +100,10 @@ int do_trace(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) case 's': trace_print_stats(); break; + case 'w': + if (trace_wipe()) + return CMD_RET_FAILURE; + break; default: return CMD_RET_USAGE; } @@ -113,6 +117,7 @@ U_BOOT_CMD( "stats - display tracing statistics\n" "trace pause - pause tracing\n" "trace resume - resume tracing\n" + "trace wipe - wipe traces\n" "trace funclist [<addr> <size>] - dump function list into buffer\n" "trace calls [<addr> <size>] " "- dump function call trace into buffer" |
