Re: [PATCH v3] libtracefs: An API to set the filtering of functions

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

 



On Thu, 18 Mar 2021 19:22:26 +0200
Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote:

> Looks good to me.
> Thanks Sameer!
> Acked-by: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx>

Thanks Semeer,

I'm applying version 3 of your patch.

As Tzvetomir said:

> I consider this patch as a good foundation for the API, but we should
> work on some optimizations on top of it, in separate patches. What
> else should be added, when this patch is merged:
>  1. A unit test of the API
>  2. Man page of the API

Feel free to send us a unit test of the API, that would be most useful.

You can also work on a man page as well.

>  3. Optimizations: new kernels support writing indexes instead of
> strings into the "set_ftrace_filter" file. This is faster, as there is
> no string comparison in the kernel context. The function index can be
> retrieved from "available_filter_functions" files - the first function
> is with index 0, the next is 1 ... and so forth. So, the possible
> optimization of the API is to check - if the kernel supports indexes,
> use it, or fail back to the legacy logic with strings.

There was a task I had where I needed the above work completed and had to
write it myself. Since it is already completed, there's no reason to have
you work on something that is not needed anymore. The code I wrote only
works for Linux kernels 5.1 and beyond. The code you wrote here is needed
for kernels older than that. Knowing that you were working on this code, I
just tested if the optimization existed, and if not, it would fail. Now I
can make it fall back to your code instead of failing.

As the man pages and the unit tests are still needed, we are looking
forward for your continued contribution to the tracing libraries.

Thanks!

-- Steve



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

  Powered by Linux