On Tue, Feb 9, 2021 at 11:06 AM Alexei Starovoitov <ast@xxxxxx> wrote: > > On 2/8/21 12:51 PM, Andrii Nakryiko wrote: > >> start = sched_clock(); > >> + if (unlikely(!start)) > >> + start = NO_START_TIME; > >> + } > >> return start; > > > > > > Oh, and actually, given you have `start > NO_START_TIME` condition in > > exit function, you don't need this `if (unlikely(!start))` bit at all, > > because you are going to ignore both 0 and 1. So maybe no need for a > > new function, but no need for extra if as well. > > This unlikely(!start) is needed for very unlikely case when > sched_clock() returns 0. In such case the prog should still be executed. > oh, right, I forgot we now skip execution when start == 0. Then I guess the point of a helper function stands. > >