Re: [PATCH v3 0/2] libtracecmd: Support changing /proc/kallsyms

Ilya Leoshkevich <[email protected]> Mon, 11 Aug 2025 10:22:39 +0200
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
On Fri, 2025-07-11 at 15:25 +0200, Ilya Leoshkevich wrote:
> v2:
> https://lore.kernel.org/linux-trace-devel/[email protected]/
> v2 -> v3: Add a comment and some newlines (Steven).
> 
> v1:
> https://lore.kernel.org/linux-trace-devel/[email protected]/
> v1 -> v2: Rewrite the size instead of reading the file twice
> (Steven).
>           Turns out exposing do_lseek() is not necessary, since
>           everything is in the same C file.
> 
> Hi,
> 
> this series fixes tracing in presence of frequent BPF or kernel
> module
> loads/unloads. Patch 1 is a small required improvement; patch 2 is
> the
> actual implementation.
> 
> The problem can be reproduced like this:
> 
>     # while true; do rmmod loop; modprobe loop; done &
> 
>     # while trace-cmd record -p function_graph /bin/true; do :; done
>       plugin 'function_graph'
>     libtracecmd: Invalid argument
>       error in size of file '/proc/kallsyms'
>     trace-cmd: Invalid argument
>       Error creating output file
> 
> Best regards,
> Ilya
> 
> Ilya Leoshkevich (2):
>   libtracecmd: Support querying position within a new compressed
> block
>   libtracecmd: Support changing /proc/kallsyms
> 
>  lib/trace-cmd/trace-compress.c |  5 ++++-
>  lib/trace-cmd/trace-output.c   | 38
> +++++++++++++++++++++++++++++++++-
>  2 files changed, 41 insertions(+), 2 deletions(-)

Gentle ping.