All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fischer <florian.fischer@muhq.space>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Florian Schmaus <flow@cs.fau.de>,
	Florian Fischer <florian.fischer@muhq.space>
Subject: [PATCH v2 4/4] perf util: add 'us' unit to the rusage time events
Date: Wed,  6 Apr 2022 09:28:39 +0200	[thread overview]
Message-ID: <20220406072839.107519-5-florian.fischer@muhq.space> (raw)
In-Reply-To: <20220406072839.107519-1-florian.fischer@muhq.space>

---
 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


      parent reply	other threads:[~2022-04-06 11:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 17:40 [RFC] perf stat: add rusage utime and stime events Florian Fischer
2022-04-05 17:40 ` [PATCH] " Florian Fischer
2022-04-05 19:42   ` Arnaldo Carvalho de Melo
2022-04-06  7:28     ` [RFC v2] " Florian Fischer
2022-04-06  7:28       ` [PATCH v2 1/4] perf stat: introduce stats for the user and system rusage times Florian Fischer
2022-04-06  7:28       ` [PATCH v2 2/4] perf stat: add rusage utime and stime events Florian Fischer
2022-04-07  1:39         ` Xing Zhengjun
2022-04-07  8:57           ` [RFC v3] " Florian Fischer
2022-04-07  8:57             ` [PATCH v3 1/3] perf stat: introduce stats for the user and system rusage times Florian Fischer
2022-04-07  8:57             ` [PATCH v3 2/3] perf stat: add rusage utime and stime events Florian Fischer
2022-04-08 15:58               ` Ian Rogers
2022-04-10 16:41                 ` Florian Fischer
2022-04-11 15:29                   ` Ian Rogers
2022-04-12 22:31                     ` Namhyung Kim
2022-04-07  8:57             ` [PATCH v3 3/3] perf list: print all available tool events Florian Fischer
2022-04-06  7:28       ` [PATCH v2 3/4] " Florian Fischer
2022-04-06  7:28       ` Florian Fischer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220406072839.107519-5-florian.fischer@muhq.space \
    --to=florian.fischer@muhq.space \
    --cc=acme@kernel.org \
    --cc=flow@cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.