Re: [PATCH v2 2/3] tracetool: introduce generate_unconditional

2025-06-25 Thread Stefan Hajnoczi
On Fri, Jun 20, 2025 at 02:37:19PM +, Tanish Desai wrote: > diff --git a/scripts/tracetool/format/h.py b/scripts/tracetool/format/h.py > index ea126b07ea..89d54b9aff 100644 > --- a/scripts/tracetool/format/h.py > +++ b/scripts/tracetool/format/h.py > @@ -76,13 +76,17 @@ def generate(events, bac

Re: [PATCH v2 2/3] tracetool: introduce generate_unconditional

2025-06-24 Thread Tanish Desai
> 1. nocheck isn't necessary anymore. The body of nocheck could be inlined > here instead to simplify the generated code. Yes I agree.I will remove nocheck and inline the body of nocheck in trace-foo > 2. "if (%(cond)s) {" is only useful for backends that implement > .generate(). For example, i

Re: [PATCH v2 2/3] tracetool: introduce generate_unconditional

2025-06-24 Thread Stefan Hajnoczi
On Tue, Jun 24, 2025 at 11:07:34PM +0530, Tanish Desai wrote: > > 1. nocheck isn't necessary anymore. The body of nocheck could be inlined > > here instead to simplify the generated code. > Yes I agree.I will remove nocheck and inline the body of nocheck in > trace-foo > > 2. "if (%(cond)s) {" is

[PATCH v2 2/3] tracetool: introduce generate_unconditional

2025-06-20 Thread Tanish Desai
This patch separates the generation logic of trace_foo() for the UST and DTrace backends from other backends. The motivation is to remove the unnecessary if (true) in the trace_foo() function, as UST and DTrace do not require a trace_event_get_state check without introducing a seperate function it