Re: [PATCH v3] tracetool: generates conitional checks when needed

2025-06-26 Thread Tanish Desai
> > > > This patch does not apply to qemu.git/master. When posting new revisions > > of patches, please resend the entire patch series that this belongs to > > or send it as a separate patch with the Based-on: trailer > > to let people (and tools) know which unmerged patch series it depends > > on

[PATCH v3] tracetool: generates conitional checks when needed

2025-06-25 Thread Tanish Desai
Adds generate_conditional, allowing backends to wrap generate() output in a trace_event_get_state(...) check if needed. Removes no_check by inlining its logic into trace_foo(...). Also ensures the generated code is formatted properly. Signed-off-by: Tanish Desai --- scripts/tracetool/backend

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

2025-06-24 Thread Tanish Desai
condition, it's better handled directly in backend/*.py. On Tue, Jun 24, 2025 at 8:07 PM Stefan Hajnoczi wrote: > 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 e

Re: [PATCH v2 1/3] tracetool: removed the unused vcpu property

2025-06-20 Thread Tanish Desai
Noted will take care for all upcoming patches. For this patch should I resend it with r-b tags from v1 or this patch it’s fine for now? On Fri, 20 Jun 2025 at 9:43 PM, Alex Bennée wrote: > Tanish Desai writes: > > > The vcpu property is no longer used in these backends. Removi

Re: [PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo()

2025-06-20 Thread Tanish Desai
Sorry forgot to CC Alex and Paolo . On Fri, 20 Jun 2025 at 8:07 PM, Tanish Desai wrote: > This series of patch aims to removes the leftover if (true) condition > from trace_foo, a remnant from the TCG tracing feature removal. > > It replaces it with a proper trace_event_get_state(

[PATCH v2 3/3] tracetool: remove redundant event_get_state checks

2025-06-20 Thread Tanish Desai
backends and simplifying their code generation. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/ftrace.py | 3 --- scripts/tracetool/backend/log.py| 5 + scripts/tracetool/backend/simple.py | 7 +-- scripts/tracetool/backend/syslog.py | 7 +-- scripts/tracetool/format/h.py

[PATCH v2 0/3] tracetool: cleanup "if(true)" check from trace_foo()

2025-06-20 Thread Tanish Desai
the generation of trace_event_get_state(...) calls into format/h.py, eliminating redundant code across individual backends. This cleanup results in more consistent and less repetitive backend code. Tanish Desai (3): tracetool: removed the unused vcpu property tracetool: introduce

[PATCH v2 1/3] tracetool: removed the unused vcpu property

2025-06-20 Thread Tanish Desai
The vcpu property is no longer used in these backends. Removing it avoids unnecessary checks and simplifies the code generation for these trace backends. Signed-off-by: Tanish Desai --- scripts/tracetool/__init__.py | 6 +++--- scripts/tracetool/backend/log.py| 6 +- scripts

[PATCH v2 2/3] tracetool: introduce generate_unconditional

2025-06-20 Thread Tanish Desai
introduced for UST and DTrace. It behaves similarly to generate_h, but is defined only in UST and DTrace backends. This ensures that generate_h is used by the other backends, while UST/DTrace selectively use generate_h_unconditional. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/__init__

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

2025-06-18 Thread Tanish Desai
> Please fix the word wrap on the commit at 78 chars. I will send v2 with this fix > stray newline In tracetool/backend, every function is followed by two newline characters. On Wed, Jun 18, 2025 at 4:12 AM Alex Bennée wrote: > Tanish Desai writes: > > > This patch separa

[PATCH v2] tracetool: removed the unused vcpu property

2025-06-17 Thread Tanish Desai
The vcpu property is no longer used in these backends. Removing it avoids unnecessary checks and simplifies the code generation for these trace backends. Signed-off-by: Tanish Desai --- scripts/tracetool/__init__.py | 6 +++--- scripts/tracetool/backend/log.py| 6 +- scripts

[PATCH 2/3] tracetool: introduce generate_unconditional

2025-06-16 Thread Tanish Desai
introduced for UST and DTrace. It behaves similarly to generate_h, but is defined only in UST and DTrace backends. This ensures that generate_h is used by the other backends, while UST/DTrace selectively use generate_h_unconditional. Signed-off-by: Tanish Desai --- scripts/tracetool/backend

[PATCH 1/3] tracetool: removed the unused vcpu property

2025-06-16 Thread Tanish Desai
The vcpu property is no longer used in these backends. Removing it avoids unnecessary checks and simplifies the code generation for these trace backends. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/log.py| 6 +- scripts/tracetool/backend/simple.py | 6 +- scripts

[PATCH 3/3] tracetool: remove redundant event_get_state checks

2025-06-16 Thread Tanish Desai
Moved trace_event_get_state check from _no_check_trace_foo to trace_foo, and removed if (true) checks. The _no_check_trace_foo now only emits backend-specific core logic, avoiding trace event conditionals entirely. This brings conditional logic in format/h.py, reducing duplication across backends

[PATCH 0/3] tracetool:cleanup "if(true)" check from trace_foo()

2025-06-16 Thread Tanish Desai
generation of trace_event_get_state(...) calls into format/h.py, eliminating redundant code across individual backends. This cleanup results in more consistent and less repetitive backend code. Tanish Desai (3): tracetool: removed the unused vcpu property tracetool: introduce

Fwd: Some doubts regarding scripts/tracetool/backend/*.py

2025-06-16 Thread Tanish Desai
-- Forwarded message - From: Stefan Hajnoczi Date: Tue, Jun 17, 2025 at 12:00 AM Subject: Re: Some doubts regarding scripts/tracetool/backend/*.py To: Tanish Desai On Mon, Jun 16, 2025 at 12:48 AM Tanish Desai wrote: Please CC qemu-devel and Paolo Bonzini so that others can

Re: [PATCH] utils/log: add qemu_log_timestamp() to encapsulate timestamp logging

2025-06-12 Thread Tanish Desai
Thank you everyone for the review I have shared [PATCH v2] utils/log: add qemu_log_timestamp() in a separate mail thread with the suggested changes. On Tue, 10 Jun 2025 at 12:37 AM, Stefan Hajnoczi wrote: > On Mon, Jun 9, 2025 at 2:21 PM Tanish Desai > wrote: > > > > M

[PATCH v2] utils/log: add qemu_log_timestamp()

2025-06-12 Thread Tanish Desai
when many trace points are present. On Ubuntu 22 with ./configure --target-list=aarch64-softmmu --enable-kvm --enable-trace-backends=log, this change reduced the build directory size significantly(~3%). Signed-off-by: Tanish Desai --- include/qemu/log-for-trace.h | 3 +++ scripts/tracetool

Re: [PATCH] utils/log: add qemu_log_timestamp() to encapsulate timestamp logging

2025-06-09 Thread Tanish Desai
Two files are attached to show the folder-wise size (in bytes) before and after the change. Each file lists the folder names along with their corresponding sizes. On Mon, Jun 9, 2025 at 11:51 PM Tanish Desai wrote: > Moved the logic for timestamped logging (~6 lines) from > a_nocheck__tra

[PATCH] utils/log: add qemu_log_timestamp() to encapsulate timestamp logging

2025-06-09 Thread Tanish Desai
: ~3 MB A detailed report of size changes (in bytes) for relevant folders and subfolders will follow in a trailing mail. Signed-off-by: Tanish Desai --- include/qemu/log-for-trace.h | 3 +++ scripts/tracetool/backend/log.py | 13 + util/log.c | 18

Re: [PATCH 1/3] trace/syslog: seperate cold paths of tracing functions

2025-06-04 Thread Tanish Desai
olating symbols more carefully to get accurate binary size comparisons. On Tue, Jun 3, 2025 at 3:56 AM Stefan Hajnoczi wrote: > On Sun, Jun 01, 2025 at 06:12:29PM +, Tanish Desai wrote: > > inline: move hot paths from .c to .h for better performance > > Moved frequently used h

[PATCH 3/3] trace/log: seperate cold path of tracing functions

2025-06-01 Thread Tanish Desai
Moved frequently used hot paths from the .c file to the .h file to enable inlining and improve performance. This approach is inspired by past QEMU optimizations, where performance-critical code was inlined based on profiling results. Signed-off-by: Tanish Desai --- scripts/tracetool/backend

[PATCH 1/3] trace/syslog: seperate cold paths of tracing functions

2025-06-01 Thread Tanish Desai
. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/syslog.py | 36 +++-- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py index 012970f6cc..52b8ff65ea 100644 --- a/scripts

[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

[PATCH 0/3] trace: seperate cold path of trace

2025-06-01 Thread Tanish Desai
the tracing infrastructure cleaner, more maintainable, and better optimized for diverse compiler behaviors. Tanish Desai (3): trace/syslog: seperate cold paths of tracing functions trace/ftrace: seperate cold paths of tracing functions trace/log: seperate cold path of tracing functions

Re: [PATCH] trace/simple: seperate hot paths of tracing fucntions

2025-05-28 Thread Tanish Desai
I have shared v2 with updated commit msg to everyone in form of a new PATCH. Please check it and let me know if anything is still missing or confusing. On Wed, 28 May 2025 at 11:36 PM, Stefan Hajnoczi wrote: > On Mon, May 26, 2025 at 10:51 PM Tanish Desai > wrote: > > > > &

[PATCH] trace/simple: seperate hot paths of tracing fucntions

2025-05-28 Thread Tanish Desai
tructions in the tracing fast path. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/simple.py | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py index a74d61fcd6..2

Re: [PATCH] trace/simple: seperate hot paths of tracing fucntions

2025-05-26 Thread Tanish Desai
2025, 21:01 Stefan Hajnoczi ha > scritto: > >> > >> On Mon, May 19, 2025 at 2:52 PM Tanish Desai > wrote: > >> > > >> > Remove hot paths from .c file and added it in .h file to keep it > inline. > >> > >> Please include performance res

[PATCH] trace/simple: seperate hot paths of tracing fucntions

2025-05-19 Thread Tanish Desai
Remove hot paths from .c file and added it in .h file to keep it inline. Signed-off-by: Tanish Desai --- scripts/tracetool/backend/simple.py | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool

Re: [PATCH] Fix duplicate symbol error on MacOS build

2025-03-19 Thread Tanish Desai
7:19 PM, Philippe Mathieu-Daudé wrote: > On 19/3/25 14:44, Peter Maydell wrote: > > On Wed, 19 Mar 2025 at 12:53, Tanish Desai > wrote: > >> > >> The issue started after commit > https://github.com/qemu/qemu/commit/59f4d65584bd3372070e2484876436c8d02505e4 >

[PATCH] Fix duplicate symbol error on MacOS build

2025-03-19 Thread Tanish Desai
UST is true, X_PL011_RUST should be selected instead of CONFIG_PL011. Signed-off-by: Tanish Desai --- hw/vmapple/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/vmapple/Kconfig b/hw/vmapple/Kconfig index 2382b297672..01bcbf40e00 100644 --- a/hw/vmapple/Kconfig +++ b/hw