[PATCH 1/7] perf tools: Track all user changed config bits

Leo Yan leo.yan at arm.com
Tue Dec 2 02:15:56 PST 2025


On Mon, Dec 01, 2025 at 04:41:04PM +0000, Coresight ML wrote:

[...]

> +#define ADD_CONFIG_CHG(format_type, term_type, new_term)		\
> +{									\
> +	struct parse_events_term *term;					\
> +	u64 bits = 0;							\
> +	int type;							\
> +									\
> +	list_for_each_entry(term, &head_config->terms, list) {		\
> +		if (term->type_term == PARSE_EVENTS__TERM_TYPE_USER) {  \
> +			type = perf_pmu__format_type(pmu, term->config);\
> +			if (type != format_type)			\
> +				continue;				\
> +			bits |= perf_pmu__format_bits(pmu, term->config); \
> +		} else if (term->type_term == term_type) {		\
> +			bits = ~(u64)0;					\
> +		}							\
> +	}								\
> +									\
> +	if (bits)							\
> +		ADD_CONFIG_TERM_VAL(new_term, cfg_chg, bits, false);	\
> +	return 0;							\

Nitpick: "return 0" is not needed here.  Otherwise:

Reviewed-by: Leo Yan <leo.yan at arm.com>



More information about the linux-arm-kernel mailing list