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:   Thu, 25 May 2017 10:08:26 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     David Carrillo-Cisneros <davidcc@...gle.com>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        David Ahern <dsa@...ulusnetworks.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v2 11/13] perf header: change FEAT_OP* macros

On Tue, May 23, 2017 at 12:48:51AM -0700, David Carrillo-Cisneros wrote:
> There are three FEAT_OP* macros:
>   - FEAT_OPA: for features without process record.
>   - FEAT_OPP: for features with process record.
>   - FEAT_OPF: like FEAT_OPP but to show only if show_full_info flags
>     is set.
> 
> To add pipe-mode headers we need to specify whether a feature generates a
> corresponding sample record. This is an extra variation to the existing

nit, the sample word here is confusing, it's an aux event

> macros. To simplify, redefine macros instead so that:
>   - show_full_info is specified as an argument (to remove the
>   FEAT_OPF variation) and,
>   - it always sets "process" handler (to remove the FEAT_OPA variation).
>   Individual process handlers can be NULLed individually.
> 
> This allows to define two variations only:
>   - FEAT_OPR: has sample record.
>   - FEAT_OPN: doesn't has sample record.
> 
> Signed-off-by: David Carrillo-Cisneros <davidcc@...gle.com>
> ---
>  tools/perf/util/header.c | 72 +++++++++++++++++++++++++++++-------------------
>  1 file changed, 44 insertions(+), 28 deletions(-)
> 
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index b7704b30ed52..7aa84a02b9bd 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -11,6 +11,7 @@
>  #include <linux/list.h>
>  #include <linux/kernel.h>
>  #include <linux/bitops.h>
> +#include <linux/stringify.h>
>  #include <sys/stat.h>
>  #include <sys/types.h>
>  #include <sys/utsname.h>
> @@ -2106,42 +2107,57 @@ struct feature_ops {
>  	int (*process)(struct feat_fd *fd, void *data);
>  	const char *name;
>  	bool full_only;
> +	bool has_record;

'synthesize' might be better choice

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ