'trace-cmd list -C' outputs 'tsc2nsec' on my arm64 machine. TSC is an x86 specific counter, so it shouldn't be supported. Fix this by making sure TSC exists as a trace clock in trace_tsc2nsec_is_supported(). Signed-off-by: Nicolas Saenz Julienne <nsaenzju@xxxxxxxxxx> --- tracecmd/trace-record.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c index 1767a6c..78e9566 100644 --- a/tracecmd/trace-record.c +++ b/tracecmd/trace-record.c @@ -6122,6 +6122,9 @@ static int get_tsc_nsec(int *shift, int *mult) bool trace_tsc2nsec_is_supported(void) { + if (!clock_is_supported(NULL, TSC_CLOCK)) + return false; + return get_tsc_nsec(NULL, NULL) == 0; } -- 2.33.1