lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fVF6yE-Lo3xpqLz7ZyZ6sXzPvDTij6BcrYzjvMTEi+jRg@mail.gmail.com>
Date:   Wed, 19 Jul 2023 15:41:54 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Namhyung Kim <namhyung@...nel.org>, Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jiri Olsa <jolsa@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Clark Williams <williams@...hat.com>,
        Kate Carcia <kcarcia@...hat.com>, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org,
        Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCHES/RFC 1/5] perf bench uprobe + BPF skel

On Wed, Jul 19, 2023 at 1:49 PM Arnaldo Carvalho de Melo
<acme@...nel.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@...e ~]# 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@...e ~]
>
> 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?

No problems. Perhaps it would be interesting to measure the uprobe
overhead compared to say the overhead attaching to the nanosleep
syscall?

Thanks,
Ian

> - 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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ