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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Mar 2019 21:07:20 +0000
From:   Song Liu <songliubraving@...com>
To:     "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
CC:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <Kernel-team@...com>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "acme@...hat.com" <acme@...hat.com>,
        "jolsa@...nel.org" <jolsa@...nel.org>,
        "namhyung@...nel.org" <namhyung@...nel.org>,
        "sdf@...ichev.me" <sdf@...ichev.me>
Subject: Re: [PATCH v8 perf,bpf 10/15] perf-top: add option --no-bpf-event



> On Mar 11, 2019, at 12:55 PM, Song Liu <songliubraving@...com> wrote:
> 
> bpf events should be tracked by default for perf-top. This patch makes it
> on by default, and adds option to disable bpf events.
> 
> Signed-off-by: Song Liu <songliubraving@...com>
> ---
> tools/perf/builtin-top.c | 3 +++
> tools/perf/util/top.h    | 1 +
> 2 files changed, 4 insertions(+)
> 
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index 27d8d42e0a4d..ccdf5689452f 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -1492,6 +1492,7 @@ int cmd_top(int argc, const char **argv)
> 		    "Display raw encoding of assembly instructions (default)"),
> 	OPT_BOOLEAN(0, "demangle-kernel", &symbol_conf.demangle_kernel,
> 		    "Enable kernel symbol demangling"),
> +	OPT_BOOLEAN(0, "no-bpf-event", &top.no_bpf_event, "do not record bpf events"),
> 	OPT_STRING(0, "objdump", &top.annotation_opts.objdump_path, "path",
> 		    "objdump binary to use for disassembly and annotations"),
> 	OPT_STRING('M', "disassembler-style", &top.annotation_opts.disassembler_style, "disassembler style",
> @@ -1651,6 +1652,8 @@ int cmd_top(int argc, const char **argv)
> 		signal(SIGWINCH, winch_sig);
> 	}
> 
> +	top.record_opts.bpf_event = !top.no_bpf_event;
> +
> 	status = __cmd_top(&top);
> 
> out_delete_evlist:
> diff --git a/tools/perf/util/top.h b/tools/perf/util/top.h
> index 19f95eaf75c8..862a37bd27ea 100644
> --- a/tools/perf/util/top.h
> +++ b/tools/perf/util/top.h
> @@ -32,6 +32,7 @@ struct perf_top {
> 	bool		   use_tui, use_stdio;
> 	bool		   vmlinux_warned;
> 	bool		   dump_symtab;
> +	bool		   no_bpf_event;
> 	struct hist_entry  *sym_filter_entry;
> 	struct perf_evsel  *sym_evsel;
> 	struct perf_session *session;
> -- 
> 2.17.1
> 

Hi Arnaldo, 

Currently, we have bpf-event default OFF for perf-record, with option to 
turn it ON; while bpf-event is default ON for perf-top, with option to 
turn if OFF. I think this is a little confusing. 

How about we set them both to default ON, and add option to turn it OFF?
I think we still have time to make the change. 

Thanks,
Song



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ