On 04/10/2019 15:40, Steven Rostedt wrote: > On Fri, 4 Oct 2019 10:10:47 +0200 > Daniel Bristot de Oliveira <[email protected]> wrote: > >> [ In addition ] >> >> Currently, ftrace_rec entries are ordered inside the group of functions, but >> "groups of function" are not ordered. So, the current int3 handler does a >> (*): >> >> for_each_group_of_functions: >> check if the ip is in the range ----> n by the number of groups. >> do a bsearch. ----> log(n) by the numbers of entry >> in the group. >> >> If, instead, it uses an ordered vector, the complexity would be log(n) by the >> total number of entries, which is better. So, how bad is the idea of: > BTW, I'm currently rewriting the grouping of the vectors, in order to > shrink the size of each dyn_ftrace_rec (as we discussed at Kernel > Recipes). I can make the groups all sorted in doing so, thus we can > load the sorted if that's needed, without doing anything special. >
Good! if you do they sorted and store the amount of entries in a variable, we can have things done for a future "optimized" version. -- Daniel

