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

Tomasz Duszynski tduszynski at marvell.com
Wed Jan 8 09:31:30 CET 2025


>> +
>> +	/* 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.

That regex is for --trace and --trace parameter is inherited from tracing library and that itself takes a regex. I don't that 
patch should tinker with existing behavior. 


More information about the dev mailing list