subsys/profiling: reset buf_full flag when we empty the buf

The `buf_full` flag is set when it is full, but dumping the
buf currently only resets the `idx`, this means that the perf
command only works when the buffer hasn't been full before.

Reset the flag when we clear the buffer.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2024-08-16 12:13:02 +08:00 committed by Henrik Brix Andersen
commit d4cd1be390

View file

@ -114,6 +114,7 @@ int cmd_perf_print(const struct shell *sh, size_t argc, char **argv)
}
perf_data.idx = 0;
perf_data.buf_full = false;
return 0;
}