From patchwork Thu Jun 6 10:26:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801979 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp221395wro; Thu, 6 Jun 2024 03:27:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWGK1W5DH4ZwC9d6QDj0pfZdc2EBONGQVakNO5Wmlu+888obFr8oinhti9NWyQ3o4Qzml7B7zUXVgb/gsRlp0Rf X-Google-Smtp-Source: AGHT+IGrPyJVWIV0FPVjamKRLm53QQibSuz/wlBGUE/CaxuhHSxDYKlZinL61b/i1QP6VIct7gis X-Received: by 2002:a05:620a:148b:b0:792:cd45:8e2b with SMTP id af79cd13be357-79523fd9cd1mr560522785a.78.1717669627907; Thu, 06 Jun 2024 03:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717669627; cv=none; d=google.com; s=arc-20160816; b=fRVb+li2vm7ykUKvOh9IQsaGyjuiHDSdM8Ooh7LFplD62TYUHo2B1Zc7BOApGHzSfL 52zuV8u2HY8tC5Rly64K5Q8WjRI8vL0wTKfHN9j3qGHHbu3UAJPOBfIDFVBl2SJLEz9Z ZM3IlowBG8d3BDC8rHMruDJWTajgYF2t1KBOXMXDI9uTwVlsS1ZY2wtgEYEjoOS2g4Ag supIapkx2pEnFibMhiIOqwX3r5LD/8duH4dttHjyYVKyObBgZAsXjO0nEdGd5T1wWiAk KpJDtRMdOypsFZEUf60BBAiTAXx3mXAlt93tHgqrtS14dSSkkTWKkZ5vZiMRUgbe7DjE qnYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=i02CoQslFzum0YZSIl6mR+mSGbtebWVBNoZvi4aXxSU=; fh=REhcbk0BzIDzKTC/o0S32xTYENGMUmNSZflF6h/8T6M=; b=JiAzBG7E/bdq61sl9v8vD9bml619Dd+qVUWJDWG6deJfwvit1fwE3EyH6xPf6Kty3A 5UkzgCSe3p8z3TbKIlelmrvZClM4h9TS2IqbERDgO7Rcdb6leVvT3tHeDruj4kAN14YU s2GYSzlvGG8ZdSHmCCrxHB2gTEWaDaWW/aMrohT0s6xTDV16bnGJNLYeI4Iu1H7xh3a7 GOp9+NyXQjChwXoGBr4y+UyBLh0rFm3jFBv8dOkE/ZDKVQweuJXmys5RdF04KSC9R8Jl CBWSadVwkW9UBYVxNyCA6g0nwSNw3KykEAQYDvSb/DxkPCcmLVen8f6bhSe05+RX3tND SDCQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YAywtvlF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-44038b79578si12803641cf.693.2024.06.06.03.27.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2024 03:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YAywtvlF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Stefan Hajnoczi , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org vcpu.py is pointless since commit 89aafcf2a7 ("trace: remove code that depends on setting vcpu"), remote it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé 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 = 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 " -__copyright__ = "Copyright 2016, Lluís Vilanova " -__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