From patchwork Wed Feb 10 22:10:32 2021 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: 380239 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp1557083jah; Wed, 10 Feb 2021 14:16:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTnu8zYTbRo8Hw+2G8CVv9msi863ubzM5ayGmxXaPAp/QByw2PljTH0hmVilqGiG2rGn7i X-Received: by 2002:a25:76ce:: with SMTP id r197mr7913018ybc.11.1612995408607; Wed, 10 Feb 2021 14:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612995408; cv=none; d=google.com; s=arc-20160816; b=PubPtgt+0A8xXJPFGsJP7tR0mKZMsXpFihXV+3E9RX1x/wbICzlTk9TPuIY5St+cXF D4HW1JMsxltiwlmVXaBT4spuuruo7OCVdbiL6XaWKOPMMLxcyu+f+1VNKPcoOjziV9sU Uk99V68YC6/2QoZr7eEKHmxSEDl8hU13JH6ir3szUAfM7cixU91IGJKvSJx+gIylyc9F 3gHjioyEgswjaVsE2xv4Hy7IzclCvGX6P+LRQcsHxxryE0yD2N/QYGdM/23ICipk2ol7 t1vruSmhFMSU2jPwMbI165939M04hD1Kl01GGVTr91rCq6Ij1ZrfYk8ksEmTgSQysjLt 90dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=Qzk+/85a77Rh+6wP7aVwaVCiF7hH5djFND2hxFRj0PU=; b=meqSnHF/EBa/INxabZaIHH5Kp/3LYrWfybphJFOZXiY8k2SmM/h4qm8SXKDhhXnoVL Tfr/vUlq9uOmJHP0yed+wg3x58vQ3hNS2+E2GRa9yrhUAEqxK6M7/yYa1KoU4DBXe3OX EN6YCZHRY8V2z7Pfuq/72mryT77NX/rm5/wDkVTRUsZi+jrF3nRGUH6TfSsP2k2XVxnC zCfmNlVGqr5/brEdnAhN0WNKoBCsNnZrMFQySy9Uq1d2MGreNiMLvwAwyyE4qZJH0TgP bh78gbF/X9xeqDo+8TNDkE/N+wc7jmZpb/sJSD6UaPcHG313QM6qV/yxRHoZsiyWpbD9 w7CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IXg0XUaW; 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=fail (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 s11si3123429ybp.477.2021.02.10.14.16.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Feb 2021 14:16:48 -0800 (PST) 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=fail header.i=@linaro.org header.s=google header.b=IXg0XUaW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9xmy-00010c-0C for patch@linaro.org; Wed, 10 Feb 2021 17:16:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9xhV-000610-Qw for qemu-devel@nongnu.org; Wed, 10 Feb 2021 17:11:09 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:38223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9xhI-0003B9-Rt for qemu-devel@nongnu.org; Wed, 10 Feb 2021 17:11:09 -0500 Received: by mail-wm1-x32c.google.com with SMTP id y134so3306669wmd.3 for ; Wed, 10 Feb 2021 14:10:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Qzk+/85a77Rh+6wP7aVwaVCiF7hH5djFND2hxFRj0PU=; b=IXg0XUaWt2ZW23vsrkVfUsG21hsVeBMECo8tfko4LtjEPp05gHeW4d2JmFLmiPPwGF vMyZLWADBAhahKdxQotyEYuhs9g2oijHYPEkIpbGiJr44qBsuUnxLIT6XJSPjEanv3V/ 8GRj6RTmgG35PMB+4nJRSEaqvn8WZT9bbDGFQ43dUGT19cfqtbuNeKF07II+plpZZABF yhNE5djxZka4JYv1rx9hUzcAzbw4hxAlGYRyQ4CoLg+FATB37KJ73B4ZWkjomvxvlLwM x1kNpl2mrmSTX5zCSLf489ZiyDamv8K6+fcLn1BY3q5KtIRqg+fr442sAAZHzb1hBBmY LYag== 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:mime-version :content-transfer-encoding; bh=Qzk+/85a77Rh+6wP7aVwaVCiF7hH5djFND2hxFRj0PU=; b=K9AU7LVquxpeAe6XOj/RVAFX29WdD9OHLyUNChKhgtE5f62DTcDXgWcB/CbbCC/s+X /3+u3udiWf9RxfYFEHcTG/sehqYMCOJaNYpolp5Wvj7d+85dB/iVFeSt/div9Y6qUGnK Qx6iBwh91Rd9JWTPIIJowyNWeta8Mmp5iLRVvSMn3XwGsysp9bKKs0i/yHxjmB9s/RE2 /DDcXuaRK9kJGR95DC/pTHYl7nVB2SPOSCQtS++j0Le5jc+Qe0fOiyU5tnxFcTosBYSp OyeDUP0bror0+a1wu/wAH8tGL8p+PriH02TTMNXa8iP8B6TJlT9yp1GYwukJt9xWsV57 u1nw== X-Gm-Message-State: AOAM533z/NFs5MM4fev8TazM277WheccrkuI/EMLr5P2SojwM2aUrCli 6Hfxtswq7JkL0KKLXek5qr7BEA== X-Received: by 2002:a1c:c2c4:: with SMTP id s187mr1199757wmf.97.1612995055074; Wed, 10 Feb 2021 14:10:55 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s23sm4431461wmc.35.2021.02.10.14.10.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 14:10:54 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7D2931FF7E; Wed, 10 Feb 2021 22:10:53 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 00/21] plugins/next pre-PR (hwprofile, regression fixes, icount count fix) Date: Wed, 10 Feb 2021 22:10:32 +0000 Message-Id: <20210210221053.18050-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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, 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, OK time to start preparing a plugins PR with all the accumulated fixes over the last few months. Broadly they are: - a new API for HW access profiling - a bunch of style clean-ups - a fix for a regression caused by recent TCG updates - Richard's io_recompile clean-ups - a fix for an icount/io_recompile miscount The following patches could still do with some review: - tests/acceptance: add a new tests to detect counting errors - accel/tcg: re-factor non-RAM execution code - accel/tcg: cache single instruction TB on pending replay exception - accel/tcg: actually cache our partial icount TB - tests/acceptance: add a new set of tests to exercise plugins - tests/plugin: expand insn test to detect duplicate instructions Alex Bennée (12): hw/virtio/pci: include vdev name in registered PCI sections plugins: add API to return a name for a IO device plugins: new hwprofile plugin accel/tcg/plugin-gen: fix the call signature for inline callbacks tests/plugin: expand insn test to detect duplicate instructions tests/acceptance: add a new set of tests to exercise plugins accel/tcg: actually cache our partial icount TB accel/tcg: cache single instruction TB on pending replay exception accel/tcg: re-factor non-RAM execution code accel/tcg: remove CF_NOCACHE and special cases accel/tcg: allow plugin instrumentation to be disable via cflags tests/acceptance: add a new tests to detect counting errors Richard Henderson (4): exec: Move TranslationBlock typedef to qemu/typedefs.h accel/tcg: Create io_recompile_replay_branch hook target/mips: Create mips_io_recompile_replay_branch target/sh4: Create superh_io_recompile_replay_branch zhouyang (5): contrib: Don't use '#' flag of printf format contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar" contrib: Add spaces around operator contrib: space required after that ',' contrib: Open brace '{' following struct go on the same line docs/devel/tcg-plugins.rst | 34 +++ include/exec/exec-all.h | 9 +- include/exec/tb-context.h | 1 - include/hw/core/cpu.h | 4 +- include/hw/core/tcg-cpu-ops.h | 13 +- include/qemu/qemu-plugin.h | 6 + include/qemu/typedefs.h | 1 + target/arm/internals.h | 3 +- accel/tcg/cpu-exec.c | 61 +---- accel/tcg/plugin-gen.c | 32 +-- accel/tcg/translate-all.c | 129 ++++------ accel/tcg/translator.c | 2 +- contrib/ivshmem-server/main.c | 2 +- contrib/plugins/hotblocks.c | 2 +- contrib/plugins/hotpages.c | 2 +- contrib/plugins/howvec.c | 19 +- contrib/plugins/hwprofile.c | 305 +++++++++++++++++++++++ contrib/plugins/lockstep.c | 6 +- hw/virtio/virtio-pci.c | 22 +- plugins/api.c | 20 ++ target/cris/translate.c | 2 +- target/lm32/translate.c | 2 +- target/mips/cpu.c | 18 ++ target/moxie/translate.c | 2 +- target/sh4/cpu.c | 18 ++ target/unicore32/translate.c | 2 +- tests/plugin/insn.c | 12 +- contrib/plugins/Makefile | 1 + tests/acceptance/tcg_plugins.py | 134 ++++++++++ tests/tcg/i386/Makefile.softmmu-target | 10 + tests/tcg/i386/Makefile.target | 7 + tests/tcg/x86_64/Makefile.softmmu-target | 10 + 32 files changed, 697 insertions(+), 194 deletions(-) create mode 100644 contrib/plugins/hwprofile.c create mode 100644 tests/acceptance/tcg_plugins.py -- 2.20.1