From: Tanish Desai <tanishdesai37@gmail.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, mads@ynddal.dk, stefanha@redhat.com,
Tanish Desai <tanishdesai37@gmail.com>
Subject: [PATCH v2] tracetool: removed the unused vcpu property
Date: Tue, 17 Jun 2025 18:36:19 +0000 [thread overview]
Message-ID: <20250617183619.13581-1-tanishdesai37@gmail.com> (raw)
In-Reply-To: <20250617140725.GA117267@fedora>
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 <tanishdesai37@gmail.com>
---
scripts/tracetool/__init__.py | 6 +++---
scripts/tracetool/backend/log.py | 6 +-----
scripts/tracetool/backend/simple.py | 6 +-----
scripts/tracetool/backend/syslog.py | 6 +-----
4 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index bc03238c0f..e86c898a1e 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -216,9 +216,9 @@ class Event(object):
r"\s*"
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 de27b7e62e..f24acad74c 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -31,11 +31,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 012970f6cc..6fdc1142fb 100644
--- a/scripts/tracetool/backend/syslog.py
+++ b/scripts/tracetool/backend/syslog.py
@@ -30,11 +30,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
next prev parent reply other threads:[~2025-06-17 18:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 20:12 [PATCH 0/3] tracetool:cleanup "if(true)" check from trace_foo() Tanish Desai
2025-06-16 20:12 ` [PATCH 1/3] tracetool: removed the unused vcpu property Tanish Desai
2025-06-17 14:07 ` Stefan Hajnoczi
2025-06-17 18:36 ` Tanish Desai [this message]
2025-06-17 19:43 ` Alex Bennée
2025-06-16 20:12 ` [PATCH 2/3] tracetool: introduce generate_unconditional Tanish Desai
2025-06-17 22:42 ` Alex Bennée
2025-06-18 16:23 ` Tanish Desai
2025-06-16 20:12 ` [PATCH 3/3] tracetool: remove redundant event_get_state checks Tanish Desai
2025-06-17 14:09 ` [PATCH 0/3] tracetool:cleanup "if(true)" check from trace_foo() Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250617183619.13581-1-tanishdesai37@gmail.com \
--to=tanishdesai37@gmail.com \
--cc=mads@ynddal.dk \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).