linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Florian Fischer <florian.fischer@muhq.space>
Cc: linux-perf-users@vger.kernel.org, Ian Rogers <irogers@google.com>,
	Xing Zhengjun <zhengjun.xing@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCHSET v4 next 0/3] perf stat: add user_time and system_time tool events
Date: Wed, 20 Apr 2022 13:46:41 -0300	[thread overview]
Message-ID: <YmA48V09iBbqy6su@kernel.org> (raw)
In-Reply-To: <20220420102354.468173-1-florian.fischer@muhq.space>

Em Wed, Apr 20, 2022 at 12:23:51PM +0200, Florian Fischer escreveu:
> This patch series adds new internal events to perf stat exposing the times spend
> in user and kernel mode in nanoseconds reported by rusage.
> 
> During some benchmarking using perf it bothered me that I could not easily
> retrieve those times from perf stat when using the machine readable output.
> 
> But perf definitely knows about those values because in the human readable output
> they are present.
> 
> Therefore I exposed the times reported by rusage via the new tool events:
> user_time and system_time.
> 
> This allows to retrieved them in machine-readable output:
> 
> $ ./perf stat -x, -e duration_time,user_time,system_time,cache-misses -- grep -q -r duration_time tools/perf
> 72134524,ns,duration_time:u,72134524,100.00,,
> 65225000,ns,user_time:u,65225000,100.00,,
> 6865000,ns,ssystem_time:u,6865000,100.00,,
> 38705,,cache-misses:u,71189328,100.00,,
> 
> The changes are mostly inspired by the code for the only other available
> tool event: 'duration_time'.
> 
> For now the new user_time and system_time events are not usable with metrics
> (as far as I understand).
> 
> The patch applies cleanly on linux-next/next-20220420.

I tested and applied the first two patches, please take a look at that
"OR" problem with patch 3.

- Arnaldo
 
> [PATCH v4 1/3] perf stat: introduce stats for the user and system
> [PATCH v4 2/3] perf stat: add user_time and system_time events
> [PATCH v4 3/3] perf list: print all available tool events
> 
> [v2]: Split up the changes into separate commits.
> 
> [v3]: * Use nanoseconds as suggested by Xing Zhengjun.
>       * Squash [PATCH v2 2/4] and [PATCH v2 4/4], because it only adds the unit string.
> 
> [v4]: * Simplify event names to only user_time and system_time as suggested by Ian Rogers.
> 
> Florian Fischer

  parent reply	other threads:[~2022-04-20 16:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 10:23 [PATCHSET v4 next 0/3] perf stat: add user_time and system_time tool events Florian Fischer
2022-04-20 10:23 ` [PATCH v4 1/3] perf stat: introduce stats for the user and system rusage times Florian Fischer
2022-04-27  1:43   ` Ian Rogers
2022-04-20 10:23 ` [PATCH v4 2/3] perf stat: add user_time and system_time events Florian Fischer
2022-04-27  1:37   ` Ian Rogers
2022-04-20 10:23 ` [PATCH v4 3/3] perf list: print all available tool events Florian Fischer
2022-04-20 16:44   ` Arnaldo Carvalho de Melo
2022-04-20 17:42     ` [PATCH v5] " Florian Fischer
2022-04-20 17:42       ` Florian Fischer
2022-04-20 18:07         ` Arnaldo Carvalho de Melo
2022-04-20 16:46 ` Arnaldo Carvalho de Melo [this message]
2022-04-22 23:52   ` [PATCHSET v4 next 0/3] perf stat: add user_time and system_time " Namhyung Kim
2022-04-23 12:15     ` Florian Fischer
2022-04-25 19:06       ` Namhyung Kim
2022-04-26  8:58         ` Florian Fischer
2022-04-26 21:28           ` Namhyung Kim

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=YmA48V09iBbqy6su@kernel.org \
    --to=acme@kernel.org \
    --cc=florian.fischer@muhq.space \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=zhengjun.xing@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).