From nobody Thu Nov 28 19:17:04 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1717669628; cv=none; d=zohomail.com; s=zohoarc; b=nWAlWHNdvin0WxBivsU6HMPS+hDrIHvuqpKbj+HipNgn9Y88wO9RBpRBd19rP2753mKvzqF8s23zDy6LyC9D6tK6syCUt3YIz+G7+9SEK1KCz85hZg3jYfVejV1As/mbYMs54Q7u8qR4RV6l56DJmZfiOssRJy98u0MzLa+7hMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717669628; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i02CoQslFzum0YZSIl6mR+mSGbtebWVBNoZvi4aXxSU=; b=b6SGhEx5bQ9TbIimcezCZzGFxW8fkbbb8/ONicfkrgpkBFLibZ9N8XT5jWeYhX71FfrwZMLM2p0k/ObLnHzfXpTVVp9BCqHUVo6ufc3QEpHuVjpFjE5HVK7CM+96Kb+uFtMfJ5TfnvSRaOS+XPmZPkk7kIPEfPOOtkxZcPSWt5g= 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 1717669628074345.2131284438027; Thu, 6 Jun 2024 03:27:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFAKQ-0006S8-23; Thu, 06 Jun 2024 06:26:42 -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 1sFAKN-0006RH-Gu for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:26:39 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFAKL-0000OM-QB for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:26:39 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42121d27861so9008595e9.0 for ; Thu, 06 Jun 2024 03:26:37 -0700 (PDT) Received: from localhost.localdomain (94.red-88-29-105.staticip.rima-tde.net. [88.29.105.94]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215814f11csm51460525e9.44.2024.06.06.03.26.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Jun 2024 03:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717669596; x=1718274396; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=i02CoQslFzum0YZSIl6mR+mSGbtebWVBNoZvi4aXxSU=; b=YAywtvlF5vg/sY2wdMwvBhsSOCHoCMu+51xk6OAxXXamnATvmE3brj/CmUVoH6ZMLq 2hJwD6tX0t3N0W49Q1sQiCh3IS9KVtbB7F8dHd4gQgAJb/uDhWtiNhuI6fDMuYgg3zMv jzbcvv1aEAPhUBTx4rbDhLnh8Q7YDdz/bF4FxX2floEGRXbFOhwueTcK1LFwtXn2vnTV z8VgZjy/QHZnRsc9V9DunTQ79UInl8OSIvHEW31GIHe2x3i0ccV8lpU3DJrBOp7JL9sB ndyd2HkcxSXJZYMRcToOJNYS+H/XfaWPzcB2uzUldvYmDzGDPm7KabwJXklBd/emDRzq xFyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717669596; x=1718274396; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=i02CoQslFzum0YZSIl6mR+mSGbtebWVBNoZvi4aXxSU=; b=YY4/ABujqYQIKKbh0hK/mkO/jy2BNeCezgneYY845QAMn09ZARAmkarJ9S1Z+bAPm6 sysnGlW+5kSLev9I6xIC4Xn59sa7162RAROycx14RmkT5bUsMhx3iVP319Puj/wuoJxV 3pZX/BOzerEE9kngTcyw0RRofNnBoYUYP+iraqP834lJzBAyU2TdbGg6i+2S5D3sVohH pt+moFSgDanyyHrRqcrIL4O2Buno3GKJ4aNAc6punqpIMFps9dAlZHQrzw28bIxRkHSc vzrXRj6SMcPiMlFlVZxkfsnz8hEd7Jtvdt7hWQofVW2OougTMP96eIc7CdP+nXOLYJIx aqVg== X-Gm-Message-State: AOJu0YxtS/ZqFMuKdHmDj2ly9Nmh528Ky2wTAlSMew5KqRiRoVDuKyYQ zut389N9+F4K5EGjcXk1UE9QjV/A5nzyxybjXK+a53wTBPgcY95H9Ou7KEcq9wLY2+1k8xH9ZkB txKs= X-Google-Smtp-Source: AGHT+IF32WnJc/Bqk6NkXNrIVaDQ8Vh6CSYorv3SAs0395rBHwtgeUOC6AIMSWQQsmdwMpXI5ZU6gg== X-Received: by 2002:a05:600c:a48:b0:418:f991:713f with SMTP id 5b1f17b1804b1-421562e7046mr42967195e9.23.1717669595766; Thu, 06 Jun 2024 03:26:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Stefan Hajnoczi , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mads Ynddal Subject: [PATCH] tracetool: Remove unused vcpu.py script Date: Thu, 6 Jun 2024 12:26:31 +0200 Message-ID: <20240606102631.78152-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 @linaro.org) X-ZM-MESSAGEID: 1717669629972100001 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 --- 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 d80203f1cd..0c45c948d0 100644 --- a/meson.build +++ b/meson.build @@ -3226,7 +3226,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.41.0