linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Hao Luo <haoluo@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>,
	Song Liu <songliubraving@fb.com>, bpf <bpf@vger.kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	Blake Jones <blakejones@google.com>
Subject: Re: [PATCH 2/4] perf record: Enable off-cpu analysis with BPF
Date: Fri, 29 Apr 2022 10:27:23 -0700	[thread overview]
Message-ID: <CAM9d7cjytSO9chTZBnKLnNsOz4LtwZo4G1LbEBJbLGGpPieaxA@mail.gmail.com> (raw)
In-Reply-To: <CA+khW7gvDaDiA458StkOEvUfvr1Rx4d65+530z2tq52VkJqaoA@mail.gmail.com>

Hi Hao,

On Wed, Apr 27, 2022 at 4:07 PM Hao Luo <haoluo@google.com> wrote:
>
> Hi Namhyung,
>
> On Fri, Apr 22, 2022 at 8:05 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
>
> [...]
>
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/perf/Makefile.perf               |   1 +
> >  tools/perf/builtin-record.c            |  21 +++
> >  tools/perf/util/Build                  |   1 +
> >  tools/perf/util/bpf_off_cpu.c          | 208 +++++++++++++++++++++++++
> >  tools/perf/util/bpf_skel/off_cpu.bpf.c | 137 ++++++++++++++++
> >  tools/perf/util/off_cpu.h              |  22 +++
> >  6 files changed, 390 insertions(+)
> >  create mode 100644 tools/perf/util/bpf_off_cpu.c
> >  create mode 100644 tools/perf/util/bpf_skel/off_cpu.bpf.c
> >  create mode 100644 tools/perf/util/off_cpu.h
> >
>
> [...]
>
> > diff --git a/tools/perf/util/bpf_skel/off_cpu.bpf.c b/tools/perf/util/bpf_skel/off_cpu.bpf.c
> > new file mode 100644
> > index 000000000000..2bc6f7cc59ea
> > --- /dev/null
> > +++ b/tools/perf/util/bpf_skel/off_cpu.bpf.c
> >
> > +struct {
> > +       __uint(type, BPF_MAP_TYPE_HASH);
> > +       __uint(key_size, sizeof(__u32));
> > +       __uint(value_size, sizeof(struct tstamp_data));
> > +       __uint(max_entries, MAX_ENTRIES);
> > +} tstamp SEC(".maps");
>
> I think using task local storage for this tstamp would be more
> efficient. There is an example in
> tools/bpf/runqslower/runqslower.bpf.c

Right, will change in v2.

Thanks,
Namhyung

  reply	other threads:[~2022-04-29 17:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 15:05 [RFC RESEND 0/4] perf record: Implement off-cpu profiling with BPF (v1) Namhyung Kim
2022-04-22 15:05 ` [PATCH 1/4] perf report: Do not extend sample type of bpf-output event Namhyung Kim
2022-04-22 15:05 ` [PATCH 2/4] perf record: Enable off-cpu analysis with BPF Namhyung Kim
2022-04-27 23:07   ` Hao Luo
2022-04-29 17:27     ` Namhyung Kim [this message]
2022-04-22 15:05 ` [PATCH 3/4] perf record: Implement basic filtering for off-cpu Namhyung Kim
2022-04-22 15:05 ` [PATCH 4/4] perf record: Handle argument change in sched_switch Namhyung Kim
2022-04-26 23:55   ` Andrii Nakryiko
2022-04-27 18:14     ` Namhyung Kim
2022-04-27 19:26       ` Andrii Nakryiko
2022-04-28 23:58         ` Namhyung Kim
2022-05-07  0:14           ` Andrii Nakryiko
  -- strict thread matches above, loose matches on Subject: below --
2022-05-06 20:16 [RFC 0/4] perf record: Implement off-cpu profiling with BPF (v2) Namhyung Kim
2022-05-06 20:16 ` [PATCH 2/4] perf record: Enable off-cpu analysis with BPF Namhyung Kim
2022-05-10 17:02   ` Arnaldo Carvalho de Melo
2022-05-12  6:13     ` Namhyung Kim
2022-04-22  5:33 [RFC 0/4] perf record: Implement off-cpu profiling with BPF (v1) Namhyung Kim
2022-04-22  5:33 ` [PATCH 2/4] perf record: Enable off-cpu analysis with BPF 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=CAM9d7cjytSO9chTZBnKLnNsOz4LtwZo4G1LbEBJbLGGpPieaxA@mail.gmail.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --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=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).