From nobody Mon Nov 25 07:51:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1718039671; cv=none; d=zohomail.com; s=zohoarc; b=H2rdz3p8YMjoeE3tLMDlB3Q6pnB9NkLpA9QOQNqVHG0gJI/FC65SUM/q0LRsEr13PDg6hvt8Jf2sV4jYDkTWSmmfIzycSlsftlHzgyTwPunAAHJ4s//+cGIS5IUVUqTLxorj43lrRWVcC5E/lfW/Dd3Cjh422N/KaUUBPXG48Ss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718039671; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OP+/NofEHfriZHjVuD5xeoqav13ZMnkO9pmZ52xvGDY=; b=ZftsGqU0O23jI+bCIaah9UWUOPRPIIyjIarnC0EO0qT1PgRkU74h7bdkhuDYyHs/7H2FPMsQ3Kxpl3qERUtOM2ducpQ2CoBmRTHOOYZDCSY1QHUCSXKwoqY7JnIRdLkWhe7e4LVoGWksbWnWK/i127LljcONMnjK4ZDVRNdkglA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718039671161968.8569305799181; Mon, 10 Jun 2024 10:14:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGiao-0003zT-BF; Mon, 10 Jun 2024 13:14:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGiam-0003yu-6U for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:14:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGiak-000185-AH for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:13:59 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-280-y3nd2ZAlMmKeZfU0jzh2NQ-1; Mon, 10 Jun 2024 13:13:54 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F0641955F30; Mon, 10 Jun 2024 17:13:51 +0000 (UTC) Received: from localhost (unknown [10.39.195.112]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3D7181956089; Mon, 10 Jun 2024 17:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718039637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OP+/NofEHfriZHjVuD5xeoqav13ZMnkO9pmZ52xvGDY=; b=Xsx89PNJ5pvv36qxBqJZuAHSE1gOVDnLc8n5Y+NUZ3Dy6ETXwLS9tX5Ob+BjIqocoHPlj8 vqoK2tqqdv6rS/NxvXjsvshKs398PDoZKLAexZd7jgLEeNuLvt0yvayPkqKRgERREInMkM zgiZ7IgdQwxkD9192bQXVfZRhpoHR7E= X-MC-Unique: y3nd2ZAlMmKeZfU0jzh2NQ-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , Stefan Hajnoczi , Richard Henderson , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Mads Ynddal , Alex Williamson , Yoshinori Sato , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Berger , Zhao Liu Subject: [PULL 1/6] tracetool: Remove unused vcpu.py script Date: Mon, 10 Jun 2024 13:13:10 -0400 Message-ID: <20240610171315.346143-2-stefanha@redhat.com> In-Reply-To: <20240610171315.346143-1-stefanha@redhat.com> References: <20240610171315.346143-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.143, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1718039672005100005 From: Philippe Mathieu-Daud=C3=A9 vcpu.py is pointless since commit 89aafcf2a7 ("trace: remove code that depends on setting vcpu"), remote it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Zhao Liu Message-id: 20240606102631.78152-1-philmd@linaro.org Signed-off-by: Stefan Hajnoczi --- 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 =3D files( 'scripts/tracetool/format/log_stap.py', 'scripts/tracetool/format/stap.py', 'scripts/tracetool/__init__.py', - 'scripts/tracetool/vcpu.py' ) =20 qemu_version_cmd =3D [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 =3D [fmt_trans, fmt] args =3D Arguments.build(groups["args"]) =20 - event =3D Event(name, props, fmt, args, lineno, filename) - - # add implicit arguments when using the 'vcpu' property - import tracetool.vcpu - event =3D tracetool.vcpu.transform_event(event) - - return event + return Event(name, props, fmt, args, lineno, filename) =20 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__ =3D "Llu=C3=ADs Vilanova " -__copyright__ =3D "Copyright 2016, Llu=C3=ADs Vilanova " -__license__ =3D "GPL version 2 or (at your option) any later version" - -__maintainer__ =3D "Stefan Hajnoczi" -__email__ =3D "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 =3D Arguments([("void *", "__cpu"), event.args]) - fmt =3D "\"cpu=3D%p \"" - event.fmt =3D 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 suita= ble - arguments for the given format. - - The function is only called for events with the 'vcpu' property. - - Parameters - =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - format : str - Format module name. - event : Event - args, kwargs - Passed to 'vcpu_transform_args'. - - Returns - =3D=3D=3D=3D=3D=3D=3D - Arguments - The transformed arguments, including the non-implicit ones. - - """ - if "vcpu" in event.properties: - ok, func =3D 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 --=20 2.45.1