Re: [PATCH] perf stat: Create '--add-default' option to append default list

From: Andi Kleen
Date: Fri Mar 12 2021 - 10:15:17 EST


On Tue, Dec 22, 2020 at 09:11:31AM +0800, Jin Yao wrote:
> The event default list includes the most common events which are widely
> used by users. But with -e option, the current perf only counts the events
> assigned by -e option. Users may want to collect some extra events with
> the default list. For this case, users have to manually add all the events
> from the default list. It's inconvenient. Also, users may don't know how to
> get the default list.
>
> It's better to add a new option to append default list to the -e events.
> The new option is '--add-default'.

A more concise syntax would be -e +event

The + would apply to the whole event list if there are multiple.

and maybe -event too to remove something from the default list.

-Andi