Skip to contentSkip to conversation

Tracing patches

GIT PULL Stefan Hajnoczi 1 participant 2 messages Jul 22, 2025

lore
Share & tools
lore
#0 lore raw

The following changes since commit ebcc602aae19c06a4f492da3920b64c8033f0d7f:

Merge tag 'display-20250718-pull-request' of https://gitlab.com/kraxel/qemu into staging (2025-07-21 12:24:36 -0400)

are available in the Git repository at:

https://gitlab.com/stefanha/qemu.git tags/tracing-pull-request

for you to fetch changes up to 2b1791323e7ce043cbc3857699e5d5b0ad021cbc:

tracetool: removed the unused vcpu property (2025-07-22 10:44:49 -0400)

----------------------------------------------------------------
Pull request

Tanish's removal of the remnants of the "vcpu" property.

----------------------------------------------------------------

Tanish Desai (1):
tracetool: removed the unused vcpu property

 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(-)
Signature · 1 line
2.50.1
#1 lore raw

[PULL 1/1] tracetool: removed the unused vcpu property

From: Tanish Desai <[email protected]>

The vcpu property is no longer used in these backends. Removing it avoids unnecessary checks and simplifies the code generation for these trace backends.

Message-id: [email protected]

---
 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(-)
scripts/tracetool/__init__.py +1 -1
index 6dfcbf71e1..2ae2e562d6 100644
@@ -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):
scripts/tracetool/backend/log.py +1 -5
index 17ba1cd90e..5c9d09dd11 100644
@@ -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) {',
scripts/tracetool/backend/simple.py +1 -5
index 2688d4b64b..7c84c06b20 100644
@@ -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);',
         '    }',
scripts/tracetool/backend/syslog.py +1 -5
index 5a3a00fe31..3f82e54aab 100644
@@ -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"',
Signature · 1 line
2.50.1