From patchwork Mon Jun 10 17:13:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 803017 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2050086wro; Mon, 10 Jun 2024 10:14:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXCch1H9OmPqyupQkptmqjaZsFB5keMpgMVje6gf+9eGE1S9O8d4/ti7/MK423TQgCe3BRMk0UQC1DhixDWsBgu X-Google-Smtp-Source: AGHT+IE6qYCXedNTNWHG6pgMGCOvJvMuugypeh3hJ7mcio0RT/dRdxMVZ5i6IxzC2RiGGEs0wh+g X-Received: by 2002:a05:6808:1526:b0:3d2:2a9c:8b70 with SMTP id 5614622812f47-3d22a9c8f8emr3921934b6e.15.1718039670850; Mon, 10 Jun 2024 10:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718039670; cv=none; d=google.com; s=arc-20160816; b=T9+QTbzfL35tPa4HZzlcw1s7XuwtmdkcBpH6AkUiKKTQ2E1yi8CsQP7e20kg+GIcs9 2VRIj3E1HoFqd1MfvaBl20EaormSa7g9ToZaG3OESc/idtORwPv24bLs4OJAkXGCsP5K 3GNnq4O3hAytuB2cpDnvEyU+var51VBeMXxoPke3w3ZcHmytFMTigHgKxbIJE2ZmxSJg 3WRIz4+HZy2FUst/rq6gRoYvdO2i5phE8nGaLiyW5wvvC8cjcl0aDYTazPmcMrL7TUt6 psmQzg2p+Ty1BiJ4XmaTB72Qzs3dHrHEvcKEwE8WNe1z7kErvbchYPufLC1dTQfh9rgn uNmQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OP+/NofEHfriZHjVuD5xeoqav13ZMnkO9pmZ52xvGDY=; fh=J7eQk113BY83F3gTu6JgYUoIjl6Kps5iwTY887XVGdA=; b=T/0KO5llxLnWHAJWb4ymBdwA5FMfPGiIvQPAsYACwZrU5fUgQxhZ1h+mRlG15rLFVQ FNjm0QWgNjjp012k94K2uuW9wOXrrREV/zUyaeWkbI8rIIynkLoxV8WzvI2B/9UPF7SZ te0YYyHP8o+Cgox9YtF68+i6DJEG8mCY+p5v1Yd40bwRUHHvcc7GIHtAI7CUYrVrOgp9 7NgfG44nfr9b+8Rx5TN1t763Oway3SUsK5KagRS77+HBzi9Oe4Ynr7tAXfrV4pttZ5Sa pKa6GZTwgLzUbA2VqC2aAt9eNck9Nid6c9fhkcgb7mc7gpIe0dHshFWF1Y9LaGdCs+e6 bGlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Xsx89PNJ; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7953284d189si1062245585a.148.2024.06.10.10.14.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:14:30 -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=@redhat.com header.s=mimecast20190719 header.b=Xsx89PNJ; 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=redhat.com 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 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= 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 X-MC-Unique: y3nd2ZAlMmKeZfU0jzh2NQ-1 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) From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Stefan Hajnoczi , Richard Henderson , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Mads Ynddal , Alex Williamson , Yoshinori Sato , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=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 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 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 = 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