From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>, Ivan Babrou <ivan@cloudflare.com>
Cc: Ian Rogers <irogers@google.com>,
linux-perf-users@vger.kernel.org, kernel-team@cloudflare.com,
linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH] perf script: print cgroup on the same line as comm
Date: Tue, 8 Aug 2023 10:48:19 -0300 [thread overview]
Message-ID: <ZNJHo+1vhHbd65C0@kernel.org> (raw)
In-Reply-To: <ZNJGunGxqspEB5iC@kernel.org>
Em Tue, Aug 08, 2023 at 10:44:26AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Aug 07, 2023 at 11:02:01AM -0700, Ivan Babrou escreveu:
> > On Fri, Jul 28, 2023 at 10:57 AM Ian Rogers <irogers@google.com> wrote:
> > > On Fri, Jul 28, 2023 at 10:42 AM Ivan Babrou <ivan@cloudflare.com> wrote:
> > > > On Mon, Jul 17, 2023 at 5:07 PM Ivan Babrou <ivan@cloudflare.com> wrote:
> > > > > Commit 3fd7a168bf51 ("perf script: Add 'cgroup' field for output")
> > > > > added support for printing cgroup path in perf script output.
>
> > > > > It was okay if you didn't want any stacks:
>
> > > > > $ sudo perf script --comms jpegtran:23f4bf -F comm,tid,cpu,time,cgroup
> > > > > jpegtran:23f4bf 3321915 [013] 404718.587488: /idle.slice/polish.service
> > > > > jpegtran:23f4bf 3321915 [031] 404718.592073: /idle.slice/polish.service
>
> > > > > With stacks it gets messier as cgroup is printed after the stack:
>
> > > > > $ perf script --comms jpegtran:23f4bf -F comm,tid,cpu,time,cgroup,ip,sym
> > > > > jpegtran:23f4bf 3321915 [013] 404718.587488:
> > > > > 5c554 compress_output
> > > > > 570d9 jpeg_finish_compress
> > > > > 3476e jpegtran_main
> > > > > 330ee jpegtran::main
> > > > > 326e2 core::ops::function::FnOnce::call_once (inlined)
> > > > > 326e2 std::sys_common::backtrace::__rust_begin_short_backtrace
> > > > > /idle.slice/polish.service
> > > > > jpegtran:23f4bf 3321915 [031] 404718.592073:
> > > > > 8474d jsimd_encode_mcu_AC_first_prepare_sse2.PADDING
> > > > > 55af68e62fff [unknown]
> > > > > /idle.slice/polish.service
> > > > >
> > > > > Let's instead print cgroup on the same line as comm:
> > > > >
> > > > > $ perf script --comms jpegtran:23f4bf -F comm,tid,cpu,time,cgroup,ip,sym
> > > > > jpegtran:23f4bf 3321915 [013] 404718.587488: /idle.slice/polish.service
> > > > > 5c554 compress_output
> > > > > 570d9 jpeg_finish_compress
> > > > > 3476e jpegtran_main
> > > > > 330ee jpegtran::main
> > > > > 326e2 core::ops::function::FnOnce::call_once (inlined)
> > > > > 326e2 std::sys_common::backtrace::__rust_begin_short_backtrace
> > > > >
> > > > > jpegtran:23f4bf 3321915 [031] 404718.592073: /idle.slice/polish.service
> > > > > 8474d jsimd_encode_mcu_AC_first_prepare_sse2.PADDING
> > > > > 55af68e62fff [unknown]
> > > > >
> > > > > Signed-off-by: Ivan Babrou <ivan@cloudflare.com>
> > > > > Fixes: 3fd7a168bf51 ("perf script: Add 'cgroup' field for output")
>
> > > This change makes sense to me. Namhyung, wdyt?
>
> > Hi Namhyung,
> >
> > This is a really trivial patch and it would be good to get a word from you.
>
> Hi, this solves the case for cgroup and I think it should be merged, but
> what about the other fields that are being printed after the callchain
> gets printed?
>
> I looked and we would have to introduce a __sample__fprintf_sym that
> didn't call sample__fprintf_callchain and use it in perf script's
> process_event() then later call sample__fprintf_callchain after all the
> fields that print on the same line.
Nah, or simply moving sample__fprintf_sym() to the end of that function.
- Arnaldo
> Anyway, Namhyung, can I have your Acked-by for this patch to move things
> forward at least for cgroups?
next prev parent reply other threads:[~2023-08-08 17:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 0:07 [PATCH] perf script: print cgroup on the same line as comm Ivan Babrou
2023-07-28 17:42 ` Ivan Babrou
2023-07-28 17:57 ` Ian Rogers
2023-08-07 18:02 ` Ivan Babrou
2023-08-08 13:44 ` Arnaldo Carvalho de Melo
2023-08-08 13:48 ` Arnaldo Carvalho de Melo [this message]
2023-08-08 13:49 ` 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=ZNJHo+1vhHbd65C0@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=ivan@cloudflare.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@cloudflare.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--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.