From nobody Sun Feb 8 21:18:19 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1609935662; cv=none; d=zohomail.com; s=zohoarc; b=Gw7nHYjLmok0PZXbDoBYXmrSaMSL8SSt7KN+dRKxpz4832QcY9JSDLHSIWOreEDYOZUanqXVDU85eZYtpjXLd+trNfDxL7PSq8hPcuxJXnij7OxJQcPhe1NZl077mIAL/WSxnuGoafTHgQ+UlCjnNRcsUmcolKHOahTHaDwonuU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609935662; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=pLE8MX2Kr5jkdRqKkYLYDCY5syUQvFbCxJmjdWyTfuE=; b=JUZIb7AYWX2dWoT4VUYSnplYrDx7PoZSSmGZlESBdOa3pUCfaS0clL9GdsAdzP+GhICDwX034uv2RrgYkMm+0N5c7QyijMYPDL0C+UbqUWs5Gofn3/rMQdPLL/QJtDiOutZdlvIBBviWs+z4smGRs8DUZvzZcokOl5fXKUfMy5U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1609935662721756.3832736103941; Wed, 6 Jan 2021 04:21:02 -0800 (PST) Received: from localhost ([::1]:42706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kx7oD-0008EQ-1V for importer@patchew.org; Wed, 06 Jan 2021 07:21:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kx7n4-0007GA-4T for qemu-devel@nongnu.org; Wed, 06 Jan 2021 07:19:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:32803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kx7mz-0008CB-IC for qemu-devel@nongnu.org; Wed, 06 Jan 2021 07:19:48 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-hPf2Tdw5PNeqeQtYrqYwtg-1; Wed, 06 Jan 2021 07:19:40 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 32574100C605 for ; Wed, 6 Jan 2021 12:19:39 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-114-197.ams2.redhat.com [10.36.114.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B08A6087C; Wed, 6 Jan 2021 12:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609935582; 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; bh=pLE8MX2Kr5jkdRqKkYLYDCY5syUQvFbCxJmjdWyTfuE=; b=G9zTswcOaev3bVEZHnUhtfBoHJa9Y2AkWDdu1IUyd4JrvZsXEoiHJIK8BYQ5TtfqIIyD4J gkoTPDpN/8RR8WPfLdVNQvovVz8kecn4X/Wlir/IpZIWcZnkL6wkwezEM78QzNLQ/wy7vd zQYaP1+O3zK1IlFblewP3A1wibgPkcE= X-MC-Unique: hPf2Tdw5PNeqeQtYrqYwtg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH] tracetool: strip %l and %ll from systemtap format strings Date: Wed, 6 Jan 2021 12:19:32 +0000 Message-Id: <20210106121932.1002928-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.252, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , William Cohen , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) All variables are 64-bit and so %l / %ll are not required, and the latter is actually invalid: $ sudo stap -e 'probe begin{printf ("BEGIN")}' -I . parse error: invalid or missing conversion specifier saw: operator ',' at ./qemu-system-x86_64-log.stp:15118:101 source: printf("%d@%d vhost_vdpa_set_log_base dev: %p base: 0x%x= size: %llu refcnt: %d fd: %d log: %p\n", pid(), gettimeofday_ns(), dev, base, size, re= fcnt, fd, log) ^ Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- scripts/tracetool/format/log_stap.py | 6 ++++++ 1 file changed, 6 insertions(+) This is an alternative approach to https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg00550.html diff --git a/scripts/tracetool/format/log_stap.py b/scripts/tracetool/forma= t/log_stap.py index b486beb672..7bac10784b 100644 --- a/scripts/tracetool/format/log_stap.py +++ b/scripts/tracetool/format/log_stap.py @@ -49,6 +49,12 @@ def c_fmt_to_stap(fmt): elif fmt[i] =3D=3D '"' and not escape: if state =3D=3D STATE_LITERAL: state =3D STATE_SKIP + # All variables in systemtap are 64-bit in size + # The "%l" integer size qualifiers is thus redundant + # and "%ll" is not valid at all. Simply strip all + # size qualifiers for sanity + literal =3D literal.replace("%ll", "%") + literal =3D literal.replace("%l", "%") bits.append(literal) literal =3D "" else: --=20 2.29.2