From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Clark Williams <williams@redhat.com>,
Kate Carcia <kcarcia@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCHES/RFC 1/5] perf bench uprobe + BPF skel
Date: Fri, 21 Jul 2023 23:32:19 +0900 [thread overview]
Message-ID: <20230721233219.9105d8e48d67e5eda3797e4e@kernel.org> (raw)
In-Reply-To: <20230719204910.539044-1-acme@kernel.org>
On Wed, 19 Jul 2023 17:49:05 -0300
Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> Hi,
>
> This adds a 'perf bench' to test the overhead of uprobes + BPF
> programs, for now just a few simple tests, but I plan to make it
> possible to specify the functions to attach the uprobe + BPF, other BPF
> operations dealing with maps, etc.
>
> This is how it looks like now:
>
> [root@five ~]# perf bench uprobe all
> # Running uprobe/baseline benchmark...
> # Executed 1,000 usleep(1000) calls
> Total time: 1,053,963 usecs
>
> 1,053.963 usecs/op
>
> # Running uprobe/empty benchmark...
> # Executed 1,000 usleep(1000) calls
> Total time: 1,056,293 usecs +2,330 to baseline
>
> 1,056.293 usecs/op 2.330 usecs/op to baseline
>
> # Running uprobe/trace_printk benchmark...
> # Executed 1,000 usleep(1000) calls
> Total time: 1,056,977 usecs +3,014 to baseline +684 to previous
>
> 1,056.977 usecs/op 3.014 usecs/op to baseline 0.684 usecs/op to previous
>
> [root@five ~]
Looks great! maybe we can also make kprobes benchmark too (but it depends
on optimization and ftrace-based...)
Thank you,
>
> I put it here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf-bench-uprobe
>
> git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf-bench-uprobe
>
> Further ideas, problems?
>
> - Arnaldo
>
>
>
> Arnaldo Carvalho de Melo (5):
> perf bench uprobe: Add benchmark to test uprobe overhead
> perf bench uprobe: Print diff to baseline
> perf bench uprobe: Show diff to previous
> perf bench uprobe empty: Add entry attaching an empty BPF program
> perf bench uprobe trace_printk: Add entry attaching an BPF program that does a trace_printk
>
> tools/perf/Documentation/perf-bench.txt | 3 +
> tools/perf/Makefile.perf | 1 +
> tools/perf/bench/Build | 1 +
> tools/perf/bench/bench.h | 3 +
> tools/perf/bench/uprobe.c | 198 ++++++++++++++++++++
> tools/perf/builtin-bench.c | 8 +
> tools/perf/util/bpf_skel/bench_uprobe.bpf.c | 23 +++
> 7 files changed, 237 insertions(+)
> create mode 100644 tools/perf/bench/uprobe.c
> create mode 100644 tools/perf/util/bpf_skel/bench_uprobe.bpf.c
>
> --
> 2.41.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
prev parent reply other threads:[~2023-07-21 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 20:49 [PATCHES/RFC 1/5] perf bench uprobe + BPF skel Arnaldo Carvalho de Melo
2023-07-19 20:49 ` [PATCH 1/5] perf bench uprobe: Add benchmark to test uprobe overhead Arnaldo Carvalho de Melo
2023-07-21 14:45 ` Masami Hiramatsu
2023-07-19 20:49 ` [PATCH 2/5] perf bench uprobe: Print diff to baseline Arnaldo Carvalho de Melo
2023-07-21 14:43 ` Masami Hiramatsu
2023-07-19 20:49 ` [PATCH 3/5] perf bench uprobe: Show diff to previous Arnaldo Carvalho de Melo
2023-07-21 14:48 ` Masami Hiramatsu
2023-07-19 20:49 ` [PATCH 4/5] perf bench uprobe empty: Add entry attaching an empty BPF program Arnaldo Carvalho de Melo
2023-07-19 20:49 ` [PATCH 5/5] perf bench uprobe trace_printk: Add entry attaching an BPF program that does a trace_printk Arnaldo Carvalho de Melo
2023-07-19 22:41 ` [PATCHES/RFC 1/5] perf bench uprobe + BPF skel Ian Rogers
2023-07-20 13:56 ` Arnaldo Carvalho de Melo
2023-07-21 14:32 ` Masami Hiramatsu [this message]
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=20230721233219.9105d8e48d67e5eda3797e4e@kernel.org \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kcarcia@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.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 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.