From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660209165664.5354251649989; Fri, 3 Sep 2021 02:10:09 -0700 (PDT) Received: from localhost ([::1]:46938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5D6-00066j-4G for importer@patchew.org; Fri, 03 Sep 2021 05:10:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM56y-0005ym-Ip for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:48 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:44710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM56v-0005U5-BN for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:48 -0400 Received: by mail-wm1-x330.google.com with SMTP id l7-20020a1c2507000000b002e6be5d86b3so3085103wml.3 for ; Fri, 03 Sep 2021 02:03:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c14sm4189740wrr.58.2021.09.03.02.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:40 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EEE0C1FF98; Fri, 3 Sep 2021 10:03:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6pTYsL1Hep9qUvvKYQw3eO5QWV8nz4ZZRsJUYLQf+Cw=; b=YUC7Fc2s3ATPv+tGHaSsck5CdaSX6/TE5v9dcgXQP8FbjFXGsznNMXAMK9wuuNcvBi 8MfDuk/Tb2ml32Zo8YskASjUA8qN0FhOVTcxYfMvGPLXMAQ6JqPSGXiB7omrxSIP4Bl3 OJUGKX/CNXPBMv5TzEJRrfWFD4WlIB2+MMvbL28LXsAo5PToxIsf6it8QZ0QOkcghOAJ MLwfK9Xkf5I5vRdI7mjnovmlgVeUIP7HrDl4Xa5T5Ilviw6oSUwRJ4fCkwIfsIptD8sF KYKpwnyaHEbEFOy+oiY/TfX2Qn2rD21L2Yr+UzYiukFdXiUAGSo/vBY7x5i585Ru9prO +J8A== 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:mime-version:content-transfer-encoding; bh=6pTYsL1Hep9qUvvKYQw3eO5QWV8nz4ZZRsJUYLQf+Cw=; b=RmCWHoZri0S31KJ1F9h5ZgQJ0hq8nTzPBxLP4aPOMzcBiGVW20Bp6TN2oHmnKyv8a3 4IWN8T0o0wcAcyBeuAOQQndxR+BE0QqhnREa4y53NzzA7q5vZvL9ujr5FyM/ugv6ocO8 a5/14tXao5K+29VCkvr0scxvB2RJol9qNwv22IAH6fx1oYLw/cYXleDAiaBps+c59M+T fPc48b4mQQaujDZuzcN0htoU9Cx3rZC9HoT8G4Je+sx9VRWknZVP95aBWd2v7YtU1tzk RWiboXoP/ruT1LR0gCTsVHzb+msiMIBEEk2DuUjsr+BF2fE32TTad7WOm/TBVMJpA7yX ekIA== X-Gm-Message-State: AOAM531qvllayLwMNtUZ57SnIkSM0fTZ4b++1fmwy+N0DIzgWb2p3ySP HOW6RhDQ6XNW9CBtfT3F1LlYgQ== X-Google-Smtp-Source: ABdhPJzA6ykm2PVboVuWfVhfF5YjhW8xt9U7MWcV+WVUKVJJm6h4WkZVK7wX8e7kJPHRWPNT6vna6g== X-Received: by 2002:a05:600c:3641:: with SMTP id y1mr7220019wmq.181.1630659823158; Fri, 03 Sep 2021 02:03:43 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/22] plugins/execlog: removed unintended "s" at the end of log lines. Date: Fri, 3 Sep 2021 10:03:18 +0100 Message-Id: <20210903090339.1074887-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::330; envelope-from=alex.bennee@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 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: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660209972100003 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210803151428.125323-1-ma.mandourr@gmail.com> Message-Id: <20210806141015.2487502-2-alex.bennee@linaro.org> Cc: qemu-stable@nongnu.org diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 2de9f0d7d4..a5275dcc15 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -67,7 +67,7 @@ static void vcpu_insn_exec(unsigned int cpu_index, void *= udata) /* Print previous instruction in cache */ if (s->len) { qemu_plugin_outs(s->str); - qemu_plugin_outs("s\n"); + qemu_plugin_outs("\n"); } =20 /* Store new instruction in cache */ --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660028847609.5891633556884; Fri, 3 Sep 2021 02:07:08 -0700 (PDT) Received: from localhost ([::1]:38822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5AB-0000i0-O5 for importer@patchew.org; Fri, 03 Sep 2021 05:07:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM570-000633-Ui for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:50 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:45928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM56x-0005WW-EO for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:50 -0400 Received: by mail-wr1-x42a.google.com with SMTP id n5so7154867wro.12 for ; Fri, 03 Sep 2021 02:03:46 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o10sm4518062wrc.16.2021.09.03.02.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:40 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 10E631FF99; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GPJMbPb/00tFTVR36+R0IPNgIkKT7YfEwaVVfGYX3DQ=; b=T/l5pdG85Xf30+CSIQbxDgQg8GO1ItpCkKx6PyZ2A0DkTOCWPKws70Rs7ACEJ6/4l3 moqd2V0pa5u2/xhG+KQ2Ud6LStPcc0WbpGrk63B/ESTaePUl/iDsZ++JUSdvbTiZSD7Y hSX0WW7prwp06xHjs6YRsb3+k8eSx1aBhfYsVxSo1T1dUG3fb7mcf85tVRmBLku4AEW6 HcE6ENGqBikn+QSNadpA8V47T4tBqR3bO5aQ4ylBbi9V851pGBK09bNElOOqe254ogZ8 as09rAHVvgnykP4T3L0CVMDo1eY/CLXoBwiEY8PboPeYBy6+raNPlExNcuwZTWeTn2lH YCNA== 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:mime-version:content-transfer-encoding; bh=GPJMbPb/00tFTVR36+R0IPNgIkKT7YfEwaVVfGYX3DQ=; b=A05nXAmkJlmBIaugNubC0IOv+ESjCULfDVUI6vL64TAKLOBbjVKKc/pI61Qkg8Mlxl oDigCeEe4Cmy9N6UDMpO3TVCnNG6kG/1SOJkxnaA4REyrs7d8FTojKZykmriKsym/i5Z uWGQHAq/AkYMqNa0NgCteosZmrcjxNpPw4JIPyoZmMjp3hW0wJqCNO4MXWxqeSuCIk/k YpSffZTGkjbHkQVWxH8Ut7DTIk0WGwwWctLI39Rbsi6licGv1R8nsWF2A/Y+dXzZUHGb GZO4zMW+LyST/WIHVYWWkcQ5Rjr83f4/uijsI5oTpgNGcINJG9HONeb+T+N9fBXFnB4k Qw+w== X-Gm-Message-State: AOAM532hcOVnFjVq6Om3IGRIvhcHaevNHVyqRmw4DsKYWHuXbrfa18xn rsPhGzG7DcYqzwBJKwEGKyeaHQ== X-Google-Smtp-Source: ABdhPJy8eWAqJVEbZC2XCTsgdQLLCwPlUQAXxJQP/H5epTveMhRFBeNuIthII/n+V15dG/1X0ktf2g== X-Received: by 2002:a05:6000:1627:: with SMTP id v7mr2861866wrb.54.1630659825962; Fri, 03 Sep 2021 02:03:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/22] gitlab-ci: Merge "build-disabled" with "build-without-default-features" Date: Fri, 3 Sep 2021 10:03:19 +0100 Message-Id: <20210903090339.1074887-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660030600100001 From: Thomas Huth Both jobs are testing more or less the same thing (building QEMU with features disabled), so we are wasting precious CI cycles here by doing this twice. Merge the jobs by using --without-default-features by default and just adding some additional --disable-... switches which are not covered by the generic switch (yet). And while we're at it, also test compilation with "--disable-fdt" (which forces us to change the list of targets in this job, though, since some targets do not work without fdt). Signed-off-by: Thomas Huth Reviewed-by: Willian Rampazzo Message-Id: <20210730143809.717079-2-thuth@redhat.com> Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210806141015.2487502-3-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 903ee65f32..f390f98044 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -202,85 +202,6 @@ acceptance-system-opensuse: MAKE_CHECK_ARGS: check-acceptance =20 =20 -build-disabled: - extends: .native_build_job_template - needs: - job: amd64-fedora-container - variables: - IMAGE: fedora - CONFIGURE_ARGS: - --disable-attr - --disable-auth-pam - --disable-avx2 - --disable-bochs - --disable-brlapi - --disable-bzip2 - --disable-cap-ng - --disable-capstone - --disable-cloop - --disable-coroutine-pool - --disable-curl - --disable-curses - --disable-dmg - --disable-docs - --disable-gcrypt - --disable-glusterfs - --disable-gnutls - --disable-gtk - --disable-guest-agent - --disable-iconv - --disable-keyring - --disable-kvm - --disable-libiscsi - --disable-libpmem - --disable-libssh - --disable-libudev - --disable-libusb - --disable-libxml2 - --disable-linux-aio - --disable-live-block-migration - --disable-lzo - --disable-malloc-trim - --disable-mpath - --disable-nettle - --disable-numa - --disable-opengl - --disable-parallels - --disable-pie - --disable-qcow1 - --disable-qed - --disable-qom-cast-debug - --disable-rbd - --disable-rdma - --disable-replication - --disable-sdl - --disable-seccomp - --disable-slirp - --disable-smartcard - --disable-snappy - --disable-sparse - --disable-spice - --disable-strip - --disable-tpm - --disable-usb-redir - --disable-vdi - --disable-vhost-crypto - --disable-vhost-net - --disable-vhost-scsi - --disable-vhost-kernel - --disable-vhost-user - --disable-vhost-vdpa - --disable-vhost-vsock - --disable-virglrenderer - --disable-vnc - --disable-vte - --disable-vvfat - --disable-xen - --disable-zstd - TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu - s390x-softmmu i386-linux-user - MAKE_CHECK_ARGS: check-qtest SPEED=3Dslow - # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by # the configure script. The container doesn't contain Xen headers so # Xen accelerator is not detected / selected. As result it build the @@ -649,12 +570,20 @@ build-without-default-devices: build-without-default-features: extends: .native_build_job_template needs: - job: amd64-debian-container + job: amd64-fedora-container variables: - IMAGE: debian-amd64 - CONFIGURE_ARGS: --without-default-features --disable-user - --target-list-exclude=3Darm-softmmu,i386-softmmu,mipsel-softmmu,mi= ps64-softmmu,ppc-softmmu - MAKE_CHECK_ARGS: check-unit + IMAGE: fedora + CONFIGURE_ARGS: + --without-default-features + --disable-capstone + --disable-fdt + --disable-pie + --disable-qom-cast-debug + --disable-slirp + --disable-strip + TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-sof= tmmu + sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user + MAKE_CHECK_ARGS: check-unit check-qtest SPEED=3Dslow =20 build-libvhost-user: stage: build --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660038269976.1027324357409; Fri, 3 Sep 2021 02:07:18 -0700 (PDT) Received: from localhost ([::1]:39660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5AL-0001Hk-78 for importer@patchew.org; Fri, 03 Sep 2021 05:07:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM56y-0005zK-SH for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:48 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:35739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM56x-0005WL-6d for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:48 -0400 Received: by mail-wr1-x42f.google.com with SMTP id i6so7195278wrv.2 for ; Fri, 03 Sep 2021 02:03:46 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x9sm3568150wmi.30.2021.09.03.02.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:40 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 267701FF9A; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eApeYrApbfWiu3vQv6rtu4BHNUrQ/4BvHORTpCt0Hq0=; b=LbJzmcEiFGq2TPxa/P9bS2I9uK3yRgU8Ui7tSRjaS4KEURf8jIOwPxCKnRsk/wDP23 XLd40YWD0nDDNDW7He7RCEnAc0o3x0xhUrkGtnAuz2yRx5g83nNcjCjDE/yTxFBK4/BV vqFGOE9JqhkVSn+10L5S67oXL/rKy1SVV07dHYjpAHRVVgT1GTwk/lXvNQmKJPJX4SBb t7fyUC/DNb/8OdDATuP6w3wFKKI6HwSpPoJGrD0lRn3ApEWZwtSeuZ82RadiyUqb/ZOr nhSa+K4OLcxhpwOI8IbKcbcsCUSIY0jzj7ZaIce6zINg/j+02qHEMQcs7DIm6szAH7Se m4jQ== 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:mime-version:content-transfer-encoding; bh=eApeYrApbfWiu3vQv6rtu4BHNUrQ/4BvHORTpCt0Hq0=; b=aziCp7bfmnrpd8QtQTwTyygDTKTil8EChHJena59XxXDaezCkAdQG1PAnF36YKb8wN R76c8RxnXhgjRnn9bLv7oweKPjCZ5rk6TEq/aE1SW/QdOvepxn0nqfkXtTTbGze3hPjC yNwBTRtTd7I74e3Tr6bFoG7W/DFlc19niCtdsRrYKxZ+9JbRe/ieNjqdH4xjKpsy21yS MnVdiXFzTtQ6tgwk+nG1aJCR9xjtHr+Lh2M3ybfKp6M0ieEuwhTBvleT/W6tYRLp8hKx 5MB0yn9vT8bllinmRQfepfDVELpT7+vYbHmwGcwbjeoJd1nhhUoRwFyTG/5SfIa38U6c cF2w== X-Gm-Message-State: AOAM533rSoT/+chbK5tibmEzfskHTx9iODuMUKkRYSEGOAnW2unGxwe5 LnshcDNY9auZk0iIe23TZfSW7w== X-Google-Smtp-Source: ABdhPJx7fxcJv9FelxnQp/a1BBLMr88adt99NFNDRmtRb3wDegzWTh0xXm3KFVpRYFCl9BGAp6vjEg== X-Received: by 2002:a05:6000:1c4:: with SMTP id t4mr2762347wrx.414.1630659825126; Fri, 03 Sep 2021 02:03:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/22] gitlab-ci: Remove superfluous "dnf install" statement Date: Fri, 3 Sep 2021 10:03:20 +0100 Message-Id: <20210903090339.1074887-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660039607100001 From: Thomas Huth The container already features meson and ninja, so there is no need to try to install it with dnf again. Signed-off-by: Thomas Huth Reviewed-by: Willian Rampazzo Message-Id: <20210730143809.717079-3-thuth@redhat.com> Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210806141015.2487502-4-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index f390f98044..38f08452f1 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -590,8 +590,6 @@ build-libvhost-user: image: $CI_REGISTRY_IMAGE/qemu/fedora:latest needs: job: amd64-fedora-container - before_script: - - dnf install -y meson ninja-build script: - mkdir subprojects/libvhost-user/build - cd subprojects/libvhost-user/build --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163066023890132.2498432166077; Fri, 3 Sep 2021 02:10:38 -0700 (PDT) Received: from localhost ([::1]:48200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5DY-0006wb-J3 for importer@patchew.org; Fri, 03 Sep 2021 05:10:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM572-00064M-GA for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:52 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:36732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM56z-0005ZD-Hr for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:51 -0400 Received: by mail-wr1-x42b.google.com with SMTP id q14so7179459wrp.3 for ; Fri, 03 Sep 2021 02:03:49 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c14sm4189745wrr.58.2021.09.03.02.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:42 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 340D01FF9B; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KKnSH+lDAvOjNQH8hqEes6n/qTsZNa6jN/zhCFc0/UU=; b=vXdQPPqDZHGgSouXUOEDrFpLo5Q8vV7kwTuyDcHJC6uIg5Gb353k4LrimZlUFoYvN5 GJ/fl5h8zrdM9k5ozT/kXF17nQHbg4Qmj/r9nq9jI+uvnX5Z8UDNQjp1nPhjJBmdGbyg Mcv7milvUFxclkPsrK1Eavu2DH9y2JWMaLw++T5fZJ/mVrw95aKc7J7SrVJWJFkjYuhq IYaseP3aODtsKBIW7A2p6/0rgpUwySq5tHh/rYSmK9+Jg+XJbjMAOOulqfq700vp/X9E 9z1mwjr7qIt6MgoWV1gsFgxyoD3g2CbON26YpQKkVihZIsw9qtt4JefoOERMC/1p6XQd y00w== 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:mime-version:content-transfer-encoding; bh=KKnSH+lDAvOjNQH8hqEes6n/qTsZNa6jN/zhCFc0/UU=; b=SOLJiIc5Fi3Unqy+3DwC+sfV54HSX7kqz+KXgV247S45n+TY9P06XcMVD2OmGj6R8s EcfZ0XtdOKY838iyDhGc7titWHVdmh4BEgOIrRtrIlepW1GJv8QCoLIyi4M35/LdoVs4 HZzL84VL5rjCaiGuJFsObuKpMnbgVQgWKBu1x/mH789c6auz4S+fN7J1+lDCL9tBVJK5 /6L3Up72AhRD9B6oA2NLl4JtNYKTX7vCUzYezezNm/a7dxGb5sFXJPReph+oQHOejthJ FA9NUjcu5BEkV7XN2WnsnVNVI8NUcdJQNV12Cla9qpLm0u/dPyz74IEp6jHzHH2balCW WrjA== X-Gm-Message-State: AOAM532wYWh5alVdsgIgkiGZFmJ+Y4baJWB6tsUs1McyNZ+4ok2guWOD 7WCRR0ggW0jeXNq9oOJ3qEaL9Q== X-Google-Smtp-Source: ABdhPJw2Hi6C/pmczsISjmfc5XS2YQoEb2WgSapdZW8W+DFlLgKiLQ8nF4LKTXq4utd9tMZwbvJGrA== X-Received: by 2002:adf:9f0c:: with SMTP id l12mr2940227wrf.146.1630659828175; Fri, 03 Sep 2021 02:03:48 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/22] gitlab-ci: Fix ..._RUNNER_AVAILABLE variables and document them Date: Fri, 3 Sep 2021 10:03:21 +0100 Message-Id: <20210903090339.1074887-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660241017100001 From: Thomas Huth The patch that recently introduced the S390X_RUNNER_AVAILABLE variable in custom-runners.yml missed that the bottom half of the file is rather about aarch64 than s390x. Thus rename the S390X_RUNNER_AVAILABLE to AARCH64_RUNNER_AVAILABLE in those jobs. Finally mention both variables in our CI documentation, too. Fixes: c5dd0f0342 ("Improve rules for the staging branch") Signed-off-by: Thomas Huth Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210730143809.717079-4-thuth@redhat.com> [AJB: moved due to docu changes] Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210806141015.2487502-5-alex.bennee@linaro.org> diff --git a/docs/devel/ci-jobs.rst b/docs/devel/ci-jobs.rst index 9cd9819786..277975e4ad 100644 --- a/docs/devel/ci-jobs.rst +++ b/docs/devel/ci-jobs.rst @@ -38,3 +38,14 @@ these artifacts are not already cached, downloading them= make the jobs reach the timeout limit). Set this variable to have the tests using the Avocado framework run automatically. =20 +AARCH64_RUNNER_AVAILABLE +~~~~~~~~~~~~~~~~~~~~~~~~ +If you've got access to an aarch64 host that can be used as a gitlab-CI +runner, you can set this variable to enable the tests that require this +kind of host. The runner should be tagged with "aarch64". + +S390X_RUNNER_AVAILABLE +~~~~~~~~~~~~~~~~~~~~~~ +If you've got access to an IBM Z host that can be used as a gitlab-CI +runner, you can set this variable to enable the tests that require this +kind of host. The runner should be tagged with "s390x". diff --git a/.gitlab-ci.d/custom-runners.yml b/.gitlab-ci.d/custom-runners.= yml index 564b94565d..0d3e4a7b4b 100644 --- a/.gitlab-ci.d/custom-runners.yml +++ b/.gitlab-ci.d/custom-runners.yml @@ -137,7 +137,7 @@ ubuntu-20.04-aarch64-all-linux-static: - aarch64 rules: - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project" && $CI_COMMIT_BRANCH = =3D~ /^staging/' - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" script: # --disable-libssh is needed because of https://bugs.launchpad.net/qemu/+= bug/1838763 # --disable-glusterfs is needed because there's no static version of thos= e libs in distro supplied packages @@ -157,7 +157,7 @@ ubuntu-20.04-aarch64-all: - aarch64 rules: - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project" && $CI_COMMIT_BRANCH = =3D~ /^staging/' - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" script: - mkdir build - cd build @@ -174,7 +174,7 @@ ubuntu-20.04-aarch64-alldbg: - aarch64 rules: - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project" && $CI_COMMIT_BRANCH = =3D~ /^staging/' - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" script: - mkdir build - cd build @@ -193,7 +193,7 @@ ubuntu-20.04-aarch64-clang: rules: - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project" && $CI_COMMIT_BRANCH = =3D~ /^staging/' when: manual - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" when: manual script: - mkdir build @@ -211,7 +211,7 @@ ubuntu-20.04-aarch64-tci: - aarch64 rules: - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project" && $CI_COMMIT_BRANCH = =3D~ /^staging/' - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" script: - mkdir build - cd build @@ -228,7 +228,7 @@ ubuntu-20.04-aarch64-notcg: rules: - if: '$CI_PROJECT_NAMESPACE =3D=3D "qemu-project" && $CI_COMMIT_BRANCH = =3D~ /^staging/' when: manual - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" when: manual script: - mkdir build --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660505487467.4372763108704; Fri, 3 Sep 2021 02:15:05 -0700 (PDT) Received: from localhost ([::1]:35900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Hs-0001AV-A1 for importer@patchew.org; Fri, 03 Sep 2021 05:15:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM579-00069P-Mk for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:59 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:40731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM572-0005bs-Io for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:58 -0400 Received: by mail-wm1-x32b.google.com with SMTP id x2-20020a1c7c02000000b002e6f1f69a1eso3269106wmc.5 for ; Fri, 03 Sep 2021 02:03:52 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e26sm4282287wrc.6.2021.09.03.02.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4CB3D1FF9C; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RyVojjuqH6WORlMZZGsMkQpTfSUfAqc9uy3n8opotoQ=; b=ZVZ9CrTkeBdB8XcTJseYInwzK9SISYruOVu4dl6i2eqFtFduOWeeXvJfLTpzSEHM3l VAaP1ioJDWyprKgQI43U1KyZv/nw6RnQUF8Q5mrGs6CG6HMPqkQC11NqQb/JxbHtgQXY OuazxFgSs1lisZpvSyTB1VijlU7l0fzNeyL31GHjUFKyn0rOu9CgqjBpnwyVVUGGCX8s NUz3mNd0GCdwbp1+yA9p6sOqxO3SIvWuU75bKRV0pPUqojbASaxThBf+pmkBkCyA/Sc3 VlR7XE5xbgof60WRfcPqX9Ck3tL45Ot8KMj0Re3G71qls9Bc7fIwVqbHTbHSWFpZoDjL GCkA== 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:mime-version:content-transfer-encoding; bh=RyVojjuqH6WORlMZZGsMkQpTfSUfAqc9uy3n8opotoQ=; b=cLDts91dhgmxRNyQDnwCwsgHSRYjE+LKJXlpCzbl+vYyNqKEAjS1Gz8hCHNQA6K9ib 1fWR6DlQWvh7524k4EbO1Fw1vGLUbaEALew3Jix23RPYjot12yxgVmtPF134i5j5uIrL YYS2uGBFsImIrCKNRiOG3m4UVQ0RJQAuhLR2uHwuqcoRJRYZVYo81ROHfJeef78SX5uu giK0aTOFnRATPLo4E6vxKbu8cg3ji1Z4EIBelaLOgFqouWpVOouGyKD+A2VMrP8rXDu7 7cqgMOPUqeyFZc94YkJbvmwucKUcDPEExXoZGHqE81HF4qVQjxER3yoJfxSL1Fx2dpeM a6Uw== X-Gm-Message-State: AOAM533CrilInlPLorDS1/b3qc2wFbzmQxpD57/Rm2bg681yp7Sihviu 50rfGiPOGVHj1Yohx236EUdyALotBDkAhA== X-Google-Smtp-Source: ABdhPJzMR8GZVmJRXN82ZjlrY2F2sj8bEO/iGz+0YHwDiPghXMQ8yOi0JrzHJpU0icjoueo31QcrUQ== X-Received: by 2002:a7b:c014:: with SMTP id c20mr2247867wmb.81.1630659831192; Fri, 03 Sep 2021 02:03:51 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/22] plugins: do not limit exported symbols if modules are active Date: Fri, 3 Sep 2021 10:03:22 +0100 Message-Id: <20210903090339.1074887-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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=unavailable 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: qemu-devel@nongnu.org, qemu-stable@nongnu.org, Paolo Bonzini , Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660507017100003 From: Paolo Bonzini On Mac --enable-modules and --enable-plugins are currently incompatible, be= cause the Apple -Wl,-exported_symbols_list command line options prevents the export o= f any symbols needed by the modules. On x86 -Wl,--dynamic-list does not have thi= s effect, but only because the -Wl,--export-dynamic option provided by gmodule-2.0.pc= overrides it. On Apple there is no -Wl,--export-dynamic, because it is the default, = and thus no override. Either way, when modules are active there is no reason to include the plugi= n_ldflags. While at it, avoid the useless -Wl,--export-dynamic when --enable-plugins is specified but --enable-modules is not; this way, the GNU and Apple configur= ations are more similar. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/516 Signed-off-by: Paolo Bonzini [AJB: fix noexport to no-export] Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210811100550.54714-1-pbonzini@redhat.com> Cc: qemu-stable@nongnu.org diff --git a/configure b/configure index 9a79a004d7..7659870810 100755 --- a/configure +++ b/configure @@ -3187,9 +3187,8 @@ glib_req_ver=3D2.56 glib_modules=3Dgthread-2.0 if test "$modules" =3D yes; then glib_modules=3D"$glib_modules gmodule-export-2.0" -fi -if test "$plugins" =3D "yes"; then - glib_modules=3D"$glib_modules gmodule-2.0" +elif test "$plugins" =3D "yes"; then + glib_modules=3D"$glib_modules gmodule-no-export-2.0" fi =20 for i in $glib_modules; do diff --git a/plugins/meson.build b/plugins/meson.build index e77723010e..bfd5c9822a 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,9 +1,11 @@ -if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host - plugin_ldflags =3D ['-Wl,--dynamic-list=3D' + (meson.build_root() / 'qem= u-plugins-ld.symbols')] -elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host - plugin_ldflags =3D ['-Wl,-exported_symbols_list,' + (meson.build_root() = / 'qemu-plugins-ld64.symbols')] -else - plugin_ldflags =3D [] +plugin_ldflags =3D [] +# Modules need more symbols than just those in plugins/qemu-plugins.symbols +if not enable_modules + if 'CONFIG_HAS_LD_DYNAMIC_LIST' in config_host + plugin_ldflags =3D ['-Wl,--dynamic-list=3D' + (meson.build_root() / 'q= emu-plugins-ld.symbols')] + elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host + plugin_ldflags =3D ['-Wl,-exported_symbols_list,' + (meson.build_root(= ) / 'qemu-plugins-ld64.symbols')] + endif endif =20 specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files( --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660486913776.2719253750478; Fri, 3 Sep 2021 02:14:46 -0700 (PDT) Received: from localhost ([::1]:34384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5HZ-00008X-QA for importer@patchew.org; Fri, 03 Sep 2021 05:14:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57B-0006El-Ib for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:01 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:53907) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM579-0005fY-87 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:01 -0400 Received: by mail-wm1-x32a.google.com with SMTP id i3so3019242wmq.3 for ; Fri, 03 Sep 2021 02:03:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k1sm4278049wrz.61.2021.09.03.02.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 59EB11FF9D; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nmOXcmKk0XvDznE6oW/gFfY7dG0lGaTYlfhMcC+RlKg=; b=WiHyM356COoNapWdmEAGluCE501Uc58ZtIZkwamXK2JabF53N+Q/3U1AFRm3ipz/eC ebiGvuQLampzqbxyZ25hXfAFn8PzVl/TYnVb9GqQEgdwog2cCPMwpYYSvH9wTLlW/D93 OrQsz0b5rJAoRWCyDfddRDJAlzNU/dBv/X1H5DCDVNv6SdIr+zhviWU/FmrCD7TrK8b9 UvCQwNbSSwN6FoU73UhcBlsUKeitgdWYMquTFUENqchM+KZM3h73dRPKhornZGw15M7N bycQujrfRKzaau0k3kHZeTe6oEbWRCU0Z3VP7RzPAqVe+GpKX4E4A4W4IhYZz4GV8wE9 Rr7A== 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:mime-version:content-transfer-encoding; bh=nmOXcmKk0XvDznE6oW/gFfY7dG0lGaTYlfhMcC+RlKg=; b=cbn8QPiijlQeS9EgGLVN0JO5XCOX8ocowpMdBydKSd2WM9o7GMH+zvCoOuNw+eZKwn JyI97W5hteTsOrSqcpoCk1gFXpcoHInnKP0+nnfr7/xHfYTyVNJ/Pq6QuHC+Ct/qQ8/O PPqcPAPzxIfGWVpO54OPNIh9SwHY8MKnqrj4fcbbSdtr3sQcj0qDK2mwInGirrb31kxV 5msVMTZK4YnJqsfyAqEWHhLaCck6OzYzXC1DwT7zLnYqMVqdWyk8taqcWkRtNzcAZKBb zLkwGXjsxMrShXspv5XFSMq4cfRIG+ubJD/zcvjor+bEetrYiU/PDY1huQWAFwVzQ9we aZvQ== X-Gm-Message-State: AOAM531fpz7TKCoqSMRtsjZ4kGCLpOV8vF2VCpxCmWS9oiq2x2a93tV7 wz00cYeV2MGr/XnlNxafixHQKA== X-Google-Smtp-Source: ABdhPJxC7RRa2QONZLcuAloLgAiDozNwBw4VTuQ7K+jLd7VxbkObNjBahpx4XarLpT2kL9ZGKkNmAw== X-Received: by 2002:a05:600c:2e46:: with SMTP id q6mr7193693wmf.93.1630659837021; Fri, 03 Sep 2021 02:03:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/22] plugins/cache: supported multicore cache modelling Date: Fri, 3 Sep 2021 10:03:23 +0100 Message-Id: <20210903090339.1074887-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660489095100001 From: Mahmoud Mandour Multicore L1 cache modelling is introduced and is supported for both full system emulation and linux-user. For full-system emulation, L1 icache and dcache are maintained for each available core, since this information is exposed to the plugin through `qemu_plugin_n_vcpus()`. For linux-user, a static number of cores is assumed (default 1 core, and can be provided as a plugin argument `cores=3DN`). Every memory access goes through one of these caches, this approach is taken as it's somewhat akin to what happens on real setup, where a program that dispatches more threads than the available cores, they'll thrash each other Signed-off-by: Mahmoud Mandour Message-Id: <20210803151301.123581-2-ma.mandourr@gmail.com> Signed-off-by: Alex Benn=C3=A9e diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 066ea6d8ec..a1e03ca882 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -17,18 +17,12 @@ static enum qemu_plugin_mem_rw rw =3D QEMU_PLUGIN_MEM_R= W; =20 static GHashTable *miss_ht; =20 -static GMutex mtx; +static GMutex hashtable_lock; static GRand *rng; =20 static int limit; static bool sys; =20 -static uint64_t dmem_accesses; -static uint64_t dmisses; - -static uint64_t imem_accesses; -static uint64_t imisses; - enum EvictionPolicy { LRU, FIFO, @@ -80,6 +74,8 @@ typedef struct { int blksize_shift; uint64_t set_mask; uint64_t tag_mask; + uint64_t accesses; + uint64_t misses; } Cache; =20 typedef struct { @@ -96,7 +92,16 @@ void (*update_miss)(Cache *cache, int set, int blk); void (*metadata_init)(Cache *cache); void (*metadata_destroy)(Cache *cache); =20 -Cache *dcache, *icache; +static int cores; +static Cache **dcaches, **icaches; + +static GMutex *dcache_locks; +static GMutex *icache_locks; + +static uint64_t all_dmem_accesses; +static uint64_t all_imem_accesses; +static uint64_t all_imisses; +static uint64_t all_dmisses; =20 static int pow_of_two(int num) { @@ -233,20 +238,24 @@ static bool bad_cache_params(int blksize, int assoc, = int cachesize) =20 static Cache *cache_init(int blksize, int assoc, int cachesize) { - if (bad_cache_params(blksize, assoc, cachesize)) { - return NULL; - } - Cache *cache; int i; uint64_t blk_mask; =20 + /* + * This function shall not be called directly, and hence expects suita= ble + * parameters. + */ + g_assert(!bad_cache_params(blksize, assoc, cachesize)); + cache =3D g_new(Cache, 1); cache->assoc =3D assoc; cache->cachesize =3D cachesize; cache->num_sets =3D cachesize / (blksize * assoc); cache->sets =3D g_new(CacheSet, cache->num_sets); cache->blksize_shift =3D pow_of_two(blksize); + cache->accesses =3D 0; + cache->misses =3D 0; =20 for (i =3D 0; i < cache->num_sets; i++) { cache->sets[i].blocks =3D g_new0(CacheBlock, assoc); @@ -263,6 +272,24 @@ static Cache *cache_init(int blksize, int assoc, int c= achesize) return cache; } =20 +static Cache **caches_init(int blksize, int assoc, int cachesize) +{ + Cache **caches; + int i; + + if (bad_cache_params(blksize, assoc, cachesize)) { + return NULL; + } + + caches =3D g_new(Cache *, cores); + + for (i =3D 0; i < cores; i++) { + caches[i] =3D cache_init(blksize, assoc, cachesize); + } + + return caches; +} + static int get_invalid_block(Cache *cache, uint64_t set) { int i; @@ -353,6 +380,7 @@ static void vcpu_mem_access(unsigned int vcpu_index, qe= mu_plugin_meminfo_t info, { uint64_t effective_addr; struct qemu_plugin_hwaddr *hwaddr; + int cache_idx; InsnData *insn; =20 hwaddr =3D qemu_plugin_get_hwaddr(info, vaddr); @@ -361,32 +389,35 @@ static void vcpu_mem_access(unsigned int vcpu_index, = qemu_plugin_meminfo_t info, } =20 effective_addr =3D hwaddr ? qemu_plugin_hwaddr_phys_addr(hwaddr) : vad= dr; + cache_idx =3D vcpu_index % cores; =20 - g_mutex_lock(&mtx); - if (!access_cache(dcache, effective_addr)) { + g_mutex_lock(&dcache_locks[cache_idx]); + if (!access_cache(dcaches[cache_idx], effective_addr)) { insn =3D (InsnData *) userdata; - insn->dmisses++; - dmisses++; + __atomic_fetch_add(&insn->dmisses, 1, __ATOMIC_SEQ_CST); + dcaches[cache_idx]->misses++; } - dmem_accesses++; - g_mutex_unlock(&mtx); + dcaches[cache_idx]->accesses++; + g_mutex_unlock(&dcache_locks[cache_idx]); } =20 static void vcpu_insn_exec(unsigned int vcpu_index, void *userdata) { uint64_t insn_addr; InsnData *insn; + int cache_idx; =20 - g_mutex_lock(&mtx); insn_addr =3D ((InsnData *) userdata)->addr; =20 - if (!access_cache(icache, insn_addr)) { + cache_idx =3D vcpu_index % cores; + g_mutex_lock(&icache_locks[cache_idx]); + if (!access_cache(icaches[cache_idx], insn_addr)) { insn =3D (InsnData *) userdata; - insn->imisses++; - imisses++; + __atomic_fetch_add(&insn->imisses, 1, __ATOMIC_SEQ_CST); + icaches[cache_idx]->misses++; } - imem_accesses++; - g_mutex_unlock(&mtx); + icaches[cache_idx]->accesses++; + g_mutex_unlock(&icache_locks[cache_idx]); } =20 static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) @@ -411,7 +442,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) * new entries for those instructions. Instead, we fetch the same * entry from the hash table and register it for the callback agai= n. */ - g_mutex_lock(&mtx); + g_mutex_lock(&hashtable_lock); data =3D g_hash_table_lookup(miss_ht, GUINT_TO_POINTER(effective_a= ddr)); if (data =3D=3D NULL) { data =3D g_new0(InsnData, 1); @@ -421,7 +452,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) g_hash_table_insert(miss_ht, GUINT_TO_POINTER(effective_addr), (gpointer) data); } - g_mutex_unlock(&mtx); + g_mutex_unlock(&hashtable_lock); =20 qemu_plugin_register_vcpu_mem_cb(insn, vcpu_mem_access, QEMU_PLUGIN_CB_NO_REGS, @@ -453,6 +484,15 @@ static void cache_free(Cache *cache) g_free(cache); } =20 +static void caches_free(Cache **caches) +{ + int i; + + for (i =3D 0; i < cores; i++) { + cache_free(caches[i]); + } +} + static int dcmp(gconstpointer a, gconstpointer b) { InsnData *insn_a =3D (InsnData *) a; @@ -461,6 +501,37 @@ static int dcmp(gconstpointer a, gconstpointer b) return insn_a->dmisses < insn_b->dmisses ? 1 : -1; } =20 +static void append_stats_line(GString *line, uint64_t daccess, uint64_t dm= isses, + uint64_t iaccess, uint64_t imisses) +{ + double dmiss_rate, imiss_rate; + + dmiss_rate =3D ((double) dmisses) / (daccess) * 100.0; + imiss_rate =3D ((double) imisses) / (iaccess) * 100.0; + + g_string_append_printf(line, "%-14lu %-12lu %9.4lf%% %-14lu %-12lu" + " %9.4lf%%\n", + daccess, + dmisses, + daccess ? dmiss_rate : 0.0, + iaccess, + imisses, + iaccess ? imiss_rate : 0.0); +} + +static void sum_stats(void) +{ + int i; + + g_assert(cores > 1); + for (i =3D 0; i < cores; i++) { + all_imisses +=3D icaches[i]->misses; + all_dmisses +=3D dcaches[i]->misses; + all_imem_accesses +=3D icaches[i]->accesses; + all_dmem_accesses +=3D dcaches[i]->accesses; + } +} + static int icmp(gconstpointer a, gconstpointer b) { InsnData *insn_a =3D (InsnData *) a; @@ -471,19 +542,29 @@ static int icmp(gconstpointer a, gconstpointer b) =20 static void log_stats(void) { - g_autoptr(GString) rep =3D g_string_new(""); - g_string_append_printf(rep, - "Data accesses: %lu, Misses: %lu\nMiss rate: %lf%%\n\n", - dmem_accesses, - dmisses, - ((double) dmisses / (double) dmem_accesses) * 100.0); - - g_string_append_printf(rep, - "Instruction accesses: %lu, Misses: %lu\nMiss rate: %lf%%\n\n", - imem_accesses, - imisses, - ((double) imisses / (double) imem_accesses) * 100.0); + int i; + Cache *icache, *dcache; + + g_autoptr(GString) rep =3D g_string_new("core #, data accesses, data m= isses," + " dmiss rate, insn accesses," + " insn misses, imiss rate\n"); + + for (i =3D 0; i < cores; i++) { + g_string_append_printf(rep, "%-8d", i); + dcache =3D dcaches[i]; + icache =3D icaches[i]; + append_stats_line(rep, dcache->accesses, dcache->misses, + icache->accesses, icache->misses); + } + + if (cores > 1) { + sum_stats(); + g_string_append_printf(rep, "%-8s", "sum"); + append_stats_line(rep, all_dmem_accesses, all_dmisses, + all_imem_accesses, all_imisses); + } =20 + g_string_append(rep, "\n"); qemu_plugin_outs(rep->str); } =20 @@ -530,8 +611,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) log_stats(); log_top_insns(); =20 - cache_free(dcache); - cache_free(icache); + caches_free(dcaches); + caches_free(icaches); =20 g_hash_table_destroy(miss_ht); } @@ -579,6 +660,8 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, =20 policy =3D LRU; =20 + cores =3D sys ? qemu_plugin_n_vcpus() : 1; + for (i =3D 0; i < argc; i++) { char *opt =3D argv[i]; if (g_str_has_prefix(opt, "iblksize=3D")) { @@ -595,6 +678,8 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, dcachesize =3D g_ascii_strtoll(opt + 11, NULL, 10); } else if (g_str_has_prefix(opt, "limit=3D")) { limit =3D g_ascii_strtoll(opt + 6, NULL, 10); + } else if (g_str_has_prefix(opt, "cores=3D")) { + cores =3D g_ascii_strtoll(opt + 6, NULL, 10); } else if (g_str_has_prefix(opt, "evict=3D")) { gchar *p =3D opt + 6; if (g_strcmp0(p, "rand") =3D=3D 0) { @@ -615,22 +700,25 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qe= mu_info_t *info, =20 policy_init(); =20 - dcache =3D cache_init(dblksize, dassoc, dcachesize); - if (!dcache) { + dcaches =3D caches_init(dblksize, dassoc, dcachesize); + if (!dcaches) { const char *err =3D cache_config_error(dblksize, dassoc, dcachesiz= e); fprintf(stderr, "dcache cannot be constructed from given parameter= s\n"); fprintf(stderr, "%s\n", err); return -1; } =20 - icache =3D cache_init(iblksize, iassoc, icachesize); - if (!icache) { + icaches =3D caches_init(iblksize, iassoc, icachesize); + if (!icaches) { const char *err =3D cache_config_error(iblksize, iassoc, icachesiz= e); fprintf(stderr, "icache cannot be constructed from given parameter= s\n"); fprintf(stderr, "%s\n", err); return -1; } =20 + dcache_locks =3D g_new0(GMutex, cores); + icache_locks =3D g_new0(GMutex, cores); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660366989380.2749020027435; Fri, 3 Sep 2021 02:12:46 -0700 (PDT) Received: from localhost ([::1]:55762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Fc-0003r6-9i for importer@patchew.org; Fri, 03 Sep 2021 05:12:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM579-00069R-Lv for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:59 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:40774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM573-0005cG-6h for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:57 -0400 Received: by mail-wr1-x430.google.com with SMTP id t15so7186480wrg.7 for ; Fri, 03 Sep 2021 02:03:52 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r20sm4335349wrr.47.2021.09.03.02.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6F7941FF9E; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CcEiZFSnEtjqSiIOeERnRYXveIeTcuQ3wV2faAUN+dY=; b=EqCBDTQWjcK00BGL83rihXO0Nni0WZELsJwDPtAjeKZhOTBRZP+kKSkcR2oT7RhMx6 0zHVgXi60bjdX8ZerShh6uYb9S7bj42MfLUN/eBU0mI+yvjOcfb0LyV9fSGTF4yF+7+d 3LP+5lnC5JVesrUz3W9lwYPf/m7/bIrj165Up4+O2ZsJ/AXO7pDaB9lAVjXOZdJDMJSD 9/ntE/ov4fkNZIbIhD0EqAb3ifbui24qXwOGg7z0xy2/qTMb3Zv5Z1MzgE+m7xzfIYvn Bm1vZrMPMu3HGByrOTix8vdFjhljJmF4R2mxk/g/un1c4HYXglyLKRnK/m/5Ebfiz5ng hFSA== 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:mime-version:content-transfer-encoding; bh=CcEiZFSnEtjqSiIOeERnRYXveIeTcuQ3wV2faAUN+dY=; b=DAHlA7CJB75v5uZW+RKkFsuUnEFqaH9lJ3YxWdYdqn9LhDW02r4hI+9OtkXw1pjd89 RT6KDBwMBqzjhXs18VQnXaHp135fJY/m8pf41o9Azg2bRu6Vzhi+4ZUDg0kiHS8IcxKT KPzQHCeNaIHJ7E40GhmFeltJ3kdwPMN/ZOf8JqWc7UDBWsRqRUTwh9sF1nvDWr7tb+x5 5KE55uRlMCKYLaAN6G3s9z+m1iN04q/lRjrP2uCVDWQ9zH1q5PspiUdtjEdmHJhdVdZ2 hdZRPnYe8eNvnGGLAWcQvz6CVzXl225KJmpHp095tMlDPaa7Nf9CHoJsjvYjp4/LUPmG VqqQ== X-Gm-Message-State: AOAM5312ed1+pxUXyHXc+x26n6b/+35BuAaZOcjLXFPcolAPtICWBqct lf6m3nIpvVfBibMFqJF7rKwrJg== X-Google-Smtp-Source: ABdhPJxmvwCeUcXa7QwTEJoTQbf40sh0vBeDXcq81sWHlSNh89ht+8MD04SspEiWx7KHZXrkccGMBQ== X-Received: by 2002:adf:d1b3:: with SMTP id w19mr2810735wrc.152.1630659831791; Fri, 03 Sep 2021 02:03:51 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/22] plugins: sort exported symbol list Date: Fri, 3 Sep 2021 10:03:24 +0100 Message-Id: <20210903090339.1074887-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 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: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660367589100001 This will make it easier to add new exported functions. Signed-off-by: Alex Benn=C3=A9e diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index 40b4ff3821..dee7610387 100644 --- a/plugins/qemu-plugins.symbols +++ b/plugins/qemu-plugins.symbols @@ -1,37 +1,37 @@ { - qemu_plugin_uninstall; - qemu_plugin_reset; - qemu_plugin_register_vcpu_init_cb; + qemu_plugin_get_hwaddr; + qemu_plugin_hwaddr_is_io; + qemu_plugin_insn_data; + qemu_plugin_insn_disas; + qemu_plugin_insn_haddr; + qemu_plugin_insn_size; + qemu_plugin_insn_vaddr; + qemu_plugin_mem_is_big_endian; + qemu_plugin_mem_is_sign_extended; + qemu_plugin_mem_is_store; + qemu_plugin_mem_size_shift; + qemu_plugin_n_max_vcpus; + qemu_plugin_n_vcpus; + qemu_plugin_outs; + qemu_plugin_register_atexit_cb; + qemu_plugin_register_flush_cb; qemu_plugin_register_vcpu_exit_cb; qemu_plugin_register_vcpu_idle_cb; - qemu_plugin_register_vcpu_resume_cb; + qemu_plugin_register_vcpu_init_cb; qemu_plugin_register_vcpu_insn_exec_cb; qemu_plugin_register_vcpu_insn_exec_inline; qemu_plugin_register_vcpu_mem_cb; qemu_plugin_register_vcpu_mem_inline; - qemu_plugin_register_vcpu_tb_trans_cb; - qemu_plugin_register_vcpu_tb_exec_cb; - qemu_plugin_register_vcpu_tb_exec_inline; - qemu_plugin_register_flush_cb; + qemu_plugin_register_vcpu_resume_cb; qemu_plugin_register_vcpu_syscall_cb; qemu_plugin_register_vcpu_syscall_ret_cb; - qemu_plugin_register_atexit_cb; - qemu_plugin_tb_n_insns; + qemu_plugin_register_vcpu_tb_exec_cb; + qemu_plugin_register_vcpu_tb_exec_inline; + qemu_plugin_register_vcpu_tb_trans_cb; + qemu_plugin_reset; qemu_plugin_tb_get_insn; + qemu_plugin_tb_n_insns; qemu_plugin_tb_vaddr; - qemu_plugin_insn_data; - qemu_plugin_insn_size; - qemu_plugin_insn_vaddr; - qemu_plugin_insn_haddr; - qemu_plugin_insn_disas; - qemu_plugin_mem_size_shift; - qemu_plugin_mem_is_sign_extended; - qemu_plugin_mem_is_big_endian; - qemu_plugin_mem_is_store; - qemu_plugin_get_hwaddr; - qemu_plugin_hwaddr_is_io; + qemu_plugin_uninstall; qemu_plugin_vcpu_for_each; - qemu_plugin_n_vcpus; - qemu_plugin_n_max_vcpus; - qemu_plugin_outs; }; --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660340944224.39354961215736; Fri, 3 Sep 2021 02:12:20 -0700 (PDT) Received: from localhost ([::1]:54482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5FD-0002yp-CQ for importer@patchew.org; Fri, 03 Sep 2021 05:12:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57A-0006B0-5D for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:00 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:56052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM577-0005dl-CQ for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:59 -0400 Received: by mail-wm1-x335.google.com with SMTP id g135so3013600wme.5 for ; Fri, 03 Sep 2021 02:03:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j20sm4084619wrb.5.2021.09.03.02.03.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7A7CE1FF9F; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oeQeR+eEGJXX3Wt57/hk38LlH5xv/1yOOnlDT6GieeU=; b=ZmfGX2u3UOC7TRoGp3IbzEOLhoSKfyMlLSzH9mr7LpCbaS2f50P19uac7tj9cK2sIw P+q3LZxBcR5NhngK0/AmGM6HndVK7H8fucqfCQhA608foew3tCtlMFeHieS4BVKsF8in 7WgAIYeQbp5m2Uc4ScBRcYsGEuJCGmrs5gmHesPEIS6VW3D/feXyLF4N2y59JthOpU2T Iauk9DC+CiyjR+xjZln8cfVYuogt3BuDbqIT5uXZQMdWPwLFri+AEwLjKJbC9nFiXZBL bLX9/BHXYrsyXSuoM4e85fUWp5+/uA4iKG8mJ7BBf8wKvPL56fy7jtGu1rIEhiYzasab Zubg== 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:mime-version:content-transfer-encoding; bh=oeQeR+eEGJXX3Wt57/hk38LlH5xv/1yOOnlDT6GieeU=; b=at25htJV7xd2vBvaqY799A2gq0Xcl/jKKD9mXFDoB4e0TVjvcoTgb1ndXKDcK+psgr Eb5CgpW5rz7QYmGwWgAsidG/Ba18gW2u0JECS+5FPwWOXouIRTwct8aw5ByriWYYlXty RpjjYr71NEEuxZjPqnEq9zTUCUbHuMghxBIlROICq16qXie0XR6tTVZuiVVLysk+IhO5 j6gy1hNwtXzgxt37tSB3kAEJGtU2uem38fUWe1vmjilOvW1Njcf0IFebVdACOdT5xp2r Ur0j24bGpBNVcqPzEHWZiYnkawLW3fVYhlDq4c3qt/1i61VVdx3545oeYiGkhgLX3p0M VklQ== X-Gm-Message-State: AOAM5302EIbOCNn24VN9bjxhi9LT/OsneJQkZNDELv0DqHQWHI/iNRPC jcGQ7eMc9MGUuLwRkAmfNUPoqA== X-Google-Smtp-Source: ABdhPJy+AOnUkVFeB45QhAg5bgEN13wCWIinNcHIPa34jkhdBiUXa254nRv3I4qUwHcrWLHhbk/Vpw== X-Received: by 2002:a05:600c:2250:: with SMTP id a16mr2254455wmm.72.1630659833286; Fri, 03 Sep 2021 02:03:53 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/22] docs/devel/tcg-plugins: added cores arg to cache plugin Date: Fri, 3 Sep 2021 10:03:25 +0100 Message-Id: <20210903090339.1074887-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660341589100001 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Message-Id: <20210803151301.123581-3-ma.mandourr@gmail.com> Signed-off-by: Alex Benn=C3=A9e diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 047bf4ada7..2d29a8972b 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -355,11 +355,8 @@ configuration when a given working set is run:: =20 will report the following:: =20 - Data accesses: 996479, Misses: 507 - Miss rate: 0.050879% - - Instruction accesses: 2641737, Misses: 18617 - Miss rate: 0.704726% + core #, data accesses, data misses, dmiss rate, insn accesses, insn mi= sses, imiss rate + 0 996695 508 0.0510% 2642799 18617 = 0.7044% =20 address, data misses, instruction 0x424f1e (_int_malloc), 109, movq %rax, 8(%rcx) @@ -403,3 +400,9 @@ The plugin has a number of arguments, all of them are o= ptional: Sets the eviction policy to POLICY. Available policies are: :code:`lru`, :code:`fifo`, and :code:`rand`. The plugin will use the specified policy= for both instruction and data caches. (default: POLICY =3D :code:`lru`) + + * arg=3D"cores=3DN" + + Sets the number of cores for which we maintain separate icache and dcach= e. + (default: for linux-user, N =3D 1, for full system emulation: N =3D cores + available to guest) --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660045450569.7934271901852; Fri, 3 Sep 2021 02:07:25 -0700 (PDT) Received: from localhost ([::1]:40092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5AS-0001Z4-FA for importer@patchew.org; Fri, 03 Sep 2021 05:07:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57A-0006Bz-Dv for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:00 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45931) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM577-0005f9-D0 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:00 -0400 Received: by mail-wr1-x42b.google.com with SMTP id n5so7155472wro.12 for ; Fri, 03 Sep 2021 02:03:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y15sm4062044wrw.64.2021.09.03.02.03.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9641E1FFA5; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5/N/ygGGEO4FJCbA3u79534rctxSYi1cLOVSuXy4QtY=; b=VZX6eXB8I2KChGZTeudU9P1NzKcHm1PgXW+LBNoqq7XY2MH+ZjgUvmAa+tsV60iv0l 30z7ZePXtWH8BOuDfERXqOrza8UtWDekGMRfPKv3jil7qrGTMB8ng1CgLhGkXU0N1udK dj6SatNSZmyxJMaMfXNby6tAdvUlJvuXtUx/3Wfx5xn8tBcEWIVkcU8z0gtvkKg3EnQQ p/qX7LAx2zv+LiP6NAmjxyczFEPEFUS1TDTJRwLmtlIWu98oRAFKcczjitE+3uZF6eDN cn32Cu0am4nOITYcVZrNRrf4thWtuG/lIxkWjha1edCp4Bde9fcT/bp79U19ERGt3rFU B1Zw== 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:mime-version:content-transfer-encoding; bh=5/N/ygGGEO4FJCbA3u79534rctxSYi1cLOVSuXy4QtY=; b=b3tIYQdhikH0sw4ry43cMv1A1rGnYRgWMLI+iH3a+C9Uh/Zs4T5UR6gmRwcG5koB/S S20ctQQP97/ntMjqI5529mXsziCYbPgsY19hePV1ELeUYwda9VUOsJ3TfbIiwizz5RD1 tTRQ6to9dRgyBOhiJFM8q9x6nPNhWNTxlmBlBECgCyqdw828EKoz77T4QlWwWp1VbyBX gS1UuapouDa5+CzA1Y9nFtLY5F/enUG8raaqVgj5dWKw6A2JoCaRJj5E2AkeU6LVXWx+ cjTPsbPHx7fbU0tCAdUUSCjczBv5rrNH2eC/Oxjxjc8zWCkEA2ktWP4ovwD4zfQ/eYXx gJHQ== X-Gm-Message-State: AOAM532AH1yv83iiNfFAaykzETd7bTu9+FUL6r5iPT5P0I0JQ5381lzW Y3/WeSkgLmq3+iIkUIlSNPj+JA== X-Google-Smtp-Source: ABdhPJwMQZJbIfW/1XN2KUNeh/MuDy+dGIzrP5QeHcAW4FFVmroNdz4vF4MEduNWpA985YD2vpaFGA== X-Received: by 2002:adf:e449:: with SMTP id t9mr2704370wrm.135.1630659835119; Fri, 03 Sep 2021 02:03:55 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/22] plugins: allow plugin arguments to be passed directly Date: Fri, 3 Sep 2021 10:03:26 +0100 Message-Id: <20210903090339.1074887-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660046349100001 From: Mahmoud Mandour Passing arguments to plugins had to be done through "arg=3D". This is redundant and introduces confusion especially when the argument has a name and value (e.g. `-plugin plugin_name,arg=3D"argname=3Dargvalue"`= ). This allows passing plugin arguments directly e.g: `-plugin plugin_name,argname=3Dargvalue` For now, passing arguments through "arg=3D" is still supports but outputs a deprecation warning. Also, this commit makes boolean arguments passed to plugins in the `argname=3Don|off` form instead of the deprecated short-boolean form. Signed-off-by: Mahmoud Mandour Tested-by: Alex Benn=C3=A9e Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-2-ma.mandourr@gmail.com> diff --git a/linux-user/main.c b/linux-user/main.c index 37ed50d98e..a6094563b6 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -463,7 +463,7 @@ static const struct qemu_argument arg_table[] =3D { "", "[[enable=3D]][,events=3D][,file=3D]"}, #ifdef CONFIG_PLUGIN {"plugin", "QEMU_PLUGIN", true, handle_arg_plugin, - "", "[file=3D][,arg=3D]"}, + "", "[file=3D][,=3D]"}, #endif {"version", "QEMU_VERSION", false, handle_arg_version, "", "display version information and exit"}, diff --git a/plugins/loader.c b/plugins/loader.c index 05df40398d..a4ec281692 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -94,6 +94,8 @@ static int plugin_add(void *opaque, const char *name, con= st char *value, { struct qemu_plugin_parse_arg *arg =3D opaque; struct qemu_plugin_desc *p; + bool is_on; + char *fullarg; =20 if (strcmp(name, "file") =3D=3D 0) { if (strcmp(value, "") =3D=3D 0) { @@ -107,18 +109,32 @@ static int plugin_add(void *opaque, const char *name,= const char *value, QTAILQ_INSERT_TAIL(arg->head, p, entry); } arg->curr =3D p; - } else if (strcmp(name, "arg") =3D=3D 0) { + } else { if (arg->curr =3D=3D NULL) { error_setg(errp, "missing earlier '-plugin file=3D' option"); return 1; } + + if (g_strcmp0(name, "arg") =3D=3D 0 && + !qapi_bool_parse(name, value, &is_on, NULL)) { + if (strchr(value, '=3D') =3D=3D NULL) { + /* Will treat arg=3D"argname" as "argname=3Don" */ + fullarg =3D g_strdup_printf("%s=3D%s", value, "on"); + } else { + fullarg =3D g_strdup_printf("%s", value); + } + warn_report("using 'arg=3D%s' is deprecated", value); + error_printf("Please use '%s' directly\n", fullarg); + } else { + fullarg =3D g_strdup_printf("%s=3D%s", name, value); + } + p =3D arg->curr; p->argc++; p->argv =3D g_realloc_n(p->argv, p->argc, sizeof(char *)); - p->argv[p->argc - 1] =3D g_strdup(value); - } else { - error_setg(errp, "-plugin: unexpected parameter '%s'; ignored", na= me); + p->argv[p->argc - 1] =3D fullarg; } + return 0; } =20 diff --git a/qemu-options.hx b/qemu-options.hx index 83aa59a920..4a9ee722c9 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4532,19 +4532,18 @@ SRST =20 ERST DEF("plugin", HAS_ARG, QEMU_OPTION_plugin, - "-plugin [file=3D][,arg=3D]\n" + "-plugin [file=3D][,=3D]\n" " load a plugin\n", QEMU_ARCH_ALL) SRST -``-plugin file=3Dfile[,arg=3Dstring]`` +``-plugin file=3Dfile[,argname=3Dargvalue]`` Load a plugin. =20 ``file=3Dfile`` Load the given plugin from a shared library file. =20 - ``arg=3Dstring`` - Argument string passed to the plugin. (Can be given multiple - times.) + ``argname=3Dargvalue`` + Argument passed to the plugin. (Can be given multiple times.) ERST =20 HXCOMM Internal use --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630661749052149.26936443726493; Fri, 3 Sep 2021 02:35:49 -0700 (PDT) Received: from localhost ([::1]:44954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5bw-000468-4o for importer@patchew.org; Fri, 03 Sep 2021 05:35:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM5F3-0003d8-N4 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:09 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:55031) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM5F1-0003u8-9X for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:09 -0400 Received: by mail-wm1-x336.google.com with SMTP id g138so3031004wmg.4 for ; Fri, 03 Sep 2021 02:12:06 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x11sm3805781wmk.21.2021.09.03.02.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A60981FFA6; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1bVEVWhNaQF2veQzCYIds6OQeILaCkMmELL9XjWUDS0=; b=UgRNCkOWAWGZnfKwkulV/UT0wLptUwmz4/ZuxWARi+dMENZ9kYFVqVF6INdAX1qqen Ii/33CpFZo5/g5usb9mYdoPXdYhLtWutANLZK8ZmI3ZM+U75Mg7B2S+3+whoe6heT306 BF19TUa0dDFEtV9JpnclFsh93ZFap6AOASTROCNSRx9b46ANODMLanMyp4AVmlENecXA wO4vU35YL65czPcMWNxkHFMYxnCrCmkwNXsOq6Pu/xWasEwbYwFvWEflK449FDfrJKfF yzexCHc+OjN/ri0gJo+SbBzyZsqBvUW1giGFh3kUh25pO9yB/uNg4hqpk4+t6n4wmygF oayA== 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:mime-version:content-transfer-encoding; bh=1bVEVWhNaQF2veQzCYIds6OQeILaCkMmELL9XjWUDS0=; b=gqlqUwqQxanOJGBp7WqXo1gtjjcqfVfntrSNLzQDBJ/GEjWFhKLdb7jkTRMoequvvi PIVTMnZvv5LN//QvfsOP1HMqxd9iqWZRCAQDzrkooMwamWL1kAFNd7IJGSpy90S9rUx0 5bSj7Nw0k1iGaZta0z20TpeujcgxA98b9sP2ZQDh4yA+AxutIqHkRra9CjqxCjHNVm5J HlhI3c1EjJlzq9o8ZaRoIKCRWI/RTO3KkzdOp/H54jjibzbanMGavAglTITzY8D1FuzN PelivyYeBJfF6pstwwHKjncj5aZ1omBfaZihD078Rj6H6MroiF0fpDfZSbNRe9bhtdh6 4QWg== X-Gm-Message-State: AOAM530KClmzst/5wIceHr3VVsOoHjMHGuxKUxtjkWzdNsW5jg8Ju2mq aDvlv+I83ave4pX2AT66ulQDnoYK7+lUMA== X-Google-Smtp-Source: ABdhPJyuTA7T/tH+knrXPW0jGCJM5kqbSNf9yaL8tiHUlv2zzxZjGeKLKV7TURjSB3hwJ+e9rKAeDg== X-Received: by 2002:a05:600c:350b:: with SMTP id h11mr2283763wmq.101.1630660325417; Fri, 03 Sep 2021 02:12:05 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/22] plugins/api: added a boolean parsing plugin api Date: Fri, 3 Sep 2021 10:03:27 +0100 Message-Id: <20210903090339.1074887-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::336; envelope-from=alex.bennee@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 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: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630661750841100001 From: Mahmoud Mandour This call will help boolean argument parsing since arguments are now passed to plugins as a name and value. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-3-ma.mandourr@gmail.com> [AJB: add to symbols] Signed-off-by: Alex Benn=C3=A9e diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index e6e815abc5..5f1017201f 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -577,4 +577,17 @@ int qemu_plugin_n_max_vcpus(void); */ void qemu_plugin_outs(const char *string); =20 +/** + * qemu_plugin_bool_parse() - parses a boolean argument in the form of + * "=3D[on|yes|true|off|no|false]" + * + * @name: argument name, the part before the equals sign + * @val: argument value, what's after the equals sign + * @ret: output return value + * + * returns true if the combination @name=3D@val parses correctly to a bool= ean + * argument, and false otherwise + */ +bool qemu_plugin_bool_parse(const char *name, const char *val, bool *ret); + #endif /* QEMU_PLUGIN_API_H */ diff --git a/plugins/api.c b/plugins/api.c index 2d521e6ba8..acff9ce8ac 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -383,3 +383,8 @@ void qemu_plugin_outs(const char *string) { qemu_log_mask(CPU_LOG_PLUGIN, "%s", string); } + +bool qemu_plugin_bool_parse(const char *name, const char *value, bool *ret) +{ + return name && value && qapi_bool_parse(name, value, ret, NULL); +} diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index dee7610387..67b309ea2a 100644 --- a/plugins/qemu-plugins.symbols +++ b/plugins/qemu-plugins.symbols @@ -1,4 +1,5 @@ { + qemu_plugin_bool_parse; qemu_plugin_get_hwaddr; qemu_plugin_hwaddr_is_io; qemu_plugin_insn_data; --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660214864324.73215229446464; Fri, 3 Sep 2021 02:10:14 -0700 (PDT) Received: from localhost ([::1]:47378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5DB-0006Os-Tq for importer@patchew.org; Fri, 03 Sep 2021 05:10:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM572-00064n-Kn for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:52 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:41653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM570-0005a1-Vc for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:03:52 -0400 Received: by mail-wm1-x32d.google.com with SMTP id u15-20020a05600c19cf00b002f6445b8f55so3114097wmq.0 for ; Fri, 03 Sep 2021 02:03:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g143sm3789723wme.16.2021.09.03.02.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C0F531FFA9; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=omwD0CvH7QKtlKqaBp+2tXe6lKOc5AVhGBgb958NX84=; b=W30RGIQAW/jU/eKsCxBjChQK1S3oSIjb/C3v7WuLB24zHMxxr2bGYOfyXa2ONa7UkQ mPPeEfb0TaQRoJBFtpEsFNe/NgEoG58/DPmveKjbCLRwdWti+pwD7UoKMwpSgMwXYCI7 8NtFPETKLswrH3a0WXEOnqk4c4ebp/TNUWqQGmRzaIf2XgbCVauHSIaun4z/AeKY9iSR 38eb/lnZWLiLaNnDEfOFWR6CPMuxL8tymJA3+ARf45ERoTa8ybYdqGPABYAp2y7mUmq9 1uJwAepWM7hGkzxT36KmVxUTQdCg0lA4kJVGFHVsxwa8zJGIFmwUcc92MNkrls2z4NU7 eJXA== 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:mime-version:content-transfer-encoding; bh=omwD0CvH7QKtlKqaBp+2tXe6lKOc5AVhGBgb958NX84=; b=E7G1khVzd1VhchA4hlA8GMXZtbOsoF2ar27h0CJU0lajBVGefiVfBxfoiLrNojj+sZ BDpmxLv/5eupdRLMFFwCqs2k24PBkfgPjKOuoX2EYtFcTSZR3i0exYTZrcRO35WFFUor TG4EDUBOgC5pv2o2BoAXNgoJq05hPfWm5vq5jnmYqodaAAaeRqkiaKtBWOcq3RqGqCht oN3dILDl4IA05ZAPqzqPd4pzatKbyq090jkH70PHTLTbxNu8A+EozmU9ZnUYi1RiFQZ6 2gclEQbtO+qZatgU5IswFI5NZBP0hKov1yLPif7KeR8u11XfQTw14Rcf7cWbogAtD61d PwGw== X-Gm-Message-State: AOAM530Id47wAliN1WnseMCtqhTrZgNQtepLL0l6Ayfu1K3XkK8QBxS8 xXGpgG09gHqw1BILMBY89PbgPa69owZGpA== X-Google-Smtp-Source: ABdhPJwQhIf44Bf1fScHor1m96Il/AJGfxQF/pB6Puo/c0CZVQkCczX9iR4GRsyr5uQRg/SDgnqtlg== X-Received: by 2002:a05:600c:35cd:: with SMTP id r13mr7287927wmq.24.1630659829707; Fri, 03 Sep 2021 02:03:49 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/22] plugins/hotpages: introduce sortby arg and parsed bool args correctly Date: Fri, 3 Sep 2021 10:03:28 +0100 Message-Id: <20210903090339.1074887-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660216662100001 From: Mahmoud Mandour Since plugin arguments now expect boolean arguments, a plugin argument name "sortby" now expects a value of "read", "write", or "address". "io" arg is now expected to be passed as a full-form boolean parameter, i.e. "io=3Don|true|yes|off|false|no" Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-4-ma.mandourr@gmail.com> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 2d29a8972b..aa75b390b1 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -193,6 +193,21 @@ Similar to hotblocks but this time tracks memory acces= ses:: 0x0000000048b000, 0x0001, 130594, 0x0001, 355 0x0000000048a000, 0x0001, 1826, 0x0001, 11 =20 +The hotpages plugin can be configured using the following arguments: + + * sortby=3Dreads|writes|address + + Log the data sorted by either the number of reads, the number of writes,= or + memory address. (Default: entries are sorted by the sum of reads and wri= tes) + + * io=3Don + + Track IO addresses. Only relevant to full system emulation. (Default: of= f) + + * pagesize=3DN + + The page size used. (Default: N =3D 4096) + - contrib/plugins/howvec.c =20 This is an instruction classifier so can be used to count different diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index bf53267532..0d12910af6 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -169,16 +169,26 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qe= mu_info_t *info, =20 for (i =3D 0; i < argc; i++) { char *opt =3D argv[i]; - if (g_strcmp0(opt, "reads") =3D=3D 0) { - sort_by =3D SORT_R; - } else if (g_strcmp0(opt, "writes") =3D=3D 0) { - sort_by =3D SORT_W; - } else if (g_strcmp0(opt, "address") =3D=3D 0) { - sort_by =3D SORT_A; - } else if (g_strcmp0(opt, "io") =3D=3D 0) { - track_io =3D true; - } else if (g_str_has_prefix(opt, "pagesize=3D")) { - page_size =3D g_ascii_strtoull(opt + 9, NULL, 10); + g_autofree char **tokens =3D g_strsplit(opt, "=3D", -1); + + if (g_strcmp0(tokens[0], "sortby") =3D=3D 0) { + if (g_strcmp0(tokens[1], "reads") =3D=3D 0) { + sort_by =3D SORT_R; + } else if (g_strcmp0(tokens[1], "writes") =3D=3D 0) { + sort_by =3D SORT_W; + } else if (g_strcmp0(tokens[1], "address") =3D=3D 0) { + sort_by =3D SORT_A; + } else { + fprintf(stderr, "invalid value to sortby: %s\n", tokens[1]= ); + return -1; + } + } else if (g_strcmp0(tokens[0], "io") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &track_io)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else if (g_strcmp0(tokens[0], "pagesize") =3D=3D 0) { + page_size =3D g_ascii_strtoull(tokens[1], NULL, 10); } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660688941636.7463017395668; Fri, 3 Sep 2021 02:18:08 -0700 (PDT) Received: from localhost ([::1]:44124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Kp-0006tD-P8 for importer@patchew.org; Fri, 03 Sep 2021 05:18:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57C-0006ID-FM for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:02 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:40780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM579-0005gi-GK for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:02 -0400 Received: by mail-wr1-x435.google.com with SMTP id t15so7186990wrg.7 for ; Fri, 03 Sep 2021 02:03:59 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k17sm3935314wmj.0.2021.09.03.02.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:49 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CC4881FFAA; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gnkvq2Rb6V5W7/htmB7BU5fOrcMpKnuqDaYrMUnPexM=; b=VWEhf7CRE3WhAySygm0n1i6/e1W1OQPizCUNEiEWBtMQT1pDE3tzThe4opsst/Ki05 g6SYjGhvFEInD4k3jI5X3TN5MzchB5bEbH1/bt2pgRq3QBNutIbcRiARDPBVT0nFZq1g HIBd+MZ8AgVxWksNxkwb4bb3jaVF0DRIddmMbSOeBUAkKT0DaWKIhQfSDsgQfx9BKqNt wOCd1UD8rBeF09bywgziNjlscZmnGnPiqYa1ihiVz5qaDEgvduXPEFaCxeEKNSRQMIQP 40hxHjiwdtUQw7hOLfc5v+s9ZJzAroZg4uvXjdJsSW998KfIM74jAuHwkUTXmq847L0t cZKg== 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:mime-version:content-transfer-encoding; bh=Gnkvq2Rb6V5W7/htmB7BU5fOrcMpKnuqDaYrMUnPexM=; b=C2C1vHxnDPBlQKWvj03lNjesH7CpwVU0ZXKZq4IZ8lg9OWTjmyiPr1eFDSU8h4qJTs sXKsxL/g6MLmIveQ7eCFVhSS6P0mAXiJI7cdBl/j0IP151TvB7VZHOpKM0J8y9LrWaUu 21V8Q/arrPnB74Vc2Oi4xNQx/Noa1Pizbd2xh8wkMwAgMZrdu/kam5oCvfkfHZchig3c Fi63sGBFyWg2GQ/lrxP+HCB7VrsAFXkf0AHblh1TSja3elzeSgBT2DtgFksX/5Gvl4lJ QzqCX8jSzeUXSEjJumFbAdYTSfo2PLFol5oORL2XE3Q2rC8iBM8XqHkOBxGJom/zO4kW EnEQ== X-Gm-Message-State: AOAM531DUkPEVPR8sfOfk07t6o1B4ri57NJipkyQOnrsYrbFsIIMsqBR AfdHs2rfx7fDLfzbmNMh/rdYPA== X-Google-Smtp-Source: ABdhPJxsq1204hmMQD5Wn7rttgAWSwFBoP+thUJxDErpKROgWKGwRfMLprLAFcb/Y9fNCuYrD73r9Q== X-Received: by 2002:a05:6000:1808:: with SMTP id m8mr2773435wrh.272.1630659837996; Fri, 03 Sep 2021 02:03:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/22] plugins/hotblocks: Added correct boolean argument parsing Date: Fri, 3 Sep 2021 10:03:29 +0100 Message-Id: <20210903090339.1074887-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660689239100001 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-5-ma.mandourr@gmail.com> diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..062200a7a4 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -133,8 +133,18 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc && strcmp(argv[0], "inline") =3D=3D 0) { - do_inline =3D true; + for (int i =3D 0; i < argc; i++) { + char *opt =3D argv[i]; + g_autofree char **tokens =3D g_strsplit(opt, "=3D", 2); + if (g_strcmp0(tokens[0], "inline") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline))= { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } } =20 plugin_init(); --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630661552914374.65961104283997; Fri, 3 Sep 2021 02:32:32 -0700 (PDT) Received: from localhost ([::1]:34502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Yl-0005AP-QF for importer@patchew.org; Fri, 03 Sep 2021 05:32:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM5F6-0003mw-IX for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:12 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:38532) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM5F4-0003xR-Uh for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:12 -0400 Received: by mail-wm1-x333.google.com with SMTP id k5-20020a05600c1c8500b002f76c42214bso3287412wms.3 for ; Fri, 03 Sep 2021 02:12:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q14sm4136468wrc.31.2021.09.03.02.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E41361FFAB; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZXuwxkhWA08Lj53nliSBduusJq0bDFXFFfvFTQKmSYs=; b=HwZ+apV9EWg5qfya3blYaNtAAdb5nUfb9OEjD1UA1Y8Mr2qpuR8MNo4T3PGXmXPl32 Zefk+e/q5YLRJvx2THXRepvoLVIOHcbCBxZ3QXtpdtPylKu7QByN2BlAIbyjysVLEAmx zZk4qfWGqvnuuOMy6P9C5c8FWygtVEms+SwsCseaanpVSOa10mdmQdzDfsXM3mjILVLJ NABn1aL0ivQUXovX+YKswW9boQXDeh0mct+581GMqzt3Pz8lMU6R62/dvgxVMwK4o1WV IZ25bbuZyjGnob2HUxgeXcppCLinojQBRa5/yMKHZqPHxHbKA0A6SIGXH26V7sd5WHrb Hygw== 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:mime-version:content-transfer-encoding; bh=ZXuwxkhWA08Lj53nliSBduusJq0bDFXFFfvFTQKmSYs=; b=qOPoDLR18792QEXyAgsH6fP9/sjKluRKJEAckoDBk1upPvRZ2m/ERubW2MKJTN7k+c sPbIfFQrnqqNa18kw2K09JkvfPy9JPjZGqcHRmmdvKAhCJI9wAoZ+cArwcUsOEcg93fG JIfEDbbE0st7QM+AaD/R/I80fAYSUovNfPEMe39G80lh7R90yKgP2bR9vCuXW8HAqlMv DNpJ/S8UpYkPsD3OxyWbNOgGqu8/vklGPyV7gLnlJRWVv/Zik21OIvEF38MM6pmSqzte 3IpJEq9CXBa1V8+HTYZ5UiTRk9N3EuVCrHBoPkdqYQkMBwQz6xCr+PfWfYB9f5teHrAr HBoA== X-Gm-Message-State: AOAM531oYamjYKc1sadtTXCpwuWdZY7Xh9SjlmuLDWiusaSq1f9tpUab gMdmnBpCMk8M7m28gJ+O4XhOSA== X-Google-Smtp-Source: ABdhPJwlAMregxW8BLxvWkszPgEW7XN7KKodw9ZYTaCfq9G2ejRFMsz2WmGp+Fzjq2ag702/l1Fihw== X-Received: by 2002:a1c:98d5:: with SMTP id a204mr7200184wme.52.1630660329625; Fri, 03 Sep 2021 02:12:09 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/22] plugins/lockstep: make socket path not positional & parse bool arg Date: Fri, 3 Sep 2021 10:03:30 +0100 Message-Id: <20210903090339.1074887-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630661553944100001 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-6-ma.mandourr@gmail.com> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index aa75b390b1..5cddf31c70 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -286,7 +286,7 @@ communicate over:: =20 ./sparc-softmmu/qemu-system-sparc -monitor none -parallel none \ -net none -M SS-20 -m 256 -kernel day11/zImage.elf \ - -plugin ./contrib/plugins/liblockstep.so,arg=3Dlockstep-sparc.sock \ + -plugin ./contrib/plugins/liblockstep.so,sockpath=3Dlockstep-sparc.soc= k \ -d plugin,nochain =20 which will eventually report:: diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 7fd35eb669..a41ffe83fa 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -319,22 +319,35 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, int argc, char **argv) { int i; - - if (!argc || !argv[0]) { - qemu_plugin_outs("Need a socket path to talk to other instance."); - return -1; - } + g_autofree char *sock_path =3D NULL; =20 for (i =3D 0; i < argc; i++) { char *p =3D argv[i]; - if (strcmp(p, "verbose") =3D=3D 0) { - verbose =3D true; - } else if (!setup_unix_socket(argv[0])) { - qemu_plugin_outs("Failed to setup socket for communications."); + g_autofree char **tokens =3D g_strsplit(p, "=3D", 2); + + if (g_strcmp0(tokens[0], "verbose") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &verbose)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", p= ); + return -1; + } + } else if (g_strcmp0(tokens[0], "sockpath") =3D=3D 0) { + sock_path =3D tokens[1]; + } else { + fprintf(stderr, "option parsing failed: %s\n", p); return -1; } } =20 + if (sock_path =3D=3D NULL) { + fprintf(stderr, "Need a socket path to talk to other instance.\n"); + return -1; + } + + if (!setup_unix_socket(sock_path)) { + fprintf(stderr, "Failed to setup socket for communications.\n"); + return -1; + } + our_id =3D id; =20 qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630661286591567.2726752427444; Fri, 3 Sep 2021 02:28:06 -0700 (PDT) Received: from localhost ([::1]:50972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5UT-0005Up-Jf for importer@patchew.org; Fri, 03 Sep 2021 05:28:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM5F4-0003hZ-N6 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:10 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:43588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM5F2-0003vJ-RM for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:10 -0400 Received: by mail-wm1-x32b.google.com with SMTP id o39-20020a05600c512700b002e74638b567so3111995wms.2 for ; Fri, 03 Sep 2021 02:12:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d7sm4140205wrs.39.2021.09.03.02.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F18C61FFAC; Fri, 3 Sep 2021 10:03:40 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5M7LN/rhrQ/tByfAjAq1zS6Dlqe4MPUhzqfn+rf9SCw=; b=xNXZwStzUDdNbJ7ueWslUc8Su7Fs8m77d5SdoKYa2QB/7XbIYDdVcRKkY2EW184xfp TpG0vqN68kUKlX51cn/3u4NWfEFUv0RI6Xh8DJwVnS0ffRMCYBf2RCFj/OfHhhpa52Ov SjLqQbKefGM+vpdgl627r9IQqHayWUX66okQBOAUojq4EmYdnYob0WvPDajoGXXiIKZP wCe4QENKmXCug66kgm5NEgdK6bfFZD4ATnrpRf6kZSfVT3v/dPbfNVbTJ0W8x03fnjMA sCM+qDPbb5D25zq2UUJ4V6W3wDawi+jBcMJlrzapRfmDBXFuh2a/Fm5SFjLq0y9egI8G zd4g== 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:mime-version:content-transfer-encoding; bh=5M7LN/rhrQ/tByfAjAq1zS6Dlqe4MPUhzqfn+rf9SCw=; b=cuFwwG/udG/8eFv7LtJqcDqQSLqSOcp7xD2vAaUxadw34MnxWcuQn8Oe7A3suYeomG MxTzDz0t4nsPiWDB32xf0fI03Oyqt1rX+AMS7UEYHGB6OAZ4eXqfUEY77d/sr6o5+Zq5 gKReetYIACVZ+FyyhsrffsYl/otCTY+tJpKGoS24gysLlu38vOeIIjgJpCPy1kAyurvX lyQl3403f3VFI5cGM1Khly0WPqyrvCW4EEn+TBchVOglIRU1rNXqffmrfXw7NLhK9kGd EJ0HDYZVjr/0C/Y0AU0i9pJzF4K15uQT1In+LwC48Tl87uzKJFiOvix1kPukGZ9uIsI7 +Ehg== X-Gm-Message-State: AOAM532VIVIJSBs3jpp0rZ2jQBn3NopT391YxNg3i6dxNKPJUiD372mT AEoxJOf2nl86JthCcX7GmKHQWKuWFhmEeg== X-Google-Smtp-Source: ABdhPJyQ4UQxxDWb0fqmoAUOgwzb9RwWH6k6p9VUi7XLvzW3CxPrmk3GIl0ZJ60ZrZsggGLS4A6oEg== X-Received: by 2002:a1c:a9ce:: with SMTP id s197mr7120120wme.173.1630660327381; Fri, 03 Sep 2021 02:12:07 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 14/22] plugins/hwprofile: adapt to the new plugin arguments scheme Date: Fri, 3 Sep 2021 10:03:31 +0100 Message-Id: <20210903090339.1074887-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630661288035100003 From: Mahmoud Mandour Parsing boolean arguments correctly (e.g. pattern=3Don or source=3Dfalse). Introduced a new "track" argument that takes a [read|write] value. This substitutes passing read or write to "arg=3D" that is deprecated. Also, matches are now taken one by one through the "match" argument. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-7-ma.mandourr@gmail.com> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 5cddf31c70..e1f9eff587 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -306,22 +306,22 @@ which will eventually report:: The hwprofile tool can only be used with system emulation and allows the user to see what hardware is accessed how often. It has a number of op= tions: =20 - * arg=3Dread or arg=3Dwrite + * track=3Dread or track=3Dwrite =20 By default the plugin tracks both reads and writes. You can use one of these options to limit the tracking to just one class of accesses. =20 - * arg=3Dsource + * source =20 Will include a detailed break down of what the guest PC that made the - access was. Not compatible with arg=3Dpattern. Example output:: + access was. Not compatible with the pattern option. Example output:: =20 cirrus-low-memory @ 0xfffffd00000a0000 pc:fffffc0000005cdc, 1, 256 pc:fffffc0000005ce8, 1, 256 pc:fffffc0000005cec, 1, 256 =20 - * arg=3Dpattern + * pattern =20 Instead break down the accesses based on the offset into the HW region. This can be useful for seeing the most used registers of a diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index faf216ac00..691d4edb0c 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -259,27 +259,42 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qe= mu_info_t *info, int argc, char **argv) { int i; + g_autoptr(GString) matches_raw =3D g_string_new(""); =20 for (i =3D 0; i < argc; i++) { char *opt =3D argv[i]; - if (g_strcmp0(opt, "read") =3D=3D 0) { - rw =3D QEMU_PLUGIN_MEM_R; - } else if (g_strcmp0(opt, "write") =3D=3D 0) { - rw =3D QEMU_PLUGIN_MEM_W; - } else if (g_strcmp0(opt, "pattern") =3D=3D 0) { - pattern =3D true; - } else if (g_strcmp0(opt, "source") =3D=3D 0) { - source =3D true; - } else if (g_str_has_prefix(opt, "match")) { - gchar **parts =3D g_strsplit(opt, "=3D", 2); + g_autofree char **tokens =3D g_strsplit(opt, "=3D", 2); + + if (g_strcmp0(tokens[0], "track") =3D=3D 0) { + if (g_strcmp0(tokens[1], "read") =3D=3D 0) { + rw =3D QEMU_PLUGIN_MEM_R; + } else if (g_strcmp0(tokens[1], "write") =3D=3D 0) { + rw =3D QEMU_PLUGIN_MEM_W; + } else { + fprintf(stderr, "invalid value for track: %s\n", tokens[1]= ); + return -1; + } + } else if (g_strcmp0(tokens[0], "pattern") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &pattern)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else if (g_strcmp0(tokens[0], "source") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &source)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else if (g_strcmp0(tokens[0], "match") =3D=3D 0) { check_match =3D true; - matches =3D g_strsplit(parts[1], ",", -1); - g_strfreev(parts); + g_string_append_printf(matches_raw, "%s,", tokens[1]); } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; } } + if (check_match) { + matches =3D g_strsplit(matches_raw->str, ",", -1); + } =20 if (source && pattern) { fprintf(stderr, "can only currently track either source or pattern= .\n"); --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660346034208.77134541143346; Fri, 3 Sep 2021 02:12:26 -0700 (PDT) Received: from localhost ([::1]:54862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5FI-0003Fe-SI for importer@patchew.org; Fri, 03 Sep 2021 05:12:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57D-0006L7-9r for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:03 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:35524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM57B-0005i3-BJ for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:02 -0400 Received: by mail-wm1-x32d.google.com with SMTP id z9-20020a7bc149000000b002e8861aff59so3297877wmi.0 for ; Fri, 03 Sep 2021 02:04:00 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n4sm3331640wra.37.2021.09.03.02.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1577A1FFAE; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mR+DLJiG7KKaByVpRDzQv8ceHSAlvak8Zfn7rSXlsPc=; b=rM8Q/HjymvS3X9RmUppWagtEPA8UKYOVUiJAgQFYeC3lZAnT1WZufMC6IEPVCpWnt7 f+nOyZNBJuwLgvYaUA6d/gn9crHhj2gKO5WAcZshOWZBbhqqQMBL9Yc3TAh5MAJ2opVU Tu/z7DgCHkuaLS/RotN953RS4A7FcYjF/x+SNbifZEhmQSbdHx+mhH3eNvv2Ojum01kQ UesZDja2ZpTbipI5eKuiba3vL6DLGetOQ/ae74tEXST8nCi5OJiLNZUnby0iuGttqigP Y2KIIqQi3kvGTRcFsfKdj6lgrIVTzLy0cRQa8ndziS1r62i6uHXce6nPSziTLustGQfe qcaw== 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:mime-version:content-transfer-encoding; bh=mR+DLJiG7KKaByVpRDzQv8ceHSAlvak8Zfn7rSXlsPc=; b=lMq+OTvZXh3bBGT1c0V7tqjNAh3JoFPSLApZSyy30eze2vzK2OPg1SANRfk8JYKBfR KTv3juQgzPyQ0KVWKaeJk8MaCy9Sihjzcx/Ry4K88HZYCT5S32x37vIs+KgkIpGJpwBX Ym9/2r7XTckYLMrXvixrWip9vCFfQA9E1Jdba3RRP5usR/hObxde75xy8mP1suxgFV4/ PrkNBWFPqvLv0FoGF3jVL+Xcaq3unHP/+v83CeuXucfMo+cxfh6DO0yCEK7M5/EFttdI wpD6trbrMviPOE14r/mUbmtHaoxU34ZTUsBwRtHT/R7qJMrlHj3dmHflJHfcv+/whVc1 xuoQ== X-Gm-Message-State: AOAM532PPQIiHqcywZPMpop0Jim7Mm0mmmH4HxJxxFE0aTM6fRpL+Qle V7FpW0TfaqnPWB2bwtRA0oAUhA== X-Google-Smtp-Source: ABdhPJyYOweHh5oTFSzWhaILCc1h/4TF0ioaRMdSPK6wgn0Ydm5wuXAUCjF0SofzC967C25qaJlUwg== X-Received: by 2002:a1c:2209:: with SMTP id i9mr2267594wmi.92.1630659839899; Fri, 03 Sep 2021 02:03:59 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/22] plugins/howvec: adapting to the new argument passing scheme Date: Fri, 3 Sep 2021 10:03:32 +0100 Message-Id: <20210903090339.1074887-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660347727100001 From: Mahmoud Mandour Correctly parsing plugin argument since they now must be provided as full-form boolean parameters, e.g.: -plugin ./contrib/plugins/libhowvec.so,verbose=3Don,inline=3Don Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-8-ma.mandourr@gmail.com> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index e1f9eff587..7b1dece024 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -80,7 +80,7 @@ Once built a program can be run with multiple plugins loa= ded each with their own arguments:: =20 $QEMU $OTHER_QEMU_ARGS \ - -plugin tests/plugin/libhowvec.so,arg=3Dinline,arg=3Dhint \ + -plugin tests/plugin/libhowvec.so,inline=3Don,count=3Dhint \ -plugin tests/plugin/libhotblocks.so =20 Arguments are plugin specific and can be used to modify their @@ -212,13 +212,13 @@ The hotpages plugin can be configured using the follo= wing arguments: =20 This is an instruction classifier so can be used to count different types of instructions. It has a number of options to refine which get -counted. You can give an argument for a class of instructions to break -it down fully, so for example to see all the system registers -accesses:: +counted. You can give a value to the `count` argument for a class of +instructions to break it down fully, so for example to see all the system +registers accesses:: =20 ./aarch64-softmmu/qemu-system-aarch64 $(QEMU_ARGS) \ -append "root=3D/dev/sda2 systemd.unit=3Dbenchmark.service" \ - -smp 4 -plugin ./contrib/plugins/libhowvec.so,arg=3Dsreg -d plugin + -smp 4 -plugin ./contrib/plugins/libhowvec.so,count=3Dsreg -d plugin =20 which will lead to a sorted list after the class breakdown:: =20 diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 600f7facc1..4a5ec3d936 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -333,23 +333,34 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, =20 for (i =3D 0; i < argc; i++) { char *p =3D argv[i]; - if (strcmp(p, "inline") =3D=3D 0) { - do_inline =3D true; - } else if (strcmp(p, "verbose") =3D=3D 0) { - verbose =3D true; - } else { + g_autofree char **tokens =3D g_strsplit(p, "=3D", -1); + if (g_strcmp0(tokens[0], "inline") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline))= { + fprintf(stderr, "boolean argument parsing failed: %s\n", p= ); + return -1; + } + } else if (g_strcmp0(tokens[0], "verbose") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &verbose)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", p= ); + return -1; + } + } else if (g_strcmp0(tokens[0], "count") =3D=3D 0) { + char *value =3D tokens[1]; int j; CountType type =3D COUNT_INDIVIDUAL; - if (*p =3D=3D '!') { + if (*value =3D=3D '!') { type =3D COUNT_NONE; - p++; + value++; } for (j =3D 0; j < class_table_sz; j++) { - if (strcmp(p, class_table[j].opt) =3D=3D 0) { + if (strcmp(value, class_table[j].opt) =3D=3D 0) { class_table[j].what =3D type; break; } } + } else { + fprintf(stderr, "option parsing failed: %s\n", p); + return -1; } } =20 --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163066167474556.984800734195005; Fri, 3 Sep 2021 02:34:34 -0700 (PDT) Received: from localhost ([::1]:41332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5aj-0001cg-OY for importer@patchew.org; Fri, 03 Sep 2021 05:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM5F9-000417-Vv for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:16 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:35584) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM5F8-0003zK-0J for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:15 -0400 Received: by mail-wm1-x334.google.com with SMTP id z9-20020a7bc149000000b002e8861aff59so3314171wmi.0 for ; Fri, 03 Sep 2021 02:12:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h15sm1209356wrc.19.2021.09.03.02.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2B1ED1FFAF; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MwNqOLSs/h4JpB6SVAu+PmQQX3OyOVghXZoT0dCYuZo=; b=r/xX7dI2LKz71yY4ubyTkV2/Tws3xi9hkxxNsGm2N42ZVbTr8sqDX245dJZKGwcT91 Rd7q+8dCsvgQx39MY3750HAN2yqUdk2LnTpi7jkMr4cmuW1txlIscl2zHN5u16EccRrp kt/XpIqRN/5w6f2Zmwj7iiaS2khpzPO+PoY7oGuf+HwOeZDinROsIErGJqXNXab3Gzm+ ZZQW6F09Kler1BpTIaERsXSZ0cR9xL6ZEltZjEqx+RCt0vS9Iu6MvFmfvJaFau1yBE5J P4cnqscV4VtjmkeLPcAy0anFKrhwkNCN+VhTIGfDmw85G/FoaDXchWEW/fnyzU55XZci 9nFg== 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:mime-version:content-transfer-encoding; bh=MwNqOLSs/h4JpB6SVAu+PmQQX3OyOVghXZoT0dCYuZo=; b=J3IVLu8ZGi/njiaC8YATFdsAAI++bz0w6XwpzROORO4jSShrBaNJ0YZt4sVXTrRej5 ILbEHXxgisBakClLJDbcX8uYPAnjAn7HayKyb1Qmgrs44IcAsrgvemKqInVc0QvFU1Ji U497syZwktjPiziIh2Bh3kwwKoXwbq8shE5ki9LanCd7AwUm+MUw4/a7JIjxicZNQ0Pf 0aoq4FeERVSSxZNQZdkIR+qWyMkbpv0OVxUeNQCpIbFXZvKIgFeLvr/GY4rsdOpspmMw LmEn6cyacD+ewqBilJnL/uY+OqIj7s2BarVRX2xLWEtmkJJa399NNZ9AzAWFAvYnEgJE 3uyw== X-Gm-Message-State: AOAM533Jzj7pqcJ2i6IwGOO7lu8sn3AhoO0G1zSE1ONZJ+nXEE7Tby5j RFA9N/w/xa4/jywBg7Jz5yrr0A== X-Google-Smtp-Source: ABdhPJzNGqqp0kf9nbDoAzTw9/9tPKM1r5m7V5VtfPlZ5H9iCZN01ddOtZpKhcdGCR6GpRW0cPyJSg== X-Received: by 2002:a7b:c442:: with SMTP id l2mr7346299wmi.131.1630660332619; Fri, 03 Sep 2021 02:12:12 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 16/22] docs/tcg-plugins: new passing parameters scheme for cache docs Date: Fri, 3 Sep 2021 10:03:33 +0100 Message-Id: <20210903090339.1074887-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630661675540100001 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-9-ma.mandourr@gmail.com> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 7b1dece024..fcc460bf7b 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -389,34 +389,34 @@ will report the following:: =20 The plugin has a number of arguments, all of them are optional: =20 - * arg=3D"limit=3DN" + * limit=3DN =20 Print top N icache and dcache thrashing instructions along with their address, number of misses, and its disassembly. (default: 32) =20 - * arg=3D"icachesize=3DN" - * arg=3D"iblksize=3DB" - * arg=3D"iassoc=3DA" + * icachesize=3DN + * iblksize=3DB + * iassoc=3DA =20 Instruction cache configuration arguments. They specify the cache size, = block size, and associativity of the instruction cache, respectively. (default: N =3D 16384, B =3D 64, A =3D 8) =20 - * arg=3D"dcachesize=3DN" - * arg=3D"dblksize=3DB" - * arg=3D"dassoc=3DA" + * dcachesize=3DN + * dblksize=3DB + * dassoc=3DA =20 Data cache configuration arguments. They specify the cache size, block s= ize, and associativity of the data cache, respectively. (default: N =3D 16384, B =3D 64, A =3D 8) =20 - * arg=3D"evict=3DPOLICY" + * evict=3DPOLICY =20 Sets the eviction policy to POLICY. Available policies are: :code:`lru`, :code:`fifo`, and :code:`rand`. The plugin will use the specified policy= for both instruction and data caches. (default: POLICY =3D :code:`lru`) =20 - * arg=3D"cores=3DN" + * cores=3DN =20 Sets the number of cores for which we maintain separate icache and dcach= e. (default: for linux-user, N =3D 1, for full system emulation: N =3D cores --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16306607998501009.8757098528589; Fri, 3 Sep 2021 02:19:59 -0700 (PDT) Received: from localhost ([::1]:52758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Mc-0004O2-EJ for importer@patchew.org; Fri, 03 Sep 2021 05:19:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57K-0006YL-P1 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:12 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:44928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM57F-0005lS-Co for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:06 -0400 Received: by mail-wr1-x42d.google.com with SMTP id g18so7174978wrc.11 for ; Fri, 03 Sep 2021 02:04:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l2sm3876051wmi.1.2021.09.03.02.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 360151FFB1; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P0i71SO0mUfOxacGplPpPt2MK0kYjZTuvRy4ItPlDSU=; b=YLuv6o8Q6q86KhnHPd4gpYOdVjBAoVIwsG89SLENecGj4DYUgAJ8neNjKnayOQvtKL q0qAvzfj8bRrr6+bR2pkhvYBGJxnxtS1yIinImUwxgZxqe3qjLbZKf1YgFySQjmZQLtL xKA7SlJh78XHtB0udg2goZb39EFpUbX7EqZHOnVi3ikfbkHA7VQsog7yzwcKtUn2Jp9K H3xqchSiZYrhvX8S0zF0ddJOt24+i1Da1So9wlmwu+cV5QU5E6s1PfM9F0aMxrWYCQPW MjawGKTqoBJPUaWKZA04SlwzPCanDFQwG5LGZnrGOoYremBo5ZuUOO59RJ9IjTTxNxYj BDrw== 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:mime-version:content-transfer-encoding; bh=P0i71SO0mUfOxacGplPpPt2MK0kYjZTuvRy4ItPlDSU=; b=BWtZWkxIgQxcCbLNyOj1HaCeFdH7nMWsXArL+DukGmYK9coO+RwTIuPZ81UcQV/dP/ cOkJI4s6NJyRzPpg32AKnbSzAjSfIX81dEPbOsHoDilF+VKT2IRB75Edf1miSEdf6Go3 hKUlT8AV/yzbOhxQeRdWfaeSmzcyJ3R5e8UMRpjiSVaSbizQqUA5XXeRpANOGZaIbbzD usN/AkS3GmCxJg2EYWRwngoBURrtIlPBPeJgFSpUPIyLcBDwi0El9bp95o27996VfWFh J9C0Vp34SM8IYTSNNo8q2FHzZwfLENXafXaUw2Aq+kCfEbA2CYD0skkb7tNTsSYM6NJA GaSQ== X-Gm-Message-State: AOAM533g/1ABiWQ/dycBnIDuFG/YFP3BP36ButbDZOZxw+sqTxkQ3IL7 fr5/L/7KIPhf6iDT3lRYDwRJFA== X-Google-Smtp-Source: ABdhPJxCe10EgH5FGr7MuKkOf41eKw005FZlmnyh7LsdHKi8Fgo115NmfKUbkPqE7I/3g2+wCsu7XA== X-Received: by 2002:a05:6000:1091:: with SMTP id y17mr2729359wrw.202.1630659843986; Fri, 03 Sep 2021 02:04:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/22] tests/plugins/bb: adapt to the new arg passing scheme Date: Fri, 3 Sep 2021 10:03:34 +0100 Message-Id: <20210903090339.1074887-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660801068100001 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-10-ma.mandourr@gmail.com> diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index de09bdde4e..7d470a1011 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -104,10 +104,17 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, =20 for (i =3D 0; i < argc; i++) { char *opt =3D argv[i]; - if (g_strcmp0(opt, "inline") =3D=3D 0) { - do_inline =3D true; - } else if (g_strcmp0(opt, "idle") =3D=3D 0) { - idle_report =3D true; + g_autofree char **tokens =3D g_strsplit(opt, "=3D", 2); + if (g_strcmp0(tokens[0], "inline") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline))= { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else if (g_strcmp0(tokens[0], "idle") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &idle_report= )) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660695930499.434032891671; Fri, 3 Sep 2021 02:18:15 -0700 (PDT) Received: from localhost ([::1]:44832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Kw-0007NS-Po for importer@patchew.org; Fri, 03 Sep 2021 05:18:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM5F5-0003jj-Ad for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:11 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:56102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM5F3-0003vn-NC for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:11 -0400 Received: by mail-wm1-x331.google.com with SMTP id g135so3029761wme.5 for ; Fri, 03 Sep 2021 02:12:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t7sm4697894wrq.90.2021.09.03.02.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 51B1F1FFB3; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cPUmLfeX6y8YbGi3PEDcVcc78oGY3uTICFwnBB6uSQ0=; b=FIXDw4IbnQTTnWg8+B2nwFWDaRAzArr8dF04w7nFEg6/3aSutS0s/ktXxoY5cClygK QkuAc8fNHUU38ZzadfIZRzijid/i3zFfAHNqAQCcKSnygA68W/Km9hAu6FjvZWfnsB// ZPUIOuwYoqeLaQIj0CqZXEr9Eyji2deVzW0MSSorHgd20pNTT3Rl2azl98kN/ofYaPA3 zCOgZtzoxeBnLzCLvMbaZBtJuD3zVetcZGQwf1gDRsG5dUH4/4yHxc/IrWkLjL2Mksot JY0HErOGuw2Y+oHpcLa0XGEgtQnu2HvmX8LvtLbLuapc3ualWbY/4iWz1mJhoNduR2fV 3AIA== 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:mime-version:content-transfer-encoding; bh=cPUmLfeX6y8YbGi3PEDcVcc78oGY3uTICFwnBB6uSQ0=; b=Av4xkPYHemtapfXz90Trkp+y+dktXm4oxtO6TF7ftot627wskYSkPOi53ARObxgEtB 3A7Hlal+N3h03H51tVmn8xS7sRcKLmo4lQvt4Oi7M2wptLN79ve33YUxs/oxmO5yK8Zy GsuOcdOy4YLbSeR6rjq3pB8pYmcui/QsLA3yYH3mDeDA4q8AQVTadBRTMtv2flMUQp0/ WnpTLJNtwhtfTF7JBObKIorGhEGLBmmmwkOlPF7qGU1tN8hOuWhHb5IAp0cIwuKX1Jsy CYNz/t+0/WvxqpEmW01p/jzhV+EZGMla0zMTv/xk85Yf1BVovoZhY3794rQ/2LE4LG43 TXNA== X-Gm-Message-State: AOAM533LVnizq34nBSASYht7UuQux9cE9IsgJLFhTsj2y1m3pO4dzo6A aXfjAs6DJ5uw7dyQntxTnWaOQw== X-Google-Smtp-Source: ABdhPJwS3ku6ahvCkcMg7O90hTucBF3nsLeKv621BbstQjhvvQZUpy7c2CxRbCmMXg5hLVmBHlt6Kw== X-Received: by 2002:a7b:c190:: with SMTP id y16mr2235838wmi.158.1630660328330; Fri, 03 Sep 2021 02:12:08 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 18/22] tests/plugins/insn: made arg inline not positional and parse it as bool Date: Fri, 3 Sep 2021 10:03:35 +0100 Message-Id: <20210903090339.1074887-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , Richard Henderson , qemu-devel@nongnu.org, Paolo Bonzini , Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660697873100001 From: Mahmoud Mandour Made argument "inline" not positional, this has two benefits. First is that we adhere to how QEMU passes args generally, by taking the last value of an argument and drop the others. And the second is that this sets up a framework for potentially adding new args easily. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-11-ma.mandourr@gmail.com> [AJB: fix check-tcg tests calling arg=3Dinline] Signed-off-by: Alex Benn=C3=A9e diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index c253980ec8..0f6a1938c1 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -62,8 +62,18 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_i= d_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc && !strcmp(argv[0], "inline")) { - do_inline =3D true; + for (int i =3D 0; i < argc; i++) { + char *opt =3D argv[i]; + g_autofree char **tokens =3D g_strsplit(opt, "=3D", 2); + if (g_strcmp0(tokens[0], "inline") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline))= { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } } =20 qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefi= le.softmmu-target index fa9b1b9f90..9b9038d0be 100644 --- a/tests/tcg/i386/Makefile.softmmu-target +++ b/tests/tcg/i386/Makefile.softmmu-target @@ -38,7 +38,7 @@ run-plugin-%-with-libinsn.so: $(call run-test, $@, \ $(QEMU) -monitor none -display none \ -chardev file$(COMMA)path=3D$@.out$(COMMA)id=3Doutput \ - -plugin ../../plugin/libinsn.so$(COMMA)arg=3Dinline \ + -plugin ../../plugin/libinsn.so$(COMMA)inline=3Don \ -d plugin -D $*-with-libinsn.so.pout \ $(QEMU_OPTS) $*, \ "$* on $(TARGET_NAME)") diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.target index b0a2128980..a053ca3f15 100644 --- a/tests/tcg/i386/Makefile.target +++ b/tests/tcg/i386/Makefile.target @@ -61,7 +61,7 @@ endif # non-inline runs will trigger the duplicate instruction heuristics in lib= insn.so run-plugin-%-with-libinsn.so: $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin ../../plugin/libinsn.so$(COMMA)arg=3Dinline \ + -plugin ../../plugin/libinsn.so$(COMMA)inline=3Don \ -d plugin -D $*-with-libinsn.so.pout $*, \ "$* (inline) on $(TARGET_NAME)") =20 diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Ma= kefile.softmmu-target index 9896319f0e..2afa3298bf 100644 --- a/tests/tcg/x86_64/Makefile.softmmu-target +++ b/tests/tcg/x86_64/Makefile.softmmu-target @@ -38,7 +38,7 @@ run-plugin-%-with-libinsn.so: $(call run-test, $@, \ $(QEMU) -monitor none -display none \ -chardev file$(COMMA)path=3D$@.out$(COMMA)id=3Doutput \ - -plugin ../../plugin/libinsn.so$(COMMA)arg=3Dinline \ + -plugin ../../plugin/libinsn.so$(COMMA)inline=3Don \ -d plugin -D $*-with-libinsn.so.pout \ $(QEMU_OPTS) $*, \ "$* on $(TARGET_NAME)") --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163066067199980.19345205334662; Fri, 3 Sep 2021 02:17:51 -0700 (PDT) Received: from localhost ([::1]:42712 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5KY-0005vF-6i for importer@patchew.org; Fri, 03 Sep 2021 05:17:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57F-0006Tg-GT for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:05 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:47045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM57C-0005ik-Oq for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:05 -0400 Received: by mail-wr1-x42c.google.com with SMTP id x6so7159840wrv.13 for ; Fri, 03 Sep 2021 02:04:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f17sm4829325wrt.63.2021.09.03.02.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 683511FFB4; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GrGtDf2HVWGiASARI4Tm+w/Zub0VNBXRgvn0lkzCIm0=; b=OG2tUEas94EA+PZenVwSYKyRMEePFJ9bXvJPqtm6jmojAxN3WgHun2fzCQ1YmtWJNd kwds8m94eJGa+JJkkqtlw9Hy1zZF4xGG9gXDRrEUzx6viNchx9M5ZhTGGjhlthy0VRQ2 LXbNEilk7UX+QCQMSPonehEnTTBF1+LPckcue1ShAzuxzslvdDwQMru8o4g9lp/QTzKk Rg3G5d7rnsZeeEiQJd0nb6x/u+ezYPF+uvqNSt4UgfX5AR2GaHR/VfhwuUMagVl1jZUW YPJJGnR+r/79BePj2nQ98JMQfO2hPkylSVacreM2YwmnP/egJHuEfjGOOnNRsUJXuIee diGA== 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:mime-version:content-transfer-encoding; bh=GrGtDf2HVWGiASARI4Tm+w/Zub0VNBXRgvn0lkzCIm0=; b=jYZouceeBxmnidcJ/1nmkU37CFsUNXXuhzpSXCAJ7DTUWrnvwErKJnlVbYl+wq9C/e QY9R5wMyX6akyHl6Q6o4RhJnWPHZwj8pKCRjt5PZIN5UYzERo5u8anKAAubSATLWbIJY X5bMwdZseK/P+GPa6Dvwy3l7GYu8XN/SdvrusCM0xMvVtAsHpl1vJC++0fqoCboxPfnV UTDxwWG/7x3kG+clMXzFZqeepkR9dtI3oS2rNopoyWjFhdejGAb4I/I6GozCboYqPxPA 1hYT5OGGqPCwgnFuWhZOm+SDjDgDsb0LnrYIOr0pgMHF/vmp4o1c8Mr6BK7o7dn7H2Lb AGbA== X-Gm-Message-State: AOAM531JwJI6gWY1TSAAO9sCygtaGyYaLXrfAgUslgUK7Muv7YVrIgTP UWltj1mjpExXiGAuIFoKZMkulg== X-Google-Smtp-Source: ABdhPJzfIe3VfzBV1+mHa0c4I0Zh/5dHEYeCBkv6+/cMkjpTrmyNxH07dotVW3595jCQlw2TkMu44g== X-Received: by 2002:adf:f490:: with SMTP id l16mr2749048wro.136.1630659841315; Fri, 03 Sep 2021 02:04:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 19/22] tests/plugins/mem: introduce "track" arg and make args not positional Date: Fri, 3 Sep 2021 10:03:36 +0100 Message-Id: <20210903090339.1074887-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -1 X-Spam_score: -0.2 X-Spam_bar: / X-Spam_report: (-0.2 / 5.0 requ) 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660673876100001 From: Mahmoud Mandour This commit makes the plugin adhere to the new plugins arg-passing scheme by expecting full-form boolean args instead of short-form booleans. This necessitates that we introduce a new argument, here "track", to accept "r", "w", or "rw". Also, it makes arguments not positional and we only care about the last value specified for a certain argument. callback/inline args are now supplied separately as bool arguments so that both can be enabled individually. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-12-ma.mandourr@gmail.com> diff --git a/tests/plugin/mem.c b/tests/plugin/mem.c index afd1d27e5c..4570f7d815 100644 --- a/tests/plugin/mem.c +++ b/tests/plugin/mem.c @@ -80,29 +80,40 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc) { - if (argc >=3D 3) { - if (!strcmp(argv[2], "haddr")) { - do_haddr =3D true; - } - } - if (argc >=3D 2) { - const char *str =3D argv[1]; =20 - if (!strcmp(str, "r")) { + for (int i =3D 0; i < argc; i++) { + char *opt =3D argv[i]; + g_autofree char **tokens =3D g_strsplit(opt, "=3D", 2); + + if (g_strcmp0(tokens[0], "haddr") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_haddr)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else if (g_strcmp0(tokens[0], "track") =3D=3D 0) { + if (g_strcmp0(tokens[1], "r") =3D=3D 0) { rw =3D QEMU_PLUGIN_MEM_R; - } else if (!strcmp(str, "w")) { + } else if (g_strcmp0(tokens[1], "w") =3D=3D 0) { rw =3D QEMU_PLUGIN_MEM_W; + } else if (g_strcmp0(tokens[1], "rw") =3D=3D 0) { + rw =3D QEMU_PLUGIN_MEM_RW; + } else { + fprintf(stderr, "invaild value for argument track: %s\n", = opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "inline") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline))= { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; + } + } else if (g_strcmp0(tokens[0], "callback") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_callback= )) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); + return -1; } - } - if (!strcmp(argv[0], "inline")) { - do_inline =3D true; - do_callback =3D false; - } else if (!strcmp(argv[0], "both")) { - do_inline =3D true; - do_callback =3D true; } else { - do_callback =3D true; + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; } } =20 --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630660985603423.600670084665; Fri, 3 Sep 2021 02:23:05 -0700 (PDT) Received: from localhost ([::1]:32882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Pc-0001jW-GH for importer@patchew.org; Fri, 03 Sep 2021 05:23:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM57K-0006YM-PJ for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:12 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:36737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM57E-0005lJ-MU for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:04:07 -0400 Received: by mail-wr1-x42d.google.com with SMTP id q14so7180426wrp.3 for ; Fri, 03 Sep 2021 02:04:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k14sm4124243wri.46.2021.09.03.02.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:03:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 732981FFB5; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rctBFtmR+dPbwtBUWAW00cSmCz1yMMhGQfbKWbQXJww=; b=Fr1STz58etTag+mpOkNieMCu+pUwUCdb8jGtW68Nis66iws5MyW+UOBwaYN4Y17Juv gsdSyGNP/dC15kRpYGJnVCgfMkTK2poVzMYuWld7lg5pSkwEJra8Z3J3+QItCocn+ZwT QPSMZrwPCYeKLLsCIYQNTltDazE5hHiqSnJHmj2gntxg0F/2uFEK92hL30v1fNVtguQa Vs/QO1rZutvE9B+Y2/uewuXmlxQhanC3KbCANFQTGPVjP+14jotA3S/aNyCmtXwAM/bc pdmu2IoywYavqMQOg+wUej7BKbFEeLkNpvCb0y4VaFg10uzu4EqqM0wUtfSNi8ocQvmM IWkA== 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:mime-version:content-transfer-encoding; bh=rctBFtmR+dPbwtBUWAW00cSmCz1yMMhGQfbKWbQXJww=; b=YIoNWW5TcCL0kUKTSKPQ7r1AveBovaoooPwzoL77XNENzv5sKNk3hYsfP/sZK5uOPs Rx2O3PgaEYMUpggTLUXV4KIuk/tjaj/h6yXZ3EwnGkCkL2v6oXdhB9yXoRiDvC3UeLMu WyBaos2CxNke4egXu6Dnce0je4NA7rbbWTZIvub9faAZ0YZf6zfih/DQ2WgMgreciS9J GZyO1NheNLeHhmvIZFjR34dTmbXl9GxbFlXTL5uwHOkSDSMtLdpn75Boy1rwgOr5QrZR P1vAA8BiGaUpgB5zD9WwrHnq5bnC62dJBJfCoEbLiioi1PrC/IK+cEbgVoyPw8LXblqq XsTQ== X-Gm-Message-State: AOAM5329GxBOIGS4Z863ZukR9FhlhYhbRLeVbSdCF8IAr3e9jsT/eKxa w+Rh1BI5bAv9xtFTWgYTJPxaGA== X-Google-Smtp-Source: ABdhPJz88OXfpPNIO6GeLmsGf6N+XujA3XtQtJoH0qz1vbdRRy05u3YGa1CBwSV7YcGG2miUlfkQdA== X-Received: by 2002:adf:a2c4:: with SMTP id t4mr2832210wra.258.1630659843258; Fri, 03 Sep 2021 02:04:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 20/22] tests/plugins/syscalls: adhere to new arg-passing scheme Date: Fri, 3 Sep 2021 10:03:37 +0100 Message-Id: <20210903090339.1074887-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630660986169100003 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210730135817.17816-13-ma.mandourr@gmail.com> diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c index 6dd71092e1..484b48de49 100644 --- a/tests/plugin/syscall.c +++ b/tests/plugin/syscall.c @@ -119,17 +119,26 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc =3D=3D 0) { - statistics =3D g_hash_table_new_full(NULL, g_direct_equal, NULL, g= _free); - } else { - for (int i =3D 0; i < argc; i++) { - if (g_strcmp0(argv[i], "print") !=3D 0) { - fprintf(stderr, "unsupported argument: %s\n", argv[i]); - return -1; + bool do_print =3D false; + + for (int i =3D 0; i < argc; i++) { + char *opt =3D argv[i]; + g_autofree char **tokens =3D g_strsplit(opt, "=3D", 2); + + if (g_strcmp0(tokens[0], "print") =3D=3D 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_print)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", o= pt); } + } else { + fprintf(stderr, "unsupported argument: %s\n", argv[i]); + return -1; } } =20 + if (!do_print) { + statistics =3D g_hash_table_new_full(NULL, g_direct_equal, NULL, g= _free); + } + qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall); qemu_plugin_register_vcpu_syscall_ret_cb(id, vcpu_syscall_ret); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 163066062298081.66130167248969; Fri, 3 Sep 2021 02:17:02 -0700 (PDT) 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-114-QnZWHQo6MkCuBQ-iL3wr2Q-1; Fri, 03 Sep 2021 05:16:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8EE168145E5; Fri, 3 Sep 2021 09:16:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5884A5D9F0; Fri, 3 Sep 2021 09:16:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EBBA61809C81; Fri, 3 Sep 2021 09:16:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1839CHKX001322 for ; Fri, 3 Sep 2021 05:12:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4FC4F19B336; Fri, 3 Sep 2021 09:12:17 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A0E819A753 for ; Fri, 3 Sep 2021 09:12:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B459866DF4 for ; Fri, 3 Sep 2021 09:12:14 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-437-t9KuCgJwMZKfWeTgNnM07g-1; Fri, 03 Sep 2021 05:12:13 -0400 Received: by mail-wm1-f48.google.com with SMTP id k20-20020a05600c0b5400b002e87ad6956eso3106484wmr.1 for ; Fri, 03 Sep 2021 02:12:12 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x11sm4117905wro.83.2021.09.03.02.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8E1141FFB7; Fri, 3 Sep 2021 10:03:41 +0100 (BST) X-MC-Unique: QnZWHQo6MkCuBQ-iL3wr2Q-1 X-MC-Unique: t9KuCgJwMZKfWeTgNnM07g-1 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:mime-version:content-transfer-encoding; bh=z7c3CQhXYMZaS6qp/bjoVLss0w/WAp6ZgK2nwF/t3WI=; b=NpouNY38fhWNlhOkpPrhAeXaYBNeotTTGQ745x3Wi4LW+tlHmITD1h1sM7PI4dsCwP vQi/h1PpUiciLvH6YxyruFVbCkM64CNgKszzGndoNl+dZEJFnOdqnMTAjS1pGV80E0fh NH4ozIUXXWKTKy+0+eFYUty65k1ycNgK1ELJzLY9R4lchk2zrdvqv1/U0ilwVhAicMZ/ 9tjC6PS3Q3uWpC95vAt4apqoQYMpcPs/tD/GHPSdMwyfp2YU5FEVxjXf1qdsH6ancIDI his5paUpid2VAsWIcsjYgV+sxS7pQrbn5EyQlMMuNAEX/TWxun3gJBuRUOEBtAl9GknK Xtvw== X-Gm-Message-State: AOAM532nMrbCEoY47oIyHhGAM+LDNdH1oLWvNVTgy9i5kvP5pxca2thH lKLpUhqlYZPeC/2Bx7JMXBlfVg== X-Google-Smtp-Source: ABdhPJycqMHB6oVvdAFj+BlwLwkOW/tvam4HYLi1i3J4hSc/rMyCQZJFn27UghX7AXq6TmDNBnNYag== X-Received: by 2002:a7b:c94f:: with SMTP id i15mr2276916wml.58.1630660331738; Fri, 03 Sep 2021 02:12:11 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 21/22] docs/deprecated: deprecate passing plugin args through `arg=` Date: Fri, 3 Sep 2021 10:03:38 +0100 Message-Id: <20210903090339.1074887-22-alex.bennee@linaro.org> In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: "reviewer:Incompatible changes" , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1630660625183100001 From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Message-Id: <20210802134414.52037-1-ma.mandourr@gmail.com> Reviewed-by: Alex Benn=C3=A9e [AJB: fixed up move of deprecated.rst] Signed-off-by: Alex Benn=C3=A9e diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 1e1a5e96ad..6e88a84bba 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -139,6 +139,18 @@ The ``-no-quit`` is a synonym for ``-display ...,windo= w-close=3Doff`` which should be used instead. =20 =20 +Plugin argument passing through ``arg=3D`` (since 6.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Passing TCG plugins arguments through ``arg=3D`` is redundant is makes the +command-line less readable, especially when the argument itself consist of= a +name and a value, e.g. ``-plugin plugin_name,arg=3D"arg_name=3Darg_value"`= `. +Therefore, the usage of ``arg`` is redundant. Single-word arguments are tr= eated +as short-form boolean values, and passed to plugins as ``arg_name=3Don``. +However, short-form booleans are deprecated and full explicit ``arg_name= =3Don`` +form is preferred. + + QEMU Machine Protocol (QMP) commands ------------------------------------ =20 --=20 2.30.2 From nobody Wed May 8 21:47:24 2024 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630661062324553.839028442928; Fri, 3 Sep 2021 02:24:22 -0700 (PDT) Received: from localhost ([::1]:36106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Qp-0003tU-Nz for importer@patchew.org; Fri, 03 Sep 2021 05:24:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM5F2-0003XP-A6 for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:08 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:46024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM5F0-0003sg-FQ for qemu-devel@nongnu.org; Fri, 03 Sep 2021 05:12:07 -0400 Received: by mail-wr1-x42d.google.com with SMTP id n5so7187860wro.12 for ; Fri, 03 Sep 2021 02:12:05 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v62sm3797316wme.21.2021.09.03.02.12.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 02:12:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 992731FFB8; Fri, 3 Sep 2021 10:03:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Gz/8308YhmTTLG+j1+k+Mkb0OBIL4Jjcw0DjoEOP9c=; b=yo5tq5YGNM5/GhAh6J9lSHN0KYvWibyWFnQI93pIIuY7rnYW2MfNo26mivKjoXlJu2 vKMKkLvJkpfOq3gB1/h/+MbHV673SPZioAMSNQmiqnV8AwXckAIKL8nvGn+/IMJjSCda dG9PcGuZvbc8RlQ05y3TGOl1BcjrK94jKTw980zLjHdrYLMD9l6X4HV2KuNfpIZ12ypI nWc5sdLOw1LJt3ynvi7GW+ZfBGbJiT84cEk5MtZbLYOoqPTlr+CvENbvwcPOmWDlItk9 wD19qGN27s1ynJHjnQppzqU2dAl4R06UCIyj3tRrVra6OsfcjteWq3VvDMZkz8RE5GCK 8kKA== 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:mime-version:content-transfer-encoding; bh=4Gz/8308YhmTTLG+j1+k+Mkb0OBIL4Jjcw0DjoEOP9c=; b=XAgG3fkqhtWnWTeGO2AhQZ2wWkh/Z8iGuLEd9XAVnkk5HMwSrlFov9k5RUSFjkqLq8 LOdOlKSHpuNerH0Ivg50cX9TXYkimRVc+jEfUjBtet8fzCypP5o8ujajrLGDRFbP2kUQ /Hyqbx2OHNXfRIFXLI3P2eZkfiOD1RS0xqvo8D/VIDz/ySwpyGrjEU0Ean5qIh+3UQ2Q cYilPLeB6lBPCQngGU2G6L9z3hftmjTsY42lIu1tngKbwOQ5R64QbN/HFM/l168b2sCP e0cTsHrq/fJw4AHdFCZjmom/YQF7ZV33Zwvfd41ObAqERZOiTiFo6HXkpNSeKjuodMPz FFQw== X-Gm-Message-State: AOAM533hcBRgLzHcq3A8l1j2H6FnOI9NsAbXtLt5/IXrSxIbJksd8q8F cYtcelqBDVgd7YNUwJPRRgBzdw== X-Google-Smtp-Source: ABdhPJwqDGRkjWB4xXlM7zbgy2a3wxstHDYsCzsJ5VKbfLqfAmoM9hDVjowf04IZdbc+nFdCnTE3jw== X-Received: by 2002:adf:d0cf:: with SMTP id z15mr2855587wrh.356.1630660324585; Fri, 03 Sep 2021 02:12:04 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 22/22] docs/devel: be consistent about example plugin names Date: Fri, 3 Sep 2021 10:03:39 +0100 Message-Id: <20210903090339.1074887-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210903090339.1074887-1-alex.bennee@linaro.org> References: <20210903090339.1074887-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Iooss , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630661063154100001 From: Mahmoud Mandour Some plugins were prefixed with `.c`, some were not. Since the name is essentially the full-name of the plugin file, it's logical to include the extension. Signed-off-by: Mahmoud Mandour Message-Id: <20210830121534.656559-1-ma.mandourr@gmail.com> Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index fcc460bf7b..dac5101a3c 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -301,7 +301,7 @@ which will eventually report:: previously @ 0x000000ffd08098/5 (809900593 insns) previously @ 0x000000ffd080c0/1 (809900588 insns) =20 -- contrib/plugins/hwprofile +- contrib/plugins/hwprofile.c =20 The hwprofile tool can only be used with system emulation and allows the user to see what hardware is accessed how often. It has a number of op= tions: @@ -360,7 +360,7 @@ which will output an execution trace following this str= ucture:: 0, 0xd34, 0xf9c8f000, "bl #0x10c8" 0, 0x10c8, 0xfff96c43, "ldr r3, [r0, #0x44]", load, 0x200000e4, RAM =20 -- contrib/plugins/cache +- contrib/plugins/cache.c =20 Cache modelling plugin that measures the performance of a given cache configuration when a given working set is run:: --=20 2.30.2