* [PATCH] tracetool: removed the unused vcpu property
@ 2025-07-22 11:43 Tanish Desai
2025-07-22 14:45 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Tanish Desai @ 2025-07-22 11:43 UTC (permalink / raw)
To: qemu-devel; +Cc: pbonzini, stefanha, alex.bennee, 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.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Tanish Desai <tanishdesai37@gmail.com>
---
scripts/tracetool/__init__.py | 2 +-
scripts/tracetool/backend/log.py | 6 +-----
scripts/tracetool/backend/simple.py | 6 +-----
scripts/tracetool/backend/syslog.py | 6 +-----
4 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 6dfcbf71e1..2ae2e562d6 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -219,7 +219,7 @@ class Event(object):
r"(?:(?:(?P<fmt_trans>\".+),)?\s*(?P<fmt>\".+))?"
r"\s*")
- _VALID_PROPS = set(["disable", "vcpu"])
+ _VALID_PROPS = set(["disable"])
def __init__(self, name, props, fmt, args, lineno, filename, orig=None,
event_trans=None, event_exec=None):
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
index 17ba1cd90e..5c9d09dd11 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -29,11 +29,7 @@ def generate_h(event, group):
if len(event.args) > 0:
argnames = ", " + argnames
- if "vcpu" in event.properties:
- # already checked on the generic format code
- cond = "true"
- else:
- cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
+ cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
out(' if (%(cond)s && qemu_loglevel_mask(LOG_TRACE)) {',
' if (message_with_timestamp) {',
diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py
index 2688d4b64b..7c84c06b20 100644
--- a/scripts/tracetool/backend/simple.py
+++ b/scripts/tracetool/backend/simple.py
@@ -37,11 +37,7 @@ def generate_h_begin(events, group):
def generate_h(event, group):
event_id = 'TRACE_' + event.name.upper()
- if "vcpu" in event.properties:
- # already checked on the generic format code
- cond = "true"
- else:
- cond = "trace_event_get_state(%s)" % event_id
+ cond = "trace_event_get_state(%s)" % event_id
out(' if (%(cond)s) {',
' _simple_%(api)s(%(args)s);',
' }',
diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py
index 5a3a00fe31..3f82e54aab 100644
--- a/scripts/tracetool/backend/syslog.py
+++ b/scripts/tracetool/backend/syslog.py
@@ -28,11 +28,7 @@ def generate_h(event, group):
if len(event.args) > 0:
argnames = ", " + argnames
- if "vcpu" in event.properties:
- # already checked on the generic format code
- cond = "true"
- else:
- cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
+ cond = "trace_event_get_state(%s)" % ("TRACE_" + event.name.upper())
out(' if (%(cond)s) {',
'#line %(event_lineno)d "%(event_filename)s"',
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tracetool: removed the unused vcpu property
2025-07-22 11:43 [PATCH] tracetool: removed the unused vcpu property Tanish Desai
@ 2025-07-22 14:45 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2025-07-22 14:45 UTC (permalink / raw)
To: Tanish Desai; +Cc: qemu-devel, pbonzini, alex.bennee
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
On Tue, Jul 22, 2025 at 11:43:52AM +0000, Tanish Desai wrote:
> The vcpu property is no longer used in these backends. Removing it avoids
> unnecessary checks and simplifies the code generation for these trace
> backends.
>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Tanish Desai <tanishdesai37@gmail.com>
> ---
> scripts/tracetool/__init__.py | 2 +-
> scripts/tracetool/backend/log.py | 6 +-----
> scripts/tracetool/backend/simple.py | 6 +-----
> scripts/tracetool/backend/syslog.py | 6 +-----
> 4 files changed, 4 insertions(+), 16 deletions(-)
Thanks, applied to my tracing tree:
https://gitlab.com/stefanha/qemu/commits/tracing
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-22 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22 11:43 [PATCH] tracetool: removed the unused vcpu property Tanish Desai
2025-07-22 14:45 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).