From nobody Fri May 3 10:25:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517238137218141.9073412159628; Mon, 29 Jan 2018 07:02:17 -0800 (PST) Received: from localhost ([::1]:42901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egAwp-0006v7-2s for importer@patchew.org; Mon, 29 Jan 2018 10:02:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eg0sx-0006zW-4K for qemu-devel@nongnu.org; Sun, 28 Jan 2018 23:17:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eg0sw-0005Dr-97 for qemu-devel@nongnu.org; Sun, 28 Jan 2018 23:17:35 -0500 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:37924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eg0sw-0005DR-1Y for qemu-devel@nongnu.org; Sun, 28 Jan 2018 23:17:34 -0500 Received: by mail-lf0-x244.google.com with SMTP id g72so7915247lfg.5 for ; Sun, 28 Jan 2018 20:17:33 -0800 (PST) Received: from beist.no ([2001:4662:bfce:2::5b0]) by smtp.gmail.com with ESMTPSA id k67sm1541416lfe.43.2018.01.28.20.17.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2018 20:17:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E7EpKL4JjK0J3P4uso2iyWej9yRXsabSIBL1MVcc8IU=; b=f5wDp//mp3fIIjTG5H5E/jw2FtvyUg3juNKbO5T53T8PEDPqI+gqwKbmML2ihK4GVL t7Dm2jhyzEdtL9IMCYOR6SgiyH02C7Ay//0BE3LfSPejN7t4mcanHigCxkspTTFEqV7l uGtOk9efCqAX3+s/mgBucJcxiXZM2EsVH/7d7P0/pGU44FrJxlYFgf/yn6oSYGaGwzSR j4palN7xQw2sicH/5fZbTm5VpJl3yUJx0lllgXzawR57TMzoS7cE+MdRlHKQLXfrkEhE fob6GhOZZ9P/3cidnXma0tJ1PWGqoJDdqwxloMiO0K1/drXHZc8z974sD6uKiqBWaG59 Oi6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E7EpKL4JjK0J3P4uso2iyWej9yRXsabSIBL1MVcc8IU=; b=WlikOiA3YgWfIgCJ1yOULc1zfdat3wCGkMJuxB4tDGNxMuFmhcipTMUqRk107j2j4D eRd49rcdQJ83pHybCc4HnfVcOtcSHBfPkYWGzoetdFc5rj27OOzRYpNkdQrKZjLJTFBf 5iAB1UgGylObM/VXofl5h69OfIzQiRgJrDHWpt6wRfcZBi7nTrl2nEVm+hBD9CGvq5UY UsPcraT4AuK5OMw2p3YAMzZGxUxjosXUDr8uFyFwPpx8scFDowBPtNO0eKnuAk9bOZLt aXjwQKnbHBIwNMuMVtu7AWEEjQ73thmPyNKwuMN5F9h1GozhVk+mOwTZbHTbWh2wk/xf z6jQ== X-Gm-Message-State: AKwxytd3Fpm7r/tG6Z54TcOykq6WNT894r6ENDCRkyvAF/GJKpoNZlDS fKwgv1oN7J09gl9sUcEDWZYrUPjnu8g= X-Google-Smtp-Source: AH8x225MlvFxWh3LWca4r5G0CkAor482afz6bDYBxdZxnI5ExaiID5Y1By4GCeagEFZ0EgCGq2QCzg== X-Received: by 10.25.113.2 with SMTP id m2mr11754465lfc.71.1517199452607; Sun, 28 Jan 2018 20:17:32 -0800 (PST) From: Jon Emil Jahren To: qemu-devel@nongnu.org Date: Mon, 29 Jan 2018 05:16:47 +0100 Message-Id: <20180129041648.30884-2-jonemilj@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180129041648.30884-1-jonemilj@gmail.com> References: <20180129041648.30884-1-jonemilj@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 X-Mailman-Approved-At: Mon, 29 Jan 2018 09:55:45 -0500 Subject: [Qemu-devel] [PATCH 1/2] tracetool: Update argument format regex to non-greedy star X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefanha@redhat.com, Jon Emil Jahren Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Using the greedy star matching, arguments like "...%"PRIx64 caused issues for functions with multiple PRI formats. The issue was only seen with the ust backend, as it is the only one using the format regex. The result for many functions was that the arguments coming after the greedy star end was left out of the tracepoint, and in some cases some of the arguments that was traced had the wrong format. Signed-off-by: Jon Emil Jahren --- scripts/tracetool/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 0670ec17d5..409b0fa8f1 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -259,8 +259,9 @@ class Event(object): self.name, self.args, fmt) - - _FMT =3D re.compile("(%[\d\.]*\w+|%.*PRI\S+)") + # Star matching on PRI is dangerous as one might have multiple + # arguments with that format, hence the non-greedy version of it. + _FMT =3D re.compile("(%[\d\.]*\w+|%.*?PRI\S+)") =20 def formats(self): """List of argument print formats.""" --=20 2.14.3 From nobody Fri May 3 10:25:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1517238302430955.2315427331986; Mon, 29 Jan 2018 07:05:02 -0800 (PST) Received: from localhost ([::1]:43066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egAzS-0000gv-4g for importer@patchew.org; Mon, 29 Jan 2018 10:04:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eg0t3-00070Y-Jd for qemu-devel@nongnu.org; Sun, 28 Jan 2018 23:17:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eg0t2-0005Gm-PI for qemu-devel@nongnu.org; Sun, 28 Jan 2018 23:17:41 -0500 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:35996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eg0t2-0005G9-He for qemu-devel@nongnu.org; Sun, 28 Jan 2018 23:17:40 -0500 Received: by mail-lf0-x244.google.com with SMTP id t79so7932923lfe.3 for ; Sun, 28 Jan 2018 20:17:40 -0800 (PST) Received: from beist.no ([2001:4662:bfce:2::5b0]) by smtp.gmail.com with ESMTPSA id k67sm1541416lfe.43.2018.01.28.20.17.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2018 20:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8bQexRvpRsqHbMZau57wMPV5iNamZ3i4nOsaJGWBDV8=; b=mFj1tTpZrsM320zfyvxXRa+EnvXBSxgjUmjysYUkaMVgKa0DT5yTpGDdosTuwlr4CO gXgUv6dh1jhL02RxHozfcL/aSm4WO84j+sBfetbzcls2dn1yX+hyuX3FWUHmx89nA4lo 0qtuOS4Oxy55HHd+KaX5t79qhcBnqpQFUl7vB3DLpE1mi7nnc5e0XApyjddvOASRbVfP 8D9vlcg0JR8Ikihu40u6QcjOLkU8Etb0Ou/TFM4cXmfOMGrtWLK2uUHxdhwulsRwoha4 SmnhD8WvDEvSMYOJYt/shW6wwD5SCHb+RYbSYZ1znFoOSt/XpgO1IxihLEw6Q0A2NB1q mfcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8bQexRvpRsqHbMZau57wMPV5iNamZ3i4nOsaJGWBDV8=; b=HG1lxpPDXG7San9GQRpH5srHvBX330eSmBOtumEMuKlhgEhzyGZht7GhcAXbmlEsz+ Bc7xXmeweJR2v9JVW4Ogi73nGWGuBt94MWWCaDDlXVrjMkF8esl/UxGuVAh9D0i4sg9p lKW/u3DOa0UahkFlB4e/zu6CTD2z5WZGrvfsd4w8NnkbuOZeZjIDqyj00X5xD0np9ERG G5BM2A6vHk3BL6+wiEM3/xcD4zuaQXdqkf7xYM7R1ZJ+i4ZKrhVXOPKOif5gVxHWqPke 84hyFySMufUAZuI+53auj9BdejromC1tYGZu8RAHa+cvzzZWN1ZrIEaM5JL8UGJ1dfji vMaQ== X-Gm-Message-State: AKwxytdYpP4K4DxVs7iwg2OLwZ1DC3M9ihV6NyIcUR6QNTPein2f5T6T Cs2gCXcJtsPv6Ii7S+gInDUqyiK3UbE= X-Google-Smtp-Source: AH8x2241E/E4+OHeQoDp+pRpQXEivGOc0Fkohk2s+hmUaS3Xf9wZy5CKbHo7HQjsSXDaeOpTfHiJQQ== X-Received: by 10.25.161.84 with SMTP id k81mr13286288lfe.127.1517199459138; Sun, 28 Jan 2018 20:17:39 -0800 (PST) From: Jon Emil Jahren To: qemu-devel@nongnu.org Date: Mon, 29 Jan 2018 05:16:48 +0100 Message-Id: <20180129041648.30884-3-jonemilj@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180129041648.30884-1-jonemilj@gmail.com> References: <20180129041648.30884-1-jonemilj@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 X-Mailman-Approved-At: Mon, 29 Jan 2018 09:55:45 -0500 Subject: [Qemu-devel] [PATCH 2/2] tracetool: For ust trace bool type as ctf_integer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: stefanha@redhat.com, Jon Emil Jahren Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Previously functions having arguments of type bool was not traced properly. The bool arguments were missing from the trace. Signed-off-by: Jon Emil Jahren --- scripts/tracetool/format/ust_events_h.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/f= ormat/ust_events_h.py index 514294c2cc..4e95e9b3f9 100644 --- a/scripts/tracetool/format/ust_events_h.py +++ b/scripts/tracetool/format/ust_events_h.py @@ -79,7 +79,8 @@ def generate(events, backend, group): out(' ctf_integer_hex('+ t + ', ' + n + ', ' + n= + ')') elif ("ptr" in t) or ("*" in t): out(' ctf_integer_hex('+ t + ', ' + n + ', ' + n= + ')') - elif ('int' in t) or ('long' in t) or ('unsigned' in t) or= ('size_t' in t): + elif ('int' in t) or ('long' in t) or ('unsigned' in t) \ + or ('size_t' in t) or ('bool' in t): out(' ctf_integer(' + t + ', ' + n + ', ' + n + = ')') elif ('double' in t) or ('float' in t): out(' ctf_float(' + t + ', ' + n + ', ' + n + ')= ') --=20 2.14.3