public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>,
	Milian Wolff <milian.wolff@kdab.com>,
	linux-perf-users@vger.kernel.org,
	Adrian Hunter <adrian.hunter@intel.com>,
	Arnaldo Carvalho de Melo <acme@kenel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: perf 6.9-1 (archlinux) crashes during recording of cycles + raw_syscalls
Date: Thu, 6 Jun 2024 15:20:10 -0700	[thread overview]
Message-ID: <ZmI2Gumx5yUwyFsT@google.com> (raw)
In-Reply-To: <Zl9ksOlHJHnKM70p@x1>

On Tue, Jun 04, 2024 at 04:02:08PM -0300, Arnaldo Carvalho de Melo wrote:
> On Tue, Jun 04, 2024 at 11:48:09AM -0700, Ian Rogers wrote:
> > On Tue, Jun 4, 2024 at 7:12 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > > Can you please try with the attached and perhaps provide your Tested-by?
> 
> > > From ab355e2c6b4cf641a9fff7af38059cf69ac712d5 Mon Sep 17 00:00:00 2001
> > > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > Date: Tue, 4 Jun 2024 11:00:22 -0300
> > > Subject: [PATCH 1/1] Revert "perf record: Reduce memory for recording
> > >  PERF_RECORD_LOST_SAMPLES event"
> 
> > > This reverts commit 7d1405c71df21f6c394b8a885aa8a133f749fa22.
>  
> > I think we should try to fight back reverts when possible. Reverts are
> > removing something somebody poured time and attention into. When a
> 
> While in the development phase, yeah, but when we find a regression and
> the revert makes it go away, that is the way to go.
> 
> The person who poured time on the development gets notified and can
> decide if/when to try again.
> 
> Millian had to pour time to figure out why something stopped working,
> was kind enough to provide the output from multiple tools to help in
> fixing the problem and I had to do the bisect to figure out when the
> problem happened and to check if reverting it we would have the tool
> working again.
> 
> If we try to fix this for v6.10 we may end up adding yet another bug, so
> the safe thing to do at this point is to do the revert.
> 
> We can try improving this once again for v6.11.

I think I found a couple of problems with this issue. :(

 1. perf_session__set_id_hdr_size() uses the first evsel in the session
    But I think it should pick the tracking event.  I guess we assume
    all events have the same set of sample_type wrt the sample_id_all
    but I'm not sure if it's correct.

 2. With --call-graph dwarf, it seems to set unrelated sample type bits
    in the attr like ADDR and DATA_SRC.

 3. For tracepoint events, evsel__newtp_idx() sets a couple of sample
    type regardless of the configuration.  This includes RAW, TIME and
    CPU.  This one changes the format of the id headers.

 4. PERF_RECORD_LOST_SAMPLES is for the sampling event, so it should
    use the event's sample_type.  But the event parsing looks up the
    event using evlist->is_pos which is set for the first event.

 5. I think we can remove some sample type (i.e. TID and CPU) from the
    tracking event in most cases.  ID(ENTIFIER) will be used for LOST_
    SAMPLES and TIME is needed anyway.  TID is might be used for SWITCH
    but others already contain necessary information in the type.  I
    wish we could add id field to PERF_RECORD_LOST_SAMPLES and tid/pid
    to PERF_RECORD_SWITCH.

Thanks,
Namhyung

> 
> > regression has occurred then I think we should add the regression case
> > as a test.
> 
> Sure, I thought about that as well, will try and have one shell test
> with that, referring to this case, for v6.11.
> 
> - Arnaldo

  reply	other threads:[~2024-06-06 22:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <23879991.0LEYPuXRzz@milian-workstation>
     [not found] ` <Zl8bhWfHSXxs35r2@x1>
2024-06-04 14:12   ` perf 6.9-1 (archlinux) crashes during recording of cycles + raw_syscalls Arnaldo Carvalho de Melo
2024-06-04 18:48     ` Ian Rogers
2024-06-04 19:02       ` Arnaldo Carvalho de Melo
2024-06-06 22:20         ` Namhyung Kim [this message]
2024-06-06 23:17           ` Ian Rogers
2024-06-07 18:26             ` Namhyung Kim
2024-06-04 20:04     ` Milian Wolff

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=ZmI2Gumx5yUwyFsT@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kenel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=milian.wolff@kdab.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