Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-09 Thread Paolo Bonzini
Il lun 9 giu 2025, 20:27 Stefan Hajnoczi ha scritto: > > If you disagree with this change we can certainly live without them---I > > asked Tanish to start with this as an exercise to get familiar with > > tracetool, and he's learnt a bunch of things around git anyway so it's > > all good. > > A m

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-09 Thread Stefan Hajnoczi
On Thu, Jun 5, 2025 at 2:49 PM Paolo Bonzini wrote: > > On 6/5/25 20:37, Stefan Hajnoczi wrote: > > On Thu, Jun 5, 2025 at 9:57 AM Paolo Bonzini wrote: > >>> It's easier to understand the code generator and the generated code when > >>> each trace event is implemented as a single function in the

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-05 Thread Paolo Bonzini
Il gio 5 giu 2025, 21:20 Daniel P. Berrangé ha scritto: > > > How is this patch series related to Rust tracing? If generated code > > > needs to be restructured so Rust can call it, then that's a strong > > > justification. > > Well, moving code to the .c file would make it possible to call it in

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-05 Thread Daniel P . Berrangé
On Thu, Jun 05, 2025 at 08:49:36PM +0200, Paolo Bonzini wrote: > On 6/5/25 20:37, Stefan Hajnoczi wrote: > > On Thu, Jun 5, 2025 at 9:57 AM Paolo Bonzini wrote: > > > > It's easier to understand the code generator and the generated code when > > > > each trace event is implemented as a single func

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-05 Thread Paolo Bonzini
On 6/5/25 20:37, Stefan Hajnoczi wrote: On Thu, Jun 5, 2025 at 9:57 AM Paolo Bonzini wrote: It's easier to understand the code generator and the generated code when each trace event is implemented as a single function in the header file. Splitting the trace event up adds complexity. I don't thi

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-05 Thread Stefan Hajnoczi
On Thu, Jun 5, 2025 at 9:57 AM Paolo Bonzini wrote: > > On 6/3/25 00:24, Stefan Hajnoczi wrote: > > On Sun, Jun 01, 2025 at 06:12:30PM +, Tanish Desai wrote: > >> Moved rarely used (cold) code from the header file to the C file to avoid > >> unnecessary inlining and reduce binary size. > > > >

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-05 Thread Paolo Bonzini
On 6/3/25 00:24, Stefan Hajnoczi wrote: On Sun, Jun 01, 2025 at 06:12:30PM +, Tanish Desai wrote: Moved rarely used (cold) code from the header file to the C file to avoid unnecessary inlining and reduce binary size. How much of a binary size reduction do you measure? Most trace events are

Re: [PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-02 Thread Stefan Hajnoczi
On Sun, Jun 01, 2025 at 06:12:30PM +, Tanish Desai wrote: > Moved rarely used (cold) code from the header file to the C file to avoid > unnecessary inlining and reduce binary size. How much of a binary size reduction do you measure? Most trace events are only called once, so the difference in

[PATCH 2/3] trace/ftrace: seperate cold paths of tracing functions

2025-06-01 Thread Tanish Desai
Moved rarely used (cold) code from the header file to the C file to avoid unnecessary inlining and reduce binary size. This improves code organization and follows good practices for managing cold paths. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/ftrace.py | 44