From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Mads Ynddal" <mads@ynddal.dk>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Yoshinori Sato" <ysato@users.sourceforge.jp>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Zhao Liu" <zhao1.liu@intel.com>
Subject: [PULL 1/6] tracetool: Remove unused vcpu.py script
Date: Mon, 10 Jun 2024 13:13:10 -0400 [thread overview]
Message-ID: <20240610171315.346143-2-stefanha@redhat.com> (raw)
In-Reply-To: <20240610171315.346143-1-stefanha@redhat.com>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
vcpu.py is pointless since commit 89aafcf2a7 ("trace:
remove code that depends on setting vcpu"), remote it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-id: 20240606102631.78152-1-philmd@linaro.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
meson.build | 1 -
scripts/tracetool/__init__.py | 8 +----
scripts/tracetool/vcpu.py | 59 -----------------------------------
3 files changed, 1 insertion(+), 67 deletions(-)
delete mode 100644 scripts/tracetool/vcpu.py
diff --git a/meson.build b/meson.build
index ec59effca2..91278667ea 100644
--- a/meson.build
+++ b/meson.build
@@ -3232,7 +3232,6 @@ tracetool_depends = files(
'scripts/tracetool/format/log_stap.py',
'scripts/tracetool/format/stap.py',
'scripts/tracetool/__init__.py',
- 'scripts/tracetool/vcpu.py'
)
qemu_version_cmd = [find_program('scripts/qemu-version.sh'),
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index b887540a55..7237abe0e8 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -306,13 +306,7 @@ def build(line_str, lineno, filename):
fmt = [fmt_trans, fmt]
args = Arguments.build(groups["args"])
- event = Event(name, props, fmt, args, lineno, filename)
-
- # add implicit arguments when using the 'vcpu' property
- import tracetool.vcpu
- event = tracetool.vcpu.transform_event(event)
-
- return event
+ return Event(name, props, fmt, args, lineno, filename)
def __repr__(self):
"""Evaluable string representation for this object."""
diff --git a/scripts/tracetool/vcpu.py b/scripts/tracetool/vcpu.py
deleted file mode 100644
index d232cb1d06..0000000000
--- a/scripts/tracetool/vcpu.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
-Generic management for the 'vcpu' property.
-
-"""
-
-__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
-__copyright__ = "Copyright 2016, Lluís Vilanova <vilanova@ac.upc.edu>"
-__license__ = "GPL version 2 or (at your option) any later version"
-
-__maintainer__ = "Stefan Hajnoczi"
-__email__ = "stefanha@redhat.com"
-
-
-from tracetool import Arguments, try_import
-
-
-def transform_event(event):
- """Transform event to comply with the 'vcpu' property (if present)."""
- if "vcpu" in event.properties:
- event.args = Arguments([("void *", "__cpu"), event.args])
- fmt = "\"cpu=%p \""
- event.fmt = fmt + event.fmt
- return event
-
-
-def transform_args(format, event, *args, **kwargs):
- """Transforms the arguments to suit the specified format.
-
- The format module must implement function 'vcpu_args', which receives the
- implicit arguments added by the 'vcpu' property, and must return suitable
- arguments for the given format.
-
- The function is only called for events with the 'vcpu' property.
-
- Parameters
- ==========
- format : str
- Format module name.
- event : Event
- args, kwargs
- Passed to 'vcpu_transform_args'.
-
- Returns
- =======
- Arguments
- The transformed arguments, including the non-implicit ones.
-
- """
- if "vcpu" in event.properties:
- ok, func = try_import("tracetool.format." + format,
- "vcpu_transform_args")
- assert ok
- assert func
- return Arguments([func(event.args[:1], *args, **kwargs),
- event.args[1:]])
- else:
- return event.args
--
2.45.1
next prev parent reply other threads:[~2024-06-10 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 17:13 [PULL 0/6] Tracing patches Stefan Hajnoczi
2024-06-10 17:13 ` Stefan Hajnoczi [this message]
2024-06-10 17:13 ` [PULL 2/6] backends/tpm: Remove newline character in trace event Stefan Hajnoczi
2024-06-10 17:13 ` [PULL 3/6] hw/sh4: Remove newline character in trace events Stefan Hajnoczi
2024-06-10 17:13 ` [PULL 4/6] hw/usb: " Stefan Hajnoczi
2024-06-10 17:13 ` [PULL 5/6] hw/vfio: " Stefan Hajnoczi
2024-06-10 17:13 ` [PULL 6/6] tracetool: Forbid newline character in event format Stefan Hajnoczi
2024-06-12 23:00 ` [PULL 0/6] Tracing patches Richard Henderson
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=20240610171315.346143-2-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=mads@ynddal.dk \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=stefanb@linux.vnet.ibm.com \
--cc=thuth@redhat.com \
--cc=ysato@users.sourceforge.jp \
--cc=zhao1.liu@intel.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).