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 From patchwork Mon Jun 10 17:13:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 803019 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2050420wro; Mon, 10 Jun 2024 10:15:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWItLcF/NNYQZ2qic1bP2LbYvURv4By5OnWuStXvTkeqLqVw+4vXqSQzKI1TO9CNt6KuyD0jvSdAYjimzkRVxHO X-Google-Smtp-Source: AGHT+IGMGuFtoB5OoUtZq60cdoRQ1cDYdxaZbgyQcRdZLyUZNoWtk6hH1QGU0ISABks4wrAfjmld X-Received: by 2002:a05:620a:1a20:b0:795:5070:e559 with SMTP id af79cd13be357-7955070e661mr880638585a.72.1718039711636; Mon, 10 Jun 2024 10:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718039711; cv=none; d=google.com; s=arc-20160816; b=kdpReVVTac+l1jKovvTMJ41RJQB1b1nEcwzYqgO1ahxVl6TCK9clKrI9KncdQhfiNy XV1A9SoFl/uyHaUir9DL66wPhuvwpK6HG6FlGNXvU0W6MHfnrwP1Rp0HlP38B7vSH1Hz cYA4Zm35x6Z4aTFfu9+diZdi5Fpma7UZNDYIC0zRFWuwBek5eXzRlgTurMcr6u0gHdEU 0cHh+8MgTCIxcYqEctT5FrYu1iH3OowVVPPQsnWEANCIO/VD3gB8lLARPs927hzzELMb o7Mc7BjlIHZJvpq9XUX+XTxtOPL1mFKIohXWTAARSYC1gyK4Q4cdwy7LkQy/kWVMQj+i YIaQ== 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=vNOCRkpdS1XFHEXBD7ZT+t7uBOs/1pBKKTW/85bpa0E=; fh=O2mNUjZb/2k8WYsuEhKZV+GdozY3bR8p7MJtoUmT9eE=; b=wS4dCApzObqYOmRhce4dc8vFeKkOPC46xphhRINHQOvOUl/13iCAWiL3zc05d/Kf3M AgGScVvk5CVn7uzwnFVOht6QjUK6I29Q9Tv581iRtbl9CxcJOUcFa+tV7kkJFJF7WZ12 4Ixmib0ov/IoE/zYE0PXqcFANAqvvm9dilEGdQH/ncmctJE02eF2BSoKChuNeIaGFTZ3 8l3W1OLmmI8v99SOCS7jNrNuksP6bm+bpK3xVTN7SpMru7p/cPAZutZE0mROJAdLMmMH iQONPc3sEmmx9mHKxdVq2od6kFT861fVchEQkiX12J0c3Z1UGK8nR6nZez1kwcFjsElt iXXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E9syhoGu; 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 d75a77b69052e-44038b17fbasi110553451cf.314.2024.06.10.10.15.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:15:11 -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=E9syhoGu; 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 1sGiar-000408-4E; Mon, 10 Jun 2024 13:14:05 -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 1sGiap-0003zZ-UP for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:14:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGiao-00018a-Ed for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:14:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718039641; 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=vNOCRkpdS1XFHEXBD7ZT+t7uBOs/1pBKKTW/85bpa0E=; b=E9syhoGuj+HTm1fJeDOvF0CyzYmy+3dVhLSiCNsaird6UMo0+6pObekHFtm6FQ8BoGy97d ktJ0LPTMEHy/fsTZDweJ/5gE8C9BRMpxqnVsHqgdrMXZqlOo29xOu4wVkiUpa+HydmxdbK SOkJhVRi1abNAeZEhnucjyEKv4e9pWw= Received: from mx-prod-mc-01.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-513-Fwxw84NLMb6_dvAhtLIgiQ-1; Mon, 10 Jun 2024 13:13:56 -0400 X-MC-Unique: Fwxw84NLMb6_dvAhtLIgiQ-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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 38CDE1955D8E; Mon, 10 Jun 2024 17:13:55 +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 CB7861955E80; Mon, 10 Jun 2024 17:13:53 +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 , Stefan Berger Subject: [PULL 2/6] backends/tpm: Remove newline character in trace event Date: Mon, 10 Jun 2024 13:13:11 -0400 Message-ID: <20240610171315.346143-3-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.129.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é Split the 'tpm_util_show_buffer' event in two to avoid using a newline character. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Mads Ynddal Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefan Berger Message-id: 20240606103943.79116-2-philmd@linaro.org Signed-off-by: Stefan Hajnoczi --- backends/tpm/tpm_util.c | 5 +++-- backends/tpm/trace-events | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index 1856589c3b..cf138551df 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -339,10 +339,11 @@ void tpm_util_show_buffer(const unsigned char *buffer, size_t len, i; char *line_buffer, *p; - if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) { + if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER_CONTENT)) { return; } len = MIN(tpm_cmd_get_size(buffer), buffer_size); + trace_tpm_util_show_buffer_header(string, len); /* * allocate enough room for 3 chars per buffer entry plus a @@ -356,7 +357,7 @@ void tpm_util_show_buffer(const unsigned char *buffer, } p += sprintf(p, "%.2X ", buffer[i]); } - trace_tpm_util_show_buffer(string, len, line_buffer); + trace_tpm_util_show_buffer_content(line_buffer); g_free(line_buffer); } diff --git a/backends/tpm/trace-events b/backends/tpm/trace-events index 1ecef42a07..cb5cfa6510 100644 --- a/backends/tpm/trace-events +++ b/backends/tpm/trace-events @@ -10,7 +10,8 @@ tpm_util_get_buffer_size_len(uint32_t len, size_t expected) "tpm_resp->len = %u, tpm_util_get_buffer_size_hdr_len2(uint32_t len, size_t expected) "tpm2_resp->hdr.len = %u, expected = %zu" tpm_util_get_buffer_size_len2(uint32_t len, size_t expected) "tpm2_resp->len = %u, expected = %zu" tpm_util_get_buffer_size(size_t len) "buffersize of device: %zu" -tpm_util_show_buffer(const char *direction, size_t len, const char *buf) "direction: %s len: %zu\n%s" +tpm_util_show_buffer_header(const char *direction, size_t len) "direction: %s len: %zu" +tpm_util_show_buffer_content(const char *buf) "%s" # tpm_emulator.c tpm_emulator_set_locality(uint8_t locty) "setting locality to %d" From patchwork Mon Jun 10 17:13:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 803018 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2050341wro; Mon, 10 Jun 2024 10:15:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW1vOn8CzDm0hgp3bR8j1T5oLQhcqFaVXiNiTTI8Ccc7LvdCnHQMHB3c6XVJMGP5D9NEJ+o4CRpELbqeHZox0YC X-Google-Smtp-Source: AGHT+IHqPaxhp8AwSRRsNSKlULTkiKDtHdsgBjl41D8CPI3VimuOWBY+sVLZ/XgmS4+tsh1Yy41v X-Received: by 2002:a05:6808:189c:b0:3d1:be9f:c9a3 with SMTP id 5614622812f47-3d210c56da2mr12344377b6e.0.1718039702660; Mon, 10 Jun 2024 10:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718039702; cv=none; d=google.com; s=arc-20160816; b=SGLi5s3G5ucXPphVejmoKe/BkQ0oYSlig3Pr32slzuWu0eEKjgoY2BnwNYRExYgj4s bVLALPxMtB4SjLUjxu0j94vLUgaOCW3VwZqpmKRxgJI7+r108TvisNkaav/UqJffcDOs iaM9yExrcM9/S1q+eSGew7PJe7BIb06CM7JriSLglOSIQb0MnwEV8SMNQguBC/MmZhU4 XAZ55slCAm2VRUuPxQuDG236wjigClZJ8fEd+BlZlVo2p7OZXg7agNj7afrXM5KAelgu 5ciYLmnk/1TucI9LfpapumC77kR7we0+IJSSmWIybZbRZcEpBFytVKh1ygeCNN1yGCSZ fsag== 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=Eb5h6zwH2jnVLvmgEhxAZ6r++W58ZEwjCwZbOR0q6qU=; fh=5BUwsxIbXWsfJLvtXa4goI5op8xCypq7ckzDHegIvyo=; b=EUX1agfWGqWP+GaAOfVIFRWUnzXLA0EEG9z2D15ShtmvzHYK2UwDdtwnde9DzqL5ax xDBQCP2TPQJiDs9xDY0qjdNPnO2XXzoB8sHYY8hISRtEUR3Dgzf0mWyX58U1DpxNBvju AsZS+gN/Hyi7IWtkC9NJTKx2/UdNAXiFz5DEuvtOwDaQ7ivWJGtMnd27Y4XD4QwE40lv BjEuTRW/QY/rFoiGuXeZGXvoH+5YYOLgnQimPyn+1nTKleu9X1rUf+exVJZ1KP7srmrL dXcXdGPuTNaMhbGc27Y+/sl/p3evC4mvpeGwOZrjvsO6sKZHM2WMs6K8JBhZOJoaNN5a ivmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ixeNyFkT; 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 d75a77b69052e-4406348e2f1si43861041cf.535.2024.06.10.10.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:15:02 -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=ixeNyFkT; 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 1sGiau-00040t-15; Mon, 10 Jun 2024 13:14:08 -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 1sGias-00040e-Lv for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:14:06 -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 1sGiar-00018p-71 for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:14:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718039644; 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=Eb5h6zwH2jnVLvmgEhxAZ6r++W58ZEwjCwZbOR0q6qU=; b=ixeNyFkTxBUN70fzyuVEoza5nxvwVdFVhwUOWnYi/BobkWycGOxyzLJ0fMes45s9ABrV3A RA3h0HK2OD9/e+Ksug3PUr7U39803imkfmtaWBAoYhx8JcVLltE2GbMiCOf4to2kgTGZ2K 1sjgQxt3WSN3CJ9wuMUabxRy/zuum6Q= Received: from mx-prod-mc-05.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-140-pWLSxVIIP4SCIGHanP-kHA-1; Mon, 10 Jun 2024 13:14:00 -0400 X-MC-Unique: pWLSxVIIP4SCIGHanP-kHA-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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CE07B1955D6D; Mon, 10 Jun 2024 17:13:58 +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 9662F1956089; Mon, 10 Jun 2024 17:13:57 +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 Subject: [PULL 3/6] hw/sh4: Remove newline character in trace events Date: Mon, 10 Jun 2024 13:13:12 -0400 Message-ID: <20240610171315.346143-4-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é Trace events aren't designed to be multi-lines. Remove the newline character which doesn't bring much value. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Mads Ynddal Reviewed-by: Daniel P. Berrangé Message-id: 20240606103943.79116-3-philmd@linaro.org Signed-off-by: Stefan Hajnoczi --- hw/sh4/trace-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sh4/trace-events b/hw/sh4/trace-events index 4b61cd56c8..6bfd7eebc4 100644 --- a/hw/sh4/trace-events +++ b/hw/sh4/trace-events @@ -1,3 +1,3 @@ # sh7750.c -sh7750_porta(uint16_t prev, uint16_t cur, uint16_t pdtr, uint16_t pctr) "porta changed from 0x%04x to 0x%04x\npdtra=0x%04x, pctra=0x%08x" -sh7750_portb(uint16_t prev, uint16_t cur, uint16_t pdtr, uint16_t pctr) "portb changed from 0x%04x to 0x%04x\npdtrb=0x%04x, pctrb=0x%08x" +sh7750_porta(uint16_t prev, uint16_t cur, uint16_t pdtr, uint16_t pctr) "porta changed from 0x%04x to 0x%04x (pdtra=0x%04x, pctra=0x%08x)" +sh7750_portb(uint16_t prev, uint16_t cur, uint16_t pdtr, uint16_t pctr) "portb changed from 0x%04x to 0x%04x (pdtrb=0x%04x, pctrb=0x%08x)" From patchwork Mon Jun 10 17:13:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 803022 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2050833wro; Mon, 10 Jun 2024 10:16:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVRkEQmuWP2oeYOep6gp+Lk1XH+ykA9L/a1FYD+Qzg32kKSekGAwtFeKrstT7OvzELzvVW6mEA7+diTbn95+X3R X-Google-Smtp-Source: AGHT+IHiHvZNReptfrWkXHy22QKa/O7nQsJ9pZP4RH4+Ky7WSK7y0goBYY1Sbnd46RePPQItK0sb X-Received: by 2002:a05:6214:5bc3:b0:6b0:7fa6:c004 with SMTP id 6a1803df08f44-6b07fa6c32cmr32274236d6.59.1718039766399; Mon, 10 Jun 2024 10:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718039766; cv=none; d=google.com; s=arc-20160816; b=O2IwD39605aRzidmj/DrGysoWmtMRpn2ivxOvLmVKNl9Hsd2ev3j4J6p9HgzyDFGGL TRZusDhFD8Se5EEBQ/TnuN/+ityNonVkK09osqyU4ylmIxNEvgBmH3GzeTtGdQPNy2fh 9Kglf5GR9uyZmYrmLo4L+qB4qpxicjMKmosQp/P3vTzA9I/6R1FjecNp1+WTdi9cyfqB E/DmWXhuC+MNgTsRA1Tw6cfSk6GI/GY6napvIe+VYuX92GgRh9J1aXX88BWP1lsgKuXn gq++FMlyZ0/V7PpZyCQBnA1oeyBi/CtZ+8pWYn1z4FiEewiVKDmWc1aXTLK3QmoO1GXv 00LQ== 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=PgELMkc1bS7VwzQKP/T+wBa1GSPK4TqZBA1l61ePfzM=; fh=5BUwsxIbXWsfJLvtXa4goI5op8xCypq7ckzDHegIvyo=; b=kf8orYz0bWSFPyhpJJzUJxiw6v/S41FA29lMhTPkRjqqWaznE6I2OcM4edgqRl5bSo NkUQulf0VNUwonSgI/jJva72IAlEFExIMfPu7fV+VBBPi1+ysOmsHRsxrA/EK9hmTqsz glFHQuGRCbofCAKwSTXJIgT6IlQyToxvrNmHDxs4FvouW5r8k38dT7D2arQ6n5YH58RN KaO8vVE6iwm80xSV+AXvJhQAZwjP/I3T8nmjpsv1FiaAdT8dv4GHIJCibmTITM4kUYzm UNlcYaORcKxzU2JlJaF4XwQHHbEBnlhsB0bk5usbfJZccjk6gjzc+dKuXb29iavqbbAu 9A4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g93ZDuDE; 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 6a1803df08f44-6b04f96974csi109433296d6.296.2024.06.10.10.16.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:16:06 -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=g93ZDuDE; 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 1sGicG-0007C0-JN; Mon, 10 Jun 2024 13:15:32 -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 1sGicE-000766-Dq for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:15:30 -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 1sGicC-0001VS-O3 for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:15:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718039728; 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=PgELMkc1bS7VwzQKP/T+wBa1GSPK4TqZBA1l61ePfzM=; b=g93ZDuDEre6C99c5VsiFnkd6RHEFC0Q2qkD5I/KY7XRSVE9uIocqoxc4MrK8iGfMVnFhNu wg+lrr7DSmHGJ+5hlhw/oDXDmptNgbJgLHetwOnmbHtJVDujkDveHq5VfVwI5uirI3F00P knbUNtvC4smE2DQEi5lTLvFNy4X/3rM= 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-64-iGu4kgfPMj6UIrMRIlvRKA-1; Mon, 10 Jun 2024 13:15:25 -0400 X-MC-Unique: iGu4kgfPMj6UIrMRIlvRKA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 6BBDF1954B25; Mon, 10 Jun 2024 17:15:20 +0000 (UTC) Received: from localhost (unknown [10.39.195.112]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 966A71956048; Mon, 10 Jun 2024 17:14:01 +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 Subject: [PULL 4/6] hw/usb: Remove newline character in trace events Date: Mon, 10 Jun 2024 13:13:13 -0400 Message-ID: <20240610171315.346143-5-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.17 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é Trace events aren't designed to be multi-lines. Remove the newline characters. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Mads Ynddal Reviewed-by: Daniel P. Berrangé Message-id: 20240606103943.79116-4-philmd@linaro.org Signed-off-by: Stefan Hajnoczi --- hw/usb/trace-events | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/trace-events b/hw/usb/trace-events index fd7b90d70c..46732717a9 100644 --- a/hw/usb/trace-events +++ b/hw/usb/trace-events @@ -15,7 +15,7 @@ usb_ohci_exit(const char *s) "%s" # hcd-ohci.c usb_ohci_iso_td_read_failed(uint32_t addr) "ISO_TD read error at 0x%x" -usb_ohci_iso_td_head(uint32_t head, uint32_t tail, uint32_t flags, uint32_t bp, uint32_t next, uint32_t be, uint32_t framenum, uint32_t startframe, uint32_t framecount, int rel_frame_num) "ISO_TD ED head 0x%.8x tailp 0x%.8x\n0x%.8x 0x%.8x 0x%.8x 0x%.8x\nframe_number 0x%.8x starting_frame 0x%.8x\nframe_count 0x%.8x relative %d" +usb_ohci_iso_td_head(uint32_t head, uint32_t tail, uint32_t flags, uint32_t bp, uint32_t next, uint32_t be, uint32_t framenum, uint32_t startframe, uint32_t framecount, int rel_frame_num) "ISO_TD ED head 0x%.8x tailp 0x%.8x, flags 0x%.8x bp 0x%.8x next 0x%.8x be 0x%.8x, frame_number 0x%.8x starting_frame 0x%.8x, frame_count 0x%.8x relative %d" usb_ohci_iso_td_head_offset(uint32_t o0, uint32_t o1, uint32_t o2, uint32_t o3, uint32_t o4, uint32_t o5, uint32_t o6, uint32_t o7) "0x%.8x 0x%.8x 0x%.8x 0x%.8x 0x%.8x 0x%.8x 0x%.8x 0x%.8x" usb_ohci_iso_td_relative_frame_number_neg(int rel) "ISO_TD R=%d < 0" usb_ohci_iso_td_relative_frame_number_big(int rel, int count) "ISO_TD R=%d > FC=%d" @@ -23,7 +23,7 @@ usb_ohci_iso_td_bad_direction(int dir) "Bad direction %d" usb_ohci_iso_td_bad_bp_be(uint32_t bp, uint32_t be) "ISO_TD bp 0x%.8x be 0x%.8x" usb_ohci_iso_td_bad_cc_not_accessed(uint32_t start, uint32_t next) "ISO_TD cc != not accessed 0x%.8x 0x%.8x" usb_ohci_iso_td_bad_cc_overrun(uint32_t start, uint32_t next) "ISO_TD start_offset=0x%.8x > next_offset=0x%.8x" -usb_ohci_iso_td_so(uint32_t so, uint32_t eo, uint32_t s, uint32_t e, const char *str, ssize_t len, int ret) "0x%.8x eo 0x%.8x\nsa 0x%.8x ea 0x%.8x\ndir %s len %zu ret %d" +usb_ohci_iso_td_so(uint32_t so, uint32_t eo, uint32_t s, uint32_t e, const char *str, ssize_t len, int ret) "0x%.8x eo 0x%.8x sa 0x%.8x ea 0x%.8x dir %s len %zu ret %d" usb_ohci_iso_td_data_overrun(int ret, ssize_t len) "DataOverrun %d > %zu" usb_ohci_iso_td_data_underrun(int ret) "DataUnderrun %d" usb_ohci_iso_td_nak(int ret) "got NAK/STALL %d" @@ -55,7 +55,7 @@ usb_ohci_td_pkt_full(const char *dir, const char *buf) "%s data: %s" usb_ohci_td_too_many_pending(int ep) "ep=%d" usb_ohci_td_packet_status(int status) "status=%d" usb_ohci_ed_read_error(uint32_t addr) "ED read error at 0x%x" -usb_ohci_ed_pkt(uint32_t cur, int h, int c, uint32_t head, uint32_t tail, uint32_t next) "ED @ 0x%.8x h=%u c=%u\n head=0x%.8x tailp=0x%.8x next=0x%.8x" +usb_ohci_ed_pkt(uint32_t cur, int h, int c, uint32_t head, uint32_t tail, uint32_t next) "ED @ 0x%.8x h=%u c=%u head=0x%.8x tailp=0x%.8x next=0x%.8x" usb_ohci_ed_pkt_flags(uint32_t fa, uint32_t en, uint32_t d, int s, int k, int f, uint32_t mps) "fa=%u en=%u d=%u s=%u k=%u f=%u mps=%u" usb_ohci_hcca_read_error(uint32_t addr) "HCCA read error at 0x%x" usb_ohci_mem_read(uint32_t size, const char *name, uint32_t addr, uint32_t offs, uint32_t val) "%d %s 0x%x %d -> 0x%x" From patchwork Mon Jun 10 17:13:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 803021 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2050698wro; Mon, 10 Jun 2024 10:15:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVsvGIxncrCzD85HkTqbIjWChfD7Ao/qGll5aNbhHrjE3rywHLSwfi+tcLjk29RvqjR+xF4zH9ZmC6GXTQuq80n X-Google-Smtp-Source: AGHT+IF5lL7oykq4UgV5kwVIqvFBdlIjwx16c4+v0k8NBfIzfYZJZ1sbfPgdI0tMcz0DffK5zksy X-Received: by 2002:a05:622a:1a9c:b0:43a:a8ad:179a with SMTP id d75a77b69052e-44041b8eea7mr130740241cf.32.1718039748397; Mon, 10 Jun 2024 10:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718039748; cv=none; d=google.com; s=arc-20160816; b=Ox2zf3Rto5Z4G9p0jMs7F/C4PN5UaaTmbMKyGrDpwC6rBG/8VCwy2kJjeZNWckimWL LLGwufLi8MoIkZRS7esGytgDh4PfgTqgErLeA7uvelwgyTtMmYULq9Fk4I2j+9if+9Jg nm4zV9cmsBjT3LY1l8N9bv/qDvrOaO1ugo/hbe8EEXeiq/HsvUb4yMc4J07bMZ6c1rh8 dIl9hScANRHZt1HU9eGlbidkUxp6SiEgk414Y0ARaw8DMwvCjrqzJLP3/cjvB6cQpJ/n h9pESYWmPs/7FI5+hmStjzdYhGF0rvlTQkG1jEeX1f/KmW6NLPRry0bggNjvUdXq7M1G unJQ== 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=KfimpW5azDfsPr0aZjQVwpll8heNiGpKgP1JYzSz1H4=; fh=5BUwsxIbXWsfJLvtXa4goI5op8xCypq7ckzDHegIvyo=; b=uevXs7JUGTVVqqfo8/8YVBs+7fGPcRna9BymMOJc/ZbHt7RmZfOlWFYeVn6zuQ6jvj 054vL8Eti0XUsmyfCbPZAp5CBlh1qpkJwp1G9M2BBZgsOU3r1Vci7QdkeRtaWtFWMQ9q iTs+uoTLxDOxgFOQKgwyaPY55pmMDze2iXwca4OtgFnmhicFKoknmUT1pVTFqJvF1r+9 6drRUGf1VlVYxazcqEKAorK14/7oSQccMLY3kVIYtXSfapWszHZOVpr5jSnfFHm2bgNb m2hTonzn92DIDkIHGwfTNBK6mK4LtQC4T5O4hICEIJCmpry1XC6IuopacYGGsFTVpmap rmBw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BqKMeo74; 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 d75a77b69052e-44038a6ec64si111107831cf.93.2024.06.10.10.15.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:15:48 -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=BqKMeo74; 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 1sGicL-0007J6-4j; Mon, 10 Jun 2024 13:15:37 -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 1sGicG-0007B4-10 for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:15:32 -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 1sGicE-0001Vl-8l for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:15:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718039729; 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=KfimpW5azDfsPr0aZjQVwpll8heNiGpKgP1JYzSz1H4=; b=BqKMeo74DlpkmQ4nKAGygIwd5v7aHszbOkJbXfLKy3UcbKoP/JYOfh7eBDgAX0YV7f5gm0 lIfrhW0CAismBwpcZzEMLvtixZW7CPrBcGtEcsVB6FtXO6rJKXUsBXzFm+ThHbKeQCfIa6 eWsb1oMlJYvpR5q455UTFOL9USFyYHI= Received: from mx-prod-mc-03.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-246-SFJq2jA4O3mYl7K6yBnuXA-1; Mon, 10 Jun 2024 13:15:26 -0400 X-MC-Unique: SFJq2jA4O3mYl7K6yBnuXA-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8371D195604F; Mon, 10 Jun 2024 17:15:24 +0000 (UTC) Received: from localhost (unknown [10.39.195.112]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C2A5530000C3; Mon, 10 Jun 2024 17:15:22 +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 Subject: [PULL 5/6] hw/vfio: Remove newline character in trace events Date: Mon, 10 Jun 2024 13:13:14 -0400 Message-ID: <20240610171315.346143-6-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.4.1 on 10.30.177.4 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é Trace events aren't designed to be multi-lines. Remove the newline characters. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Mads Ynddal Reviewed-by: Daniel P. Berrangé Message-id: 20240606103943.79116-5-philmd@linaro.org Signed-off-by: Stefan Hajnoczi --- hw/vfio/trace-events | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 64161bf6f4..e16179b507 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -19,7 +19,7 @@ vfio_msix_fixup(const char *name, int bar, uint64_t start, uint64_t end) " (%s) vfio_msix_relo(const char *name, int bar, uint64_t offset) " (%s) BAR %d offset 0x%"PRIx64"" vfio_msi_enable(const char *name, int nr_vectors) " (%s) Enabled %d MSI vectors" vfio_msi_disable(const char *name) " (%s)" -vfio_pci_load_rom(const char *name, unsigned long size, unsigned long offset, unsigned long flags) "Device %s ROM:\n size: 0x%lx, offset: 0x%lx, flags: 0x%lx" +vfio_pci_load_rom(const char *name, unsigned long size, unsigned long offset, unsigned long flags) "Device '%s' ROM: size: 0x%lx, offset: 0x%lx, flags: 0x%lx" vfio_rom_read(const char *name, uint64_t addr, int size, uint64_t data) " (%s, 0x%"PRIx64", 0x%x) = 0x%"PRIx64 vfio_pci_size_rom(const char *name, int size) "%s ROM size 0x%x" vfio_vga_write(uint64_t addr, uint64_t data, int size) " (0x%"PRIx64", 0x%"PRIx64", %d)" @@ -35,7 +35,7 @@ vfio_pci_hot_reset(const char *name, const char *type) " (%s) %s" vfio_pci_hot_reset_has_dep_devices(const char *name) "%s: hot reset dependent devices:" vfio_pci_hot_reset_dep_devices(int domain, int bus, int slot, int function, int group_id) "\t%04x:%02x:%02x.%x group %d" vfio_pci_hot_reset_result(const char *name, const char *result) "%s hot reset: %s" -vfio_populate_device_config(const char *name, unsigned long size, unsigned long offset, unsigned long flags) "Device %s config:\n size: 0x%lx, offset: 0x%lx, flags: 0x%lx" +vfio_populate_device_config(const char *name, unsigned long size, unsigned long offset, unsigned long flags) "Device '%s' config: size: 0x%lx, offset: 0x%lx, flags: 0x%lx" vfio_populate_device_get_irq_info_failure(const char *errstr) "VFIO_DEVICE_GET_IRQ_INFO failure: %s" vfio_attach_device(const char *name, int group_id) " (%s) group %d" vfio_detach_device(const char *name, int group_id) " (%s) group %d" From patchwork Mon Jun 10 17:13:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 803020 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2050687wro; Mon, 10 Jun 2024 10:15:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVgJ3jw4NFcqKMqG2DLb+4iD7F/xp9IzngXQHzfNemWsoTwxoU+2TUBkM2UTGTXtL1x8kHKkJxNhum6NZytuBdd X-Google-Smtp-Source: AGHT+IHHneSs36IY0cM4L7DshlF/e+cNzp6QDicDNw//s0f6qCeq1W8ock4kfxh0UdY3vjcz7bSR X-Received: by 2002:a67:e443:0:b0:48c:436d:7bd9 with SMTP id ada2fe7eead31-48c436d7c62mr3193864137.35.1718039747250; Mon, 10 Jun 2024 10:15:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718039747; cv=none; d=google.com; s=arc-20160816; b=dsGku8KJoDhT+IkxRSwrx8cwV8vk85e1BzEBlPaVVkcZ5QrtA2+3zSZHlBfBVleDr7 yh9KzGmsoQNtZ3ZEC43e5jMHrtbN2ubfpxVe5gG/dcj42yj5+KQgwdoMGERxfLiQYYDg eejQxaA/CTfpSI8LbfTjzesGA5192WeZfkZ+N3yxiG9jktnU6I6HPkBRQbiVqH4Qcf7P p5n4cGMMg/kbi5e96fUemkFKOKghIwkTsedH5EpwH0GWS7nv1zo+z6eCv8iI7CAJT87F m+f9soBhQlMGCvbYZG+JqSiGGLPtgboE6k8BjxfbnMMhb2uOrkvdifptV/w1Ux9/TlF3 IGFw== 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=6u5EdR0g4SIOF7rO/PzpStojqc+t54mbkmc+ceI4mPA=; fh=5BUwsxIbXWsfJLvtXa4goI5op8xCypq7ckzDHegIvyo=; b=a13qN46++HBm1/4RDnxjd9iKFpd/aSjfIBJpitucJbgzdVB7lEZtCBL8nxD6JTwJ2b fioeGwqIE+CtqRju17wVwZI/OBHul0IDXTVWJuqE6qZpg/goimvTLmyijt+3tLmQrbGw vPsMzPFgzEVjw6bHAtsgrpnEl/jzkbxwzCVoFSxO4GF2kIhFdXSvHbRRvpqpo4aLcDpV We3oy/6IlVSCwNXNxOa5lZjoKEdH0IWT0+4/lFCPvwxRXSTebW6VLvVaHgAUKZMbtk+r 3BWlyostz9py6wxcxcZc47yPRGDtJiiYJYFQGP0xKPr6y9tcIkz6ixCFum20eHMn9+1G cdYQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Qionx+rQ; 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 ada2fe7eead31-48d74c95b5fsi644358137.316.2024.06.10.10.15.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:15:47 -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=Qionx+rQ; 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 1sGicN-0007Uv-UE; Mon, 10 Jun 2024 13:15:39 -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 1sGicJ-0007Js-QU for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:15:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGicH-0001Wd-MH for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:15:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718039733; 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=6u5EdR0g4SIOF7rO/PzpStojqc+t54mbkmc+ceI4mPA=; b=Qionx+rQDhKU5zkXYgLmxNOIuTUm7+iDwWK1nOiBrxkK/ZM61ptH6heVFL+jNKVloYhfkB KCDCTAmYnPmeg3oxCIkeU/V92dGVlJgZhN41iljBm4RuDoV03lHrtj8ad5IR7pADtH8qSX laZ55hIeccZYC5VP7reJfL712A2+owo= Received: from mx-prod-mc-05.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-567-C5MOzwOjN_m4d4mx9qGrPw-1; Mon, 10 Jun 2024 13:15:29 -0400 X-MC-Unique: C5MOzwOjN_m4d4mx9qGrPw-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F38A01955D7C; Mon, 10 Jun 2024 17:15:27 +0000 (UTC) Received: from localhost (unknown [10.39.195.112]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C3D11956050; Mon, 10 Jun 2024 17:15:26 +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 Subject: [PULL 6/6] tracetool: Forbid newline character in event format Date: Mon, 10 Jun 2024 13:13:15 -0400 Message-ID: <20240610171315.346143-7-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.17 Received-SPF: pass client-ip=170.10.129.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é Events aren't designed to be multi-lines. Multiple events can be used instead. Prevent that format using multi-lines by forbidding the newline character. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Mads Ynddal Reviewed-by: Daniel P. Berrangé Message-id: 20240606103943.79116-6-philmd@linaro.org Signed-off-by: Stefan Hajnoczi --- scripts/tracetool/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 7237abe0e8..bc03238c0f 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -301,6 +301,8 @@ def build(line_str, lineno, filename): if fmt.endswith(r'\n"'): raise ValueError("Event format must not end with a newline " "character") + if '\\n' in fmt: + raise ValueError("Event format must not use new line character") if len(fmt_trans) > 0: fmt = [fmt_trans, fmt]