[PATCH v16 4/4] eal: add PMU support to tracing library

Stephen Hemminger stephen at networkplumber.org
Tue Dec 3 22:41:06 CET 2024


On Mon, 18 Nov 2024 08:37:06 +0100
Tomasz Duszynski <tduszynski at marvell.com> wrote:

> +
> +	/* events are matched against occurrences of e=ev1[,ev2,..] pattern */
> +	ret = regcomp(&reg, "e=([_[:alnum:]-],?)+", REG_EXTENDED);
> +	if (ret) {
> +		PMU_LOG(ERR, "Failed to compile event matching regexp");
> +		return -EINVAL;
> +	}
> +
> +	for (;;) {
> +		if (regexec(&reg, pattern, 1, &rmatch, 0))
> +			break;
> +

As with log parameters. Regex is harder to work with than a glob based syntax.


More information about the dev mailing list