Re: [PATCH v4 1/2] trace-cmd: Optimize how pid filters are expressed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 17 Apr 2019 09:58:58 -0400
Phil Auld <pauld@xxxxxxxxxx> wrote:

> FILTER write /sys/kernel/debug/tracing/events/sched/sched_switch/filter (len 142) value "(common_pid<21420||common_pid>21425)&&(common_pid<21265||common_pid>21418)||(next_pid<21420||next_pid>21425)&&(next_pid<21265||next_pid>21418)"
> 
> 
> The latter is correct given precendce of && before || but I wonder if () don't make sense? I always have to look
> that one up :)

Yes, as the one who wrote the parsing code (and was lectured by
Al Viro about it), I know for a fact that && has a higher precedence
than the || and it should work. I was about to comment about that, but
then remembered my "lesson" :-)

-- Steve


> 
> If I were writing that in code I'd probably put in the extra ()s, but since it's generated and no
> one actually sees it, probably okay and simpler as is. 



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux