From patchwork Thu Jun 6 10:39:39 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: 13688272 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6ED96C41513 for ; Thu, 6 Jun 2024 10:40:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFAXH-0003md-NH; Thu, 06 Jun 2024 06:39:59 -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 1sFAXG-0003lz-8A for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:39:58 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFAXD-0002kW-KS for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:39:58 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-421396e3918so11202985e9.0 for ; Thu, 06 Jun 2024 03:39:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717670393; x=1718275193; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=t40djQlv053yA+vH29m5Xf5i4KWL84AS7zuIsTUNOcA=; b=VJKoXadKSC4DyDfjah7F7O8+4JKSTt92vzSbjphQ3G6mbz8Ofl4hltGpfUojt1rWC5 pLRoeEStIyNMyIuU4VOUpr06peNHZihK0XovJPoRGBiG09hOA08doYODJWVzitQcDOjx kVamtWUHqZck9ahewFl5M//bYSDPMgunaK8Ygvm8S8T4EVbk2WEVy36/oV2H2ZWcVYJc kk7e7lq5ZdLyJMoOBSZZ408xSssKyrIhM7eZaFtWaUvKrZHCLl0V14bkCWwgPl+UwxZV 1NQpQy0p4qo2+lzUUug5MAfTpfNDOqwNW3t8gwz+CxXcYL0IblF7wjDX8gs65CMPZrVp WzSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717670393; x=1718275193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t40djQlv053yA+vH29m5Xf5i4KWL84AS7zuIsTUNOcA=; b=HQz0r20uk/5t+/90Mcgu0/r4mHxFFn10GhmkBHYxVTr83CoLfy48ny8FuBbUTueFgc 3UWYOZPadL0albk4zG/4bAlVTQiEexN2asvSBER+ovYM/Y71cKGrq135HCt1fq3WgQC7 L4q627s6Bkiqs7Tdjyt0aPf400iYX0lJkxoSTdJ7hA4+fjv6h0pmJGkosrcZjK7opKTH a43IEuEbYbg6DAlJ/XujZt6sbK3nWQxLdEVIZZuMrtbAo9myxdcr2r1aBUYG8jZ+JWYZ uuwD6pJbM16+X6LBjI44S9vQyN5twETezdSr6XSITu7N61yxmH2zyOv9SHXHbWfyzkMt B6Bg== X-Gm-Message-State: AOJu0YwHCVYTDpXVNG/zLJTDPhbVk0ThwtwrkBxpfCZC7mmjV1xHUBiN Y+INctx2lWBRR99epiQkFeG4aaNezquYY6NyTezsA0LiSJP9mNt4QraCsNApfpOY75HUWKWnU+t nKjk= X-Google-Smtp-Source: AGHT+IHvmf7hOGJtMw+DX5e434x3VVF4KPxp7Gv4LswgBl49Isytyc/GeKCreRMXsS1U3mo2rzwwzw== X-Received: by 2002:a05:600c:a47:b0:41b:eaf2:f7e6 with SMTP id 5b1f17b1804b1-421562c3f28mr56338255e9.2.1717670393421; Thu, 06 Jun 2024 03:39:53 -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-4215c2cd8fcsm16877045e9.47.2024.06.06.03.39.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Jun 2024 03:39:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Mads Ynddal , Stefan Hajnoczi , Yoshinori Sato , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 1/5] backends/tpm: Remove newline character in trace event Date: Thu, 6 Jun 2024 12:39:39 +0200 Message-ID: <20240606103943.79116-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240606103943.79116-1-philmd@linaro.org> References: <20240606103943.79116-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Split the 'tpm_util_show_buffer' event in two to avoid using a newline character. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Stefan Berger --- 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 Thu Jun 6 10:39:40 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: 13688274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60B63C25B75 for ; Thu, 6 Jun 2024 10:41:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFAXN-0003nx-MZ; Thu, 06 Jun 2024 06:40: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 1sFAXL-0003nZ-AG for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:03 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFAXJ-0002ki-IM for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:03 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-421396e3918so11203865e9.0 for ; Thu, 06 Jun 2024 03:40:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717670400; x=1718275200; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ISkAlLR4031fIqCyDiG+LpKIpeuhJmmGNI75va6Ggz8=; b=YPn/FPq4ckGw0yylg7+V4jeVkymVZkNoMI2IPhjOio7gntBuTAeEGMI8PwKXg4IE/B lf/8XaRcckyDfLr6pGg53V9LOmThnd8G3chtmIGCvBu/r1sp6IktgPr3WMVrxq2gx/Vu lUcrBjtPj6aWhSUnnKNOuR74541gEfMa3QMm3ST5AjcbFEgCCqSVl88K7/mi/1qxYdNM NxG/HRTfruEZLfUaSFQQsC/G+yxdDpS217VM6l4HV/eacZ71BvukBi2mi0Q1Ci5mYmiP 5YyG4OIxwSv/lR30tjJWOi9GESnICub9CBNsbbXZf40QhstQA6GEMRLvnZdB4bsvwJcV Mzkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717670400; x=1718275200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ISkAlLR4031fIqCyDiG+LpKIpeuhJmmGNI75va6Ggz8=; b=k75Wp7hM1chQMCKAIaDP6Tnkj8+Nqw4rNSx28DZQ7JO07HIZAyYAdIwD04DOLo169j 7p6qUSDxXVpnhPWUt2AcUKIvwes5uS8FREAwS6Sl9JAzw1br1u61jUsoHKh59SxGqyRm RqC0WS8wDX/DK6bDZ4g+qk9Cax/o0Io9P3sGfLk8l7bJnxBnSPGVNeqcpFHTzS9ntFHX lI4EfKCJakQeNFILiTb4dtfz14OhHCZWM51Q5E7FQFHlqb1rMTmNkqZi1pD8Huhioz4Q av2CK12/WWRtobXDV3JRSbl1hfRRaKxkU8brfGtaKnWxPob6VbFJ9d7yvz/gvigemI6f SnvQ== X-Gm-Message-State: AOJu0YymOFAGmYco5jZAcyQKGtYAJDCl8BQTk/t342Vv7Y9l3ULb8ErV AX2f5qQ9e2K6xyCnblnz8xh4QfHCPw4TnZIqeeNF0MT+vzBItAAOejOiNJYvqItpTJOoCT8ro/U kUQQ= X-Google-Smtp-Source: AGHT+IHSncPzWPTaQlVeqWTuWYhJC1FK09IlbNlNeNTPJqYU4bBOZom8O5AnXBmLQfA2X1yPNwGjwg== X-Received: by 2002:a05:600c:3585:b0:420:78f:3f9b with SMTP id 5b1f17b1804b1-42156350373mr53612595e9.37.1717670399696; Thu, 06 Jun 2024 03:39:59 -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-4215c19e572sm17265395e9.10.2024.06.06.03.39.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Jun 2024 03:39:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Mads Ynddal , Stefan Hajnoczi , Yoshinori Sato , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 2/5] hw/sh4: Remove newline character in trace events Date: Thu, 6 Jun 2024 12:39:40 +0200 Message-ID: <20240606103943.79116-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240606103943.79116-1-philmd@linaro.org> References: <20240606103943.79116-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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é Reviewed-by: Daniel P. Berrangé --- 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 Thu Jun 6 10:39:41 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: 13688276 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AEE82C25B75 for ; Thu, 6 Jun 2024 10:41:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFAXU-0003pe-IB; Thu, 06 Jun 2024 06:40:12 -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 1sFAXT-0003pT-F8 for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:11 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFAXQ-0002wx-RS for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:11 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-52b87e8ba1eso1177859e87.3 for ; Thu, 06 Jun 2024 03:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717670406; x=1718275206; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fyRLulYgG/Y+WEP8f9CDh3lXVGbCyj6c/Ke7SFhRwcw=; b=XY+Us5aL2wYF69hKA8tP2b/p4i5heBsfwMLldPpMBj2JU2iGUso9onjDIsNMy3cy1E 9YvnjeSBe/sxMOOzeo/qJfXE8bDvwU9lRx4H5L8fkP9tJCbdaA600JI+F1YkxRIZODDK CJVvFxwOIY/FPsCJDOW7wKoHXO0maSqtJIq77K+pB1NSgxgrHSHYFtrBs9Mf+NZ47S58 cXuN1jZ065oUZZAIB7aJ21hOaBl+Babw03/86TTdp8fYlefn/+zPGYV4uya1w3eQfjyC Emw6NNT8EbBILQSPB3E4X1fwUX5GVpZpdShnYypZCQFj2Xf3iZ5mk3Bv48ID8009OvwQ +9lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717670406; x=1718275206; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fyRLulYgG/Y+WEP8f9CDh3lXVGbCyj6c/Ke7SFhRwcw=; b=XR2Oi03gluC3tRkGEjHMjPy8D/lSXXHvCPmNKuLmuCj63aqZXwPlFDsma3R7tnfALE J4MwlOzJrcH4pyzf7JvBO/zJQdyOygkuywbma5Q1LHClSuw/KjndcDdWqfW56Y+2QZvF /q1kuGSILxVSQZTrA+8oPzbEo0h0njiZk8jQHPTXLeVIu/ANk1Z7ItSb2eqgnB8p9uBF TJHklNyGx0s+LCa2O4skYAcR65w+naz0EewvsEEc5EfUWpYjQikOA3ngTR4oNmUmzy5O 901GlDe5GKZBge9aWSlJKslh3ufQdCtJG0SAz3F/Qu6MgKVerFRU+afnjffM3JqCQNYT wpMQ== X-Gm-Message-State: AOJu0YxMjvRwhD1rrcQuHHCMMf6/RMYtFA2Ks3npmw7aBEFJ/0Iq/qLz pvbC6n8dvQh9yvk8NbIJH4Ix/TWBB+4o8gynkYw6KXjLge3b2nHhMBTjlkPXv5viTVdtPz63kCS eEQY= X-Google-Smtp-Source: AGHT+IFS2PcB11beQYWDUOTreL5puonfQILpBjeeKUW74CxZpemVCoHLbcUuHQCoty9rfz5v6U6xAg== X-Received: by 2002:a05:651c:446:b0:2e5:3f56:2a0e with SMTP id 38308e7fff4ca-2eac7a0d1b2mr33845401fa.24.1717670406098; Thu, 06 Jun 2024 03:40:06 -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-4215c2c738bsm17296235e9.32.2024.06.06.03.40.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Jun 2024 03:40:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Mads Ynddal , Stefan Hajnoczi , Yoshinori Sato , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 3/5] hw/usb: Remove newline character in trace events Date: Thu, 6 Jun 2024 12:39:41 +0200 Message-ID: <20240606103943.79116-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240606103943.79116-1-philmd@linaro.org> References: <20240606103943.79116-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Trace events aren't designed to be multi-lines. Remove the newline characters. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- 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 Thu Jun 6 10:39:42 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: 13688275 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2856AC27C55 for ; Thu, 6 Jun 2024 10:41:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFAXf-0003sy-U8; Thu, 06 Jun 2024 06:40:23 -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 1sFAXb-0003rx-6R for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:20 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFAXW-0002xa-HG for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:18 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4213b94b7e7so4465925e9.0 for ; Thu, 06 Jun 2024 03:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717670412; x=1718275212; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UJQM9NsMMAJH9bY3Q3nzlpRNxIjB2sYAJahUizBDung=; b=bqAHOmcnRUJveVbMovHHv85HE2FZthdJUWL6LQZ58rlWGzU+/fMg0drmnGdnLAoozO ET7lK1ttzXUdDG7j7N/AzqP0WGnhAS4eBxm0s7usOdbObc6/DWv64Z/C8M19wxAzllLl hJcq90BHjLoqQBNeKJf/OmF2cBpJpilh2SUnZ4jDbo6qfo823CRRJIjREO4YORJfqNe+ 5+t0gphlH/nKw/IaCT3XK8h3GOv27e7OMNrdsNNdq34uhOZNV7EvOc3q/f2dPDMXVoGN kK78irRJattGpLYYi8+/lru5V4GxGYKJVQpPV4EHHOupdIwQVcnqnHUKV1mk0V71WRCz 0wsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717670412; x=1718275212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UJQM9NsMMAJH9bY3Q3nzlpRNxIjB2sYAJahUizBDung=; b=N9eCu5h79OiCWCCdv1LyjTmkvhxCRs9Bsv39TbxzKzOB+dV7KMvoskJ+f12S0M79Ty XmdTfhvxTA0a3CsN57sx/ooNRZqkY4hyMzKnPEhNEpKoKq8jMvbppjFt55CTTLj+l8qG CnAAGq34bllkIaF98SlNcqFKx26Rm/+sKCLD+nl8dHYSrbJ3kdciWiffcD497kdFblqA a6EfMp1gs8ayI/e3Nwkyk6+29NcpuLtEkenCINExsoVqtcYrHRSI2tS1Y0RuiFZaGjja JUnBOXli2YJwxLq/4DZ090M0P5fZ53ziuvsv+JzGge0vMOtYLiaOWMClak5AKLmetbtD br0g== X-Gm-Message-State: AOJu0YzFLAd0/Gvt2roebiKdaSw50eFJI/frZQhKC6BDuwWtayVONXlC 6pzLaI43jJ7t5vRVpYer8hR3KStnuw9QxV2GPkZ54vI2cCOYET1E8IubpTiO9GB8Nj1JudYP8L2 LyCI= X-Google-Smtp-Source: AGHT+IE9+fiSQIUGoSVTB+yq0KaKF0vUDSpwqgCrbYn9/+XlA9+SqIblJFnsba6dWeNWbO17byeBrA== X-Received: by 2002:a05:600c:314c:b0:418:5ef3:4a04 with SMTP id 5b1f17b1804b1-4215ad180b9mr21005735e9.18.1717670412599; Thu, 06 Jun 2024 03:40:12 -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-42158102a69sm51547525e9.15.2024.06.06.03.40.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Jun 2024 03:40:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Mads Ynddal , Stefan Hajnoczi , Yoshinori Sato , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 4/5] hw/vfio: Remove newline character in trace events Date: Thu, 6 Jun 2024 12:39:42 +0200 Message-ID: <20240606103943.79116-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240606103943.79116-1-philmd@linaro.org> References: <20240606103943.79116-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Trace events aren't designed to be multi-lines. Remove the newline characters. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- 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 Thu Jun 6 10:39:43 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: 13688271 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FFBEC27C52 for ; Thu, 6 Jun 2024 10:40:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFAXh-0003tX-Rb; Thu, 06 Jun 2024 06:40:25 -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 1sFAXg-0003t0-2C for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:24 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFAXd-0002yw-AA for qemu-devel@nongnu.org; Thu, 06 Jun 2024 06:40:23 -0400 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52b9af7a01bso980027e87.0 for ; Thu, 06 Jun 2024 03:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717670419; x=1718275219; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BMtQclkfQ+tzZ8PXSD+8zjanVSPJ3R9g60tZMLUUdbU=; b=qRop8QgJAGLU5YkbpKacQvzQHmJ8spa5rX0r5jtDwrrPCmqxhFAhLd12OuqtTz8Vkq hcTwHlK30dCirJ2BA2UzFxGYSN7SfBdwYJseAktqODEm0bj2KQXrMHCyzClEtoISO5FR NJjhePEKngBNPuRMlSbq1ed/pZQO0K9495ecNnpSLxP/FYbdKXZUpNJeHjY52ioc7ufL a1UApRxddUcc6mNqiQdMPsGDaa2HlkNRp99pVI2cudfLDWBFdg5LGGW1S2+HvzkuapGm VprW+5lafx1ptg3PULfeWyTf7IIsk/GlBYgeDYXEpRqdgjqIiluOX5cmLHmzkTREyhqv +Wzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717670419; x=1718275219; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BMtQclkfQ+tzZ8PXSD+8zjanVSPJ3R9g60tZMLUUdbU=; b=hazj2t1Ly6kwZRX/eC1kEzufsL9IzNyVk3EmXwe1SOx8AokANBXEiVRY10R+QXn1uN PgGMDAZFEl4u9DCPFRRaEKIaCy72+n5XNJYEdScYC150w4PFEFI/Gl1KuKQC8fFhTfz5 GCDvkmJqtHa6nqUN14yaKZ+C4/SdVCsnxcI9vBK06DFCK62FuMIUT+fxlU95aQ2XfvjR 9xqJZYmOkC1+bw55XKeSoIP4RN6qSo3WPBJ6NHt1DDaJo8EeP+OUiPg1L1MJhB5gGkkj jYNhC4Bb9koyGoDSRoEaKKxXHFvtsVIWZkQ+erOlfnCof6tMHKN6M/DnvwI+qrO0e3b0 Epfw== X-Gm-Message-State: AOJu0YzR6qRV5VCUZwP4f+rGXb6b5Ce+kR1pR463wogUjSPNgFaDfcNV JDKmZpudYOmqKKHBjOIQyW+AalSTgXEKsK3h+41Aqo+jj0TITvhEaRcYOzj40RdqE/yngBNxMEa e77c= X-Google-Smtp-Source: AGHT+IEbNR8LHVKrJlckZeaPyQ5urxX7BGDye3sHYKEAxrx9lJ4V2Zb3B85UKbn0B4f10r9v/PG4lw== X-Received: by 2002:a05:6512:3f09:b0:52b:9c8a:735a with SMTP id 2adb3069b0e04-52bab4dbbdbmr3927067e87.40.1717670419082; Thu, 06 Jun 2024 03:40:19 -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-4215c19d52dsm17724945e9.8.2024.06.06.03.40.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Jun 2024 03:40:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_G?= =?utf-8?q?oater?= , Mads Ynddal , Stefan Hajnoczi , Yoshinori Sato , Stefan Berger , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 5/5] tracetool: Forbid newline character in event format Date: Thu, 6 Jun 2024 12:39:43 +0200 Message-ID: <20240606103943.79116-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240606103943.79116-1-philmd@linaro.org> References: <20240606103943.79116-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=philmd@linaro.org; helo=mail-lf1-x136.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org 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é Reviewed-by: Daniel P. Berrangé --- 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]