From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Ian Rogers <irogers@google.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>,
Song Liu <songliubraving@fb.com>, Hao Luo <haoluo@google.com>,
Milian Wolff <milian.wolff@kdab.com>, bpf <bpf@vger.kernel.org>,
Blake Jones <blakejones@google.com>
Subject: Re: [PATCH 1/6] perf offcpu: Fix a build failure on old kernels
Date: Tue, 28 Jun 2022 09:52:28 -0700 [thread overview]
Message-ID: <CAM9d7ciPK4Z05LYNNukAsTdEMEce4hOWRa83THbENDuWjXcyEQ@mail.gmail.com> (raw)
In-Reply-To: <YrsT3iw+FEXb6kxF@kernel.org>
On Tue, Jun 28, 2022 at 7:44 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Fri, Jun 24, 2022 at 04:13:08PM -0700, Namhyung Kim escreveu:
> > Old kernels have task_struct which contains "state" field and newer
> > kernels have "__state". While the get_task_state() in the BPF code
> > handles that in some way, it assumed the current kernel has the new
> > definition and it caused a build error on old kernels.
> >
> > We should not assume anything and access them carefully. Do not use
> > the task struct directly and access them using new and old definitions
> > in a row.
>
> I added a:
>
> Fixes: edc41a1099c2d08c ("perf record: Enable off-cpu analysis with BPF")
>
> Ok?
Sure, thanks for doing this!
Namhyung
next prev parent reply other threads:[~2022-06-28 16:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 23:13 [PATCHSET 0/6] perf tools: A couple of fixes for perf record --off-cpu (v1) Namhyung Kim
2022-06-24 23:13 ` [PATCH 1/6] perf offcpu: Fix a build failure on old kernels Namhyung Kim
2022-06-28 14:44 ` Arnaldo Carvalho de Melo
2022-06-28 16:52 ` Namhyung Kim [this message]
2022-06-24 23:13 ` [PATCH 2/6] perf offcpu: Accept allowed sample types only Namhyung Kim
2022-06-28 14:46 ` Arnaldo Carvalho de Melo
2022-06-24 23:13 ` [PATCH 3/6] perf offcpu: Check process id for the given workload Namhyung Kim
2022-06-24 23:13 ` [PATCH 4/6] perf offcpu: Parse process id separately Namhyung Kim
2022-06-24 23:13 ` [PATCH 5/6] perf offcpu: Track child processes Namhyung Kim
2022-06-24 23:13 ` [PATCH 6/6] perf offcpu: Update offcpu test for child process Namhyung Kim
2022-06-28 14:40 ` [PATCHSET 0/6] perf tools: A couple of fixes for perf record --off-cpu (v1) Arnaldo Carvalho de Melo
2022-06-28 16:51 ` 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=CAM9d7ciPK4Z05LYNNukAsTdEMEce4hOWRa83THbENDuWjXcyEQ@mail.gmail.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=blakejones@google.com \
--cc=bpf@vger.kernel.org \
--cc=haoluo@google.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.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).