[PATCH v2 4/4] perf util: add 'us' unit to the rusage time events
From: Florian Fischer
Date: Wed Apr 06 2022 - 07:58:07 EST
---
tools/perf/util/parse-events.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 5c84d5d43bff..13db69b71187 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -421,6 +421,10 @@ static int add_event_tool(struct list_head *list, int *idx,
free((char *)evsel->unit);
evsel->unit = strdup("ns");
}
+ else if (tool_event == PERF_TOOL_RU_UTIME || tool_event == PERF_TOOL_RU_STIME) {
+ free((char *)evsel->unit);
+ evsel->unit = strdup("us");
+ }
return 0;
}
--
2.35.1