From patchwork Wed Sep 21 16:08:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 607964 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2496607pvb; Wed, 21 Sep 2022 09:43:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6CQlSw8FnyY8AdHiVuLzxyvyYiJ5EArSSWzmHz+b41DleYIjRGHc/RDIuk9/8PbTGNzlhb X-Received: by 2002:a05:622a:1109:b0:35b:ae57:5a6c with SMTP id e9-20020a05622a110900b0035bae575a6cmr24139598qty.23.1663778597617; Wed, 21 Sep 2022 09:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663778597; cv=none; d=google.com; s=arc-20160816; b=sF2t1c2zesBLOmUR6ZiMiK7pM1v7LF/BcRnqzJa+xhAu1xt6gtNFv/5i3wYdIIa/ZD /VJVdSBoxhe66RerEkgRQf8R5xCutd3VHzHNsvNuUCONSkSzg9/xKvj/1C/OfqkAYRs5 QKL1aG3bPjK47hLZzh8Zj56ri9foDuRnKsAGY1yeK0yvPADQiNXKVApfzjbW66Sv1kbv 2VxcoNS7xVvXQtM/2gHRNmL8wkF4thBLd7Rxf5ngOlP2dXeGU/frIC6yNKtdHDakp8b0 UZ5j0W8pywVHlU3QHT0gmjwuuIhiJ01zrN/8KZpQn+fW24N1iwyHjjBl/Ya/X25ERY1u 4/Zg== 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=zs6if3JsrgpCg8dSorFuiYuQlfRV6HSFVzcfBOEUknM=; b=SvoNTqYOQsM2+jA2i9JxxiQUQE/FPAtdozPDuGGgoHaRz1WmSnPXssfPea+t1MXeDU ODHh4vaSutz71ue8hhvivZuyw5u0ZF6hPmSW1ejSTCdzk9uzU7iNzYSQy/t9W/cF2fJg qtHVKC8by5jcAOvBapJ1GtYTpmJ8Isdx1iGYgUyermZRNxTQOm+e5Tus6uT0cOHIA7WH F/Uxi2OK5khIVS0tSD+Rp95BEX7IF+FLV+AW3yz3gFc/GHKRA64pqQcQyFyDywCchf1v gR6cXdg7p7aJa2NY/RojZLszxKF2xvAxepjL/hvfxXbG99LCGIJ+wpFJSRxJVF7ybhk6 FHCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tBSaZXCH; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m7-20020a05622a054700b0035d0b7c8d3esi1015917qtx.159.2022.09.21.09.43.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Sep 2022 09:43:17 -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=@linaro.org header.s=google header.b=tBSaZXCH; 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=linaro.org Received: from localhost ([::1]:36180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ob2of-0006I2-51 for patch@linaro.org; Wed, 21 Sep 2022 12:43:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ob2ND-000740-Hw for qemu-devel@nongnu.org; Wed, 21 Sep 2022 12:14:55 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:44828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ob2NB-0001Va-OZ for qemu-devel@nongnu.org; Wed, 21 Sep 2022 12:14:55 -0400 Received: by mail-wr1-x429.google.com with SMTP id c11so10667356wrp.11 for ; Wed, 21 Sep 2022 09:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=zs6if3JsrgpCg8dSorFuiYuQlfRV6HSFVzcfBOEUknM=; b=tBSaZXCHyL0X04o1b89r/sLIPcBvPkr2w01jT2oe9V7TTqQy9BHGCmNmtdgSs0AXsC T9bINdrmnGZ+mkMzznBZnAIgdxeeI2iqWvJTNIRpQltLMnSkn+6zK6610r5wvPlaypVM sQro1bKETDsae2m8+Fyu5x+siStPyYF+0G1fK6JCV4/9vlmQoo5aukU8uCu7CaWg5lNH LBz3X+O3zVHMMM31zPqskcXRtXt/o6Q/iY+pSxjiA7HOujQ0fwZQTHKsvOMIpK8I3vw1 NZ/FCuWxjKyvvgUw0+GifXs3kl0STEn6v5nb8nKxBEUY6gW6XdJ1t7u9SHcA45JCDzSm 8Ugw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=zs6if3JsrgpCg8dSorFuiYuQlfRV6HSFVzcfBOEUknM=; b=fL/fNjNE9XsltlUlySzWwWL8dCH1g9iP7wQaFab5vTdI2nhFdtj2os5kp55jOLbnG4 lB2SpAWQbStBEbfCGks/dqmK7Ry/GjsbqgzWNR1XZoLsNX+QybhVObWjx2yvb/ysyN7L 4BoSE8qsc83V3WFDeBy15gYW5ZMql5NHbaN2X7Gqi1YU5F/Ezv8wBamcIx7oKck8VjyZ AIo/Q6Y2+ffwu53eCoKcO6Bo95mAMzDPdcp4cFbitTZUThUMLzSKuzvbicaJIj4lO3Fw YBJFxec33t+AfEVA2fOctnRaH4IPBjiSfA9Geu0UJq+OEIi88NR/IJ9NAROMKmgW9z99 3btA== X-Gm-Message-State: ACrzQf2/UWRHx7bMLcgRdwtQBvmWvSL/VobO+/AQQL0z6CQXJcxUF/as 9OIiM9u4+0EfxJKTdXX8heYJXQ== X-Received: by 2002:a5d:59a9:0:b0:22b:e6a:4796 with SMTP id p9-20020a5d59a9000000b0022b0e6a4796mr6907197wrr.47.1663776892207; Wed, 21 Sep 2022 09:14:52 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id q63-20020a1c4342000000b003b4bd18a23bsm3218113wma.12.2022.09.21.09.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 09:14:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 04F121FFC1; Wed, 21 Sep 2022 17:08:02 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: minyihh@uci.edu, ma.mandourr@gmail.com, Luke.Craig@ll.mit.edu, cota@braap.org, aaron@os.amperecomputing.com, kuhn.chenqun@huawei.com, robhenry@microsoft.com, mahmoudabdalghany@outlook.com, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , Alexandre Iooss Subject: [PATCH v1 09/10] contrib/plugins: reset skip when matching in execlog Date: Wed, 21 Sep 2022 17:08:00 +0100 Message-Id: <20220921160801.1490125-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220921160801.1490125-1-alex.bennee@linaro.org> References: <20220921160801.1490125-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The purpose of the matches was to only track the execution of instructions we care about. Without resetting skip to the value at the start of the block we end up dumping all instructions after the match with the consequent load on the instrumentation. Signed-off-by: Alex Bennée Cc: Alexandre Iooss Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- contrib/plugins/execlog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index e659ac9cbb..b5360f2c8e 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -147,6 +147,9 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) /* Register callback on instruction */ qemu_plugin_register_vcpu_insn_exec_cb(insn, vcpu_insn_exec, QEMU_PLUGIN_CB_NO_REGS, output); + + /* reset skip */ + skip = (imatches || amatches) ? true : false; } }