Re: [PATCH] perf, tools, script: Allow adding and removing fields

Jiri Olsa
2017-05-09T17:05:37Z

On Tue, May 09, 2017 at 07:36:37AM -0700, Andi Kleen wrote:

SNIP

> + } else {
> + if (change == REMOVE)
> + output[j].fields &= ~all_output_options[i].field;
> + else
> + output[j].fields |= all_output_options[i].field;
> + }
> }
> } else {
> if (output[type].invalid_fields & all_output_options[i].field) {
> @@ -1826,10 +1852,15 @@ static int parse_output_fields(const struct option *opt __maybe_unused,
> "Events will not be displayed.\n", event_type(type));
> }
> }
> + goto out;
>
> +out_badmix:
> + fprintf(stderr, "Cannot mix +-field with overridden fields\n");
> + rc = -EINVAL;
> out:
> free(str);
> return rc;
> +
> }

extra new line, but I guess Arnaldo could remove that ;-)

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka