From patchwork Fri Sep 3 09:03:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506478 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp823925jai; Fri, 3 Sep 2021 02:09:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQCVh98ernYM9voxw6yS9iIwo8iVQHhbRRLkRuFUegVEE8aoZPeUYRvMfUsxWuXoxNIQiv X-Received: by 2002:a25:aa73:: with SMTP id s106mr3390109ybi.119.1630660144896; Fri, 03 Sep 2021 02:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660144; cv=none; d=google.com; s=arc-20160816; b=zrnZWUm/2KJ0Wy3HXdI6e05wtWT95BnwzTCiMMlw/d6RBtsRnS8d89iJBTtiZIr3P7 7IcQmLDsxmZTJeE/PgfY5iW8PKx2EEECvN+7L+bg4QQS6j9JnSkqaPsCbRn1ZMkWAyIv jbIKoycTIgwOArKU1oibrEZikfxX8glHF3PPPa7t3uhLe3nxTi8EoXKrfxPYT01C/GYZ +uNKhkOPiCQ+NB8w1fdPRanU0zTykjswh5XHRWasNpZmzt3oEKn5LKVKzOp1Ikhq1bCU q+FwcLna8yH1vborxizrEK77FcIburSS8V3FVeax4F/sf8KTwokoCog4S4Jk8AM+m7rF XeTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=6pTYsL1Hep9qUvvKYQw3eO5QWV8nz4ZZRsJUYLQf+Cw=; b=oZfNFBQrkt00yv6Guy6T1/4phnev950Z019ahfS5dMKqqY52GecJYVA09YMZQYPw+l HRyqY89Qf8DO0s52zkyf4SkEHxR3qQdulqM02+5hi/WYdKCFkbAljUw9RYP4TLNTI7d0 gH7Z1B98q9Xt6qejHaYs4bYTLlq8imFrIYYolgikQ+zA426BJKGxltdIW9gup9bQ9wTV vsPm+v74w3WdJjBjDheBFny66Rhq4Iuxmz7IndZuB8s70dS2wAI7kfdAnbpc/fsW627G cy9HqzRz6A4HmL80rVotrHolcXNdXwcW+tFr3nOhJ++AuS2Tsi0q+1ZQzQslMqpERZ+C r7Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YUC7Fc2s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z88si5918018ybh.76.2021.09.03.02.09.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:09:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YUC7Fc2s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5C4-0003OA-Ac for patch@linaro.org; Fri, 03 Sep 2021 05:09:04 -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) 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-Received: by 2002:a05:600c:3641:: with SMTP id y1mr7220019wmq.181.1630659823158; Fri, 03 Sep 2021 02:03:43 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Signed-off-by: Alex Bennée Message-Id: <20210803151428.125323-1-ma.mandourr@gmail.com> Message-Id: <20210806141015.2487502-2-alex.bennee@linaro.org> Cc: qemu-stable@nongnu.org -- 2.30.2 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"); } /* Store new instruction in cache */ From patchwork Fri Sep 3 09:03:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506475 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp822203jai; Fri, 3 Sep 2021 02:06:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx42a7tSeimDbiEhXHt48iUdrmej8sLfj7IF75qv0DKMZav4iRsgYEB5RM2Nmmo12XhVcCM X-Received: by 2002:a05:6102:2416:: with SMTP id j22mr1664489vsi.19.1630659984241; Fri, 03 Sep 2021 02:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630659984; cv=none; d=google.com; s=arc-20160816; b=QvJoXpnTejyFt2B/g8Vb0iZv8B5wyCAGoUBlkjMftGocHlL2VMsIdDdvWlpSF/8JVD e1jZjV3GHlrRdNjD5wiAOnubTbsODHZRt47Ko6NiS0UjtBzsUmoPADFdsmMGLf0Erd4+ 25sJpodcl3uKjzGfyaj/f8bNd+Op8sV1dU0dmwlByi6b469woGFPMgZ7gk1uBDb5LeTq XBVVdkwYpnYM98rOj6BFhhBcBnwFq+eXFgFpqq50ih5EPdNXDBsgxOYisnVdlTj7p/u+ RaJDCZGwe9OtdOYIQO4blCEwVlZAn5Zp/wCBVfdz2RaUUyRQzizqcX7sRjRgbSvb+xSt SWrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=GPJMbPb/00tFTVR36+R0IPNgIkKT7YfEwaVVfGYX3DQ=; b=FmB1ljIHo6p2u2FtcdYhctlyZGTq+An1j0o19gjFsPfySHLS2uIODo4JpbzHOOol9N jnRdZ/gk8ppZoZRxWzG7CFk9NmCKUkn/dy/Boue01bLJ2NWOSMbTcfweIEnEkq8nTpEO ecAUG6yyvXEL6ipTOtdYLFPW93+EftYV2jJ89TGigpdkrDSO0JwkrJzjDZ4bYv5qKDCY 30MYWc4Mtf4DOT+FoWejSvnpEKY8S3/qEom34bp9sEoMmnRJAJBtDgukvnM9OW5azb1G oD9tUgOwFoMC3/T1EAewvG51bfeQflg0d1B0UmDAeAoFbjyOnUD7HN88fsRbBstY84Du aA3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T/l5pdG8"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j191si2201664vkc.34.2021.09.03.02.06.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:06:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="T/l5pdG8"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34552 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM59T-00064p-Gv for patch@linaro.org; Fri, 03 Sep 2021 05:06:23 -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) 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-Received: by 2002:a05:6000:1627:: with SMTP id v7mr2861866wrb.54.1630659825962; Fri, 03 Sep 2021 02:03:45 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20210806141015.2487502-3-alex.bennee@linaro.org> -- 2.30.2 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 -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=slow - # 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=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-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-softmmu + sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user + MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow build-libvhost-user: stage: build From patchwork Fri Sep 3 09:03:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506476 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp822450jai; Fri, 3 Sep 2021 02:06:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfrHxdDkQFhTDK6CL3dHrLZSC4j+cz3lXSMjNnunnQb9TVbp9Wqc3iXxo7mDc4Lh4VtLua X-Received: by 2002:a05:6102:3e8d:: with SMTP id m13mr1557347vsv.57.1630660003572; Fri, 03 Sep 2021 02:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660003; cv=none; d=google.com; s=arc-20160816; b=KHP9wKm8xgQgxDUibyYdAVTQgVccpZGi25g1niTdvqW13JP4BC1xDKq0W3qt3TdmfV 7pO/Sf+SSA3A/cE3KoPJ65/ZYNxENvruvBF55FU7f/K1Vvdm9V7m97ZkGYSNcOmxY+uF Qx4aC1Ria2TPMK6aze7x24nwcM3WYXgxpcWDb0xAf+wCBOcivEtNCdXy1wYCn1AScWkA fF/k2NRGZvkFUYOlrwFk+UCacW2NiuPAsFwHy4WxNds2fT2qcJ4sluGhdyezJb3mv6WB LQXVfkDxGZylPRWciNhcSJsQ4x0WXkYWRwEho69lc6wlETWA/QAHwjs+dUWeyME+vu2b z5LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=eApeYrApbfWiu3vQv6rtu4BHNUrQ/4BvHORTpCt0Hq0=; b=DWSWspmC/NOXDcI0l/y1eY5g0F5Lbtu3VAfIwTaL+rbBHEeFzqYtTc/R2F/VC+Lr2n 1P414xmh1dGcjXqEY9uvTpV1cnsHQNxogAJ1Bl6sIUaSLVDGFdSpwrjy9zz5/15irikS +n3NEWuV0I6Ramwl26DsQ35QJ/hyO4ZxGaRhGb3Y1sdj7akNUtET6q2mI7GH9I0NgUG+ Boh5Zd5GYlv0B76sxftulnRxVHOwG9cZCkqjmCFfvzAj5BU3mUWFR6SFMUcaHDqHYtdT w/54Iiow+CaABwzHJeR8TnCXpNz9wMO4z8i3HoKZUSYzs6q72C/UmLmUWb4Ebk4orHp6 w5Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LbJzmcEi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n13si2079808uab.202.2021.09.03.02.06.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:06:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LbJzmcEi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM59l-0006go-Tv for patch@linaro.org; Fri, 03 Sep 2021 05:06:41 -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) 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-Received: by 2002:a05:6000:1c4:: with SMTP id t4mr2762347wrx.414.1630659825126; Fri, 03 Sep 2021 02:03:45 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20210806141015.2487502-4-alex.bennee@linaro.org> -- 2.30.2 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 From patchwork Fri Sep 3 09:03:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506480 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp824271jai; Fri, 3 Sep 2021 02:09:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd7ip1T8UFo9gZazWwY7sgDxCvan5YGNj1Pfc6r3+uyyhvt92bcptVjVyw5I58ovxGOhV7 X-Received: by 2002:a67:c381:: with SMTP id s1mr1848663vsj.24.1630660175299; Fri, 03 Sep 2021 02:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660175; cv=none; d=google.com; s=arc-20160816; b=XZsG3ME2n6BaphVa/LZfdHCx5gdUlG2VGCElyrvo9cStxUCeCArIXVRnCplWYJYX+Y oTLLkYKnItefU1qT1rNJ8/nPPRT4vw/gsCAW52q215a9nKMKKJ8OOD+Vg88YRVgPJmky NuhfMRNWqMoLJ3aMHLarXDIv3fh0BVl40Ux3HmxPsXXBqkpHf22hLSkps0DF7wWl4Nns cuFH32mzwxYrh3w8Z6Hj0TaheTdRiAi/L9uOFliqxowEIxr0USjjq3tCmi4i3XyGQPnB ooRG/HSEMlWTRgx7/Unjnd23rT1DnD+h3VPAiYJ8+4Puj3+HYK3ub36s+ktZEyE5gwfi yKxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=KKnSH+lDAvOjNQH8hqEes6n/qTsZNa6jN/zhCFc0/UU=; b=h6hEKj8nWzFr51FBe+RHX4zMjzIdtfw/PpqbGJc5ql9NyZ2JCxg6x0cbz3TiQdgMdy MKNyxhEX6s89qYv9YTNHoojXlMJbisW77q6+cYamNDzIu2muXZJ6mq2ceFya9DDh3xP3 j5knPVUZJDvSpjKhguwNkwB1cTfTcP2hsADSyel0iisSAKJ0/cHfo7HISxjqPmpVnV1N ITMeG0hQotgdStYorjwSNB2wSGs3YeN+oOGTRUiYCBkRejyBEA4nvntaBvXs9s7pre2U 6WOlxoXbzx319KoB9NhCehSNHlRSnknhmqmZqZaTq20DOP2mQzqdQ/yjk2lrl3iT91ml f5xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vXdQPPqD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x8si2150000uae.21.2021.09.03.02.09.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vXdQPPqD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5CY-0004Hk-JS for patch@linaro.org; Fri, 03 Sep 2021 05:09:34 -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) 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-Received: by 2002:adf:9f0c:: with SMTP id l12mr2940227wrf.146.1630659828175; Fri, 03 Sep 2021 02:03:48 -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) From: =?utf-8?q?Alex_Benn=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 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_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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é Message-Id: <20210730143809.717079-4-thuth@redhat.com> [AJB: moved due to docu changes] Signed-off-by: Alex Bennée Message-Id: <20210806141015.2487502-5-alex.bennee@linaro.org> -- 2.30.2 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. +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 == "qemu-project" && $CI_COMMIT_BRANCH =~ /^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 those libs in distro supplied packages @@ -157,7 +157,7 @@ ubuntu-20.04-aarch64-all: - aarch64 rules: - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^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 == "qemu-project" && $CI_COMMIT_BRANCH =~ /^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 == "qemu-project" && $CI_COMMIT_BRANCH =~ /^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 == "qemu-project" && $CI_COMMIT_BRANCH =~ /^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 == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/' when: manual - - if: "$S390X_RUNNER_AVAILABLE" + - if: "$AARCH64_RUNNER_AVAILABLE" when: manual script: - mkdir build From patchwork Fri Sep 3 09:03:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506485 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp827465jai; Fri, 3 Sep 2021 02:14:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwApHuXbTHFr7nNRZ5IbnaReaXH9OYpvGTibU0bCCSRH0hNiyhOXTbxWBud2RnwaU2Gq2ew X-Received: by 2002:a05:6102:31a5:: with SMTP id d5mr1779061vsh.23.1630660478220; Fri, 03 Sep 2021 02:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660478; cv=none; d=google.com; s=arc-20160816; b=BOABG1gcKiQoGIkk4QgH6yaupA6MChocgw4gbNIqbTDyxbl0YBuwTe9JPcFrb5PV3t SsyzyUjHEcSNHTaCIRHB2TlAZnZttlkmeE6xVxeXbyE6xqwxcUui2s3Siu9Svs2648fi I5tu+iFTI6RGl+SQFIZFuZn2SM5qrMi/nEd88HeQ5fTz9z96zUcYngVCqfseyS2R12AX +mg3kLfuiXDLrKkernC7M8bnjaIOLUa9lOivzo/f7bDgOg39xRgSjyafoRiCvAQI0gH9 6eNLx82GULu1I9u3j6QGsUkzp2iK0LoS2IcPLgbbTE4ZDlIH/0XsNlkVs1CgeVHzoeUc T5YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=RyVojjuqH6WORlMZZGsMkQpTfSUfAqc9uy3n8opotoQ=; b=iRqAzxGj0YcU2ZeUcZeGPAqaA6HiUzPy4rWJITSiOSE+OM8LqYgl603dsgJRmPNdb+ q0SUx2NSk6PijDT5OInHRtVxqAz634FqGxgDr2auVXQU0k1/XLJvH9CIXYc3zSbDonCH COIfbjAy6zPqfIyde1waHHKzNk7KfZ8w12Fh7G7FObYjZOUolqFh2Frv4YPw18+qexTJ 9yLuOIA/qpBBNr7LWPNKwqaVbsuIQXfKlsh7Hr94AjdvSJ9EmIqL89EvcYS71sxRdSU7 S4iPcrv87kkiS0bjJf6dFz8sjMIlqN2SuW25zX8RA+eZNYNq/lLYkkBR8JlvkDkobMHu WG+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZVZ9CrTk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s15si2128473vsh.195.2021.09.03.02.14.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZVZ9CrTk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5HR-0006tB-Ik for patch@linaro.org; Fri, 03 Sep 2021 05:14:37 -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) 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-Received: by 2002:a7b:c014:: with SMTP id c20mr2247867wmb.81.1630659831192; Fri, 03 Sep 2021 02:03:51 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini On Mac --enable-modules and --enable-plugins are currently incompatible, because the Apple -Wl,-exported_symbols_list command line options prevents the export of any symbols needed by the modules. On x86 -Wl,--dynamic-list does not have this 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 plugin_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 configurations 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ée Message-Id: <20210811100550.54714-1-pbonzini@redhat.com> Cc: qemu-stable@nongnu.org -- 2.30.2 diff --git a/configure b/configure index 9a79a004d7..7659870810 100755 --- a/configure +++ b/configure @@ -3187,9 +3187,8 @@ glib_req_ver=2.56 glib_modules=gthread-2.0 if test "$modules" = yes; then glib_modules="$glib_modules gmodule-export-2.0" -fi -if test "$plugins" = "yes"; then - glib_modules="$glib_modules gmodule-2.0" +elif test "$plugins" = "yes"; then + glib_modules="$glib_modules gmodule-no-export-2.0" fi 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 = ['-Wl,--dynamic-list=' + (meson.build_root() / 'qemu-plugins-ld.symbols')] -elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host - plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() / 'qemu-plugins-ld64.symbols')] -else - plugin_ldflags = [] +plugin_ldflags = [] +# 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 = ['-Wl,--dynamic-list=' + (meson.build_root() / 'qemu-plugins-ld.symbols')] + elif 'CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST' in config_host + plugin_ldflags = ['-Wl,-exported_symbols_list,' + (meson.build_root() / 'qemu-plugins-ld64.symbols')] + endif endif specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files( From patchwork Fri Sep 3 09:03:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506484 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp827046jai; Fri, 3 Sep 2021 02:14:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbPXsw/5YXESeBoyrLeNt+J7NTwyUb1Z7AlJ89oIFQVj48dm5mNzFT4r1BwwuupMf2nc5t X-Received: by 2002:a05:6102:2416:: with SMTP id j22mr1691683vsi.19.1630660440722; Fri, 03 Sep 2021 02:14:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660440; cv=none; d=google.com; s=arc-20160816; b=NAVjHJjcMEHfdJtb3mtzkM/gv/C05Gy8AmbnP2i0lQFNxrQbKkSMZy9zSU57Vose08 tBNzVlv9VKotm4o9x7RgeeDKmG+hIb66bjE4+tPhC3W2LZfCNJMvtUvLVrb34tkaIPfl 6ehaMpAtwamyeBvoYV4EzwtyIxhBf4dOOniql+W9tsBbxrVFtrotKGkKvS3oarRRhCR2 /lRZcA3OdP+6EjucHnbO/9a81ltVEKQaodoVgarb2fTH+1tDfucr1sRhOc217dZ/mxkI aWbbUDcQGpLCTy1uaUEGmsQd8waPF6vQmd2FJxISoKnDtKYZIBndUt0AvImTtblckDWX VQuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=nmOXcmKk0XvDznE6oW/gFfY7dG0lGaTYlfhMcC+RlKg=; b=UkOejRyWIDGbK7x8pzdpj+d+ZcXYmKY9/XbohFDzW2hAxzOKInIYtd3/2RhgdCrXiu nB4Wh78TWm6Q317IknYGOCsFu61qSgJpxhnl3IQ7FGos86Bok8L6sTotFGSSE/FUDcD8 Gh8C0iz7EY9DSqB/QCIyTllnaXJJbL5UBMQxidHIFxKcxezC5NAAAmlVewmuv95zqhDj uStpQvGzALM39Jx6gs7eh5ILjxfbAncA4PNG7e8UXfkR52ywuqYpIaB21rBG4TlRax2Q VGckDgD/BLzH7LpnWe02I/HWB8uj02zGQYPBOUBMeFcpswI8uQlxy3M1fY+GjE51DZAU krgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WiHyM356; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b13si1883981uas.42.2021.09.03.02.14.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:14:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WiHyM356; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Gq-0005v9-0l for patch@linaro.org; Fri, 03 Sep 2021 05:14:00 -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) 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-Received: by 2002:a05:600c:2e46:: with SMTP id q6mr7193693wmf.93.1630659837021; 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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=N`). 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ée -- 2.30.2 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 = QEMU_PLUGIN_MEM_RW; static GHashTable *miss_ht; -static GMutex mtx; +static GMutex hashtable_lock; static GRand *rng; static int limit; static bool sys; -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; 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); -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; static int pow_of_two(int num) { @@ -233,20 +238,24 @@ static bool bad_cache_params(int blksize, int assoc, int cachesize) 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; + /* + * This function shall not be called directly, and hence expects suitable + * parameters. + */ + g_assert(!bad_cache_params(blksize, assoc, cachesize)); + cache = g_new(Cache, 1); cache->assoc = assoc; cache->cachesize = cachesize; cache->num_sets = cachesize / (blksize * assoc); cache->sets = g_new(CacheSet, cache->num_sets); cache->blksize_shift = pow_of_two(blksize); + cache->accesses = 0; + cache->misses = 0; for (i = 0; i < cache->num_sets; i++) { cache->sets[i].blocks = g_new0(CacheBlock, assoc); @@ -263,6 +272,24 @@ static Cache *cache_init(int blksize, int assoc, int cachesize) return cache; } +static Cache **caches_init(int blksize, int assoc, int cachesize) +{ + Cache **caches; + int i; + + if (bad_cache_params(blksize, assoc, cachesize)) { + return NULL; + } + + caches = g_new(Cache *, cores); + + for (i = 0; i < cores; i++) { + caches[i] = 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, qemu_plugin_meminfo_t info, { uint64_t effective_addr; struct qemu_plugin_hwaddr *hwaddr; + int cache_idx; InsnData *insn; hwaddr = qemu_plugin_get_hwaddr(info, vaddr); @@ -361,32 +389,35 @@ static void vcpu_mem_access(unsigned int vcpu_index, qemu_plugin_meminfo_t info, } effective_addr = hwaddr ? qemu_plugin_hwaddr_phys_addr(hwaddr) : vaddr; + cache_idx = vcpu_index % cores; - 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 = (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]); } static void vcpu_insn_exec(unsigned int vcpu_index, void *userdata) { uint64_t insn_addr; InsnData *insn; + int cache_idx; - g_mutex_lock(&mtx); insn_addr = ((InsnData *) userdata)->addr; - if (!access_cache(icache, insn_addr)) { + cache_idx = vcpu_index % cores; + g_mutex_lock(&icache_locks[cache_idx]); + if (!access_cache(icaches[cache_idx], insn_addr)) { insn = (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]); } 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 qemu_plugin_tb *tb) * new entries for those instructions. Instead, we fetch the same * entry from the hash table and register it for the callback again. */ - g_mutex_lock(&mtx); + g_mutex_lock(&hashtable_lock); data = g_hash_table_lookup(miss_ht, GUINT_TO_POINTER(effective_addr)); if (data == NULL) { data = g_new0(InsnData, 1); @@ -421,7 +452,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_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); 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); } +static void caches_free(Cache **caches) +{ + int i; + + for (i = 0; i < cores; i++) { + cache_free(caches[i]); + } +} + static int dcmp(gconstpointer a, gconstpointer b) { InsnData *insn_a = (InsnData *) a; @@ -461,6 +501,37 @@ static int dcmp(gconstpointer a, gconstpointer b) return insn_a->dmisses < insn_b->dmisses ? 1 : -1; } +static void append_stats_line(GString *line, uint64_t daccess, uint64_t dmisses, + uint64_t iaccess, uint64_t imisses) +{ + double dmiss_rate, imiss_rate; + + dmiss_rate = ((double) dmisses) / (daccess) * 100.0; + imiss_rate = ((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 = 0; i < cores; i++) { + all_imisses += icaches[i]->misses; + all_dmisses += dcaches[i]->misses; + all_imem_accesses += icaches[i]->accesses; + all_dmem_accesses += dcaches[i]->accesses; + } +} + static int icmp(gconstpointer a, gconstpointer b) { InsnData *insn_a = (InsnData *) a; @@ -471,19 +542,29 @@ static int icmp(gconstpointer a, gconstpointer b) static void log_stats(void) { - g_autoptr(GString) rep = 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 = g_string_new("core #, data accesses, data misses," + " dmiss rate, insn accesses," + " insn misses, imiss rate\n"); + + for (i = 0; i < cores; i++) { + g_string_append_printf(rep, "%-8d", i); + dcache = dcaches[i]; + icache = 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); + } + g_string_append(rep, "\n"); qemu_plugin_outs(rep->str); } @@ -530,8 +611,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) log_stats(); log_top_insns(); - cache_free(dcache); - cache_free(icache); + caches_free(dcaches); + caches_free(icaches); g_hash_table_destroy(miss_ht); } @@ -579,6 +660,8 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, policy = LRU; + cores = sys ? qemu_plugin_n_vcpus() : 1; + for (i = 0; i < argc; i++) { char *opt = argv[i]; if (g_str_has_prefix(opt, "iblksize=")) { @@ -595,6 +678,8 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, dcachesize = g_ascii_strtoll(opt + 11, NULL, 10); } else if (g_str_has_prefix(opt, "limit=")) { limit = g_ascii_strtoll(opt + 6, NULL, 10); + } else if (g_str_has_prefix(opt, "cores=")) { + cores = g_ascii_strtoll(opt + 6, NULL, 10); } else if (g_str_has_prefix(opt, "evict=")) { gchar *p = opt + 6; if (g_strcmp0(p, "rand") == 0) { @@ -615,22 +700,25 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, policy_init(); - dcache = cache_init(dblksize, dassoc, dcachesize); - if (!dcache) { + dcaches = caches_init(dblksize, dassoc, dcachesize); + if (!dcaches) { const char *err = cache_config_error(dblksize, dassoc, dcachesize); fprintf(stderr, "dcache cannot be constructed from given parameters\n"); fprintf(stderr, "%s\n", err); return -1; } - icache = cache_init(iblksize, iassoc, icachesize); - if (!icache) { + icaches = caches_init(iblksize, iassoc, icachesize); + if (!icaches) { const char *err = cache_config_error(iblksize, iassoc, icachesize); fprintf(stderr, "icache cannot be constructed from given parameters\n"); fprintf(stderr, "%s\n", err); return -1; } + dcache_locks = g_new0(GMutex, cores); + icache_locks = g_new0(GMutex, cores); + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); From patchwork Fri Sep 3 09:03:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506483 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp825902jai; Fri, 3 Sep 2021 02:12:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwDKdxxOZcUO8cNoblYvUs1GKDjm+rPI4Irui8/omCo/G5DX2vNW96dyclUNF02s/tq4Ts X-Received: by 2002:a05:6102:3bcb:: with SMTP id a11mr1707855vsv.7.1630660330305; Fri, 03 Sep 2021 02:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660330; cv=none; d=google.com; s=arc-20160816; b=eVHsImexmDfQLFZ0vLdDDUNHArsdwPEvklSZhtlEjf0PD/4SKDz0TBJTDyWVbUDXzR Rka5hTQ+LeVr/NATaiZxb3cKjbLUPFyQmGAwhGKrhRzHrQtF6vFfFbCJn0J3v1suhNuP rYIwZiAdVXllF3KmHR3WDS4LPuSxbTKxCTOYt9ipj5DGFvv8gcqgpPrmT6yDCZKgUcCw o7DfinrI+Ksb7ed104MDwJnL4rujleWa5V1p9/I7Ql6fkkLrf/1lMhCigp10j64e8zS4 n8bZJaS3Mzm0XGqxhW+vsu2fse2Xp+MT1G+qZxj7T+khsNHEgDz9p+RppwVTuKjdryWt yUWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CcEiZFSnEtjqSiIOeERnRYXveIeTcuQ3wV2faAUN+dY=; b=V6VvIIUhd3s0i8roLVw1bIHecPENMrhSdRiEsiJhtw4woh64ZpdMAko3FFgh5lPnNv IGUz3mI+cAcscNVBVkTEt0MWTcLGAU4DI3eQ4xJfONEH289iXg4wN7rIRIb1QfiooLdc JMc7ItOoIVgVVHxxiCrbxvo0vlMMXwxo6Npzi2fKhoCXQjBIcNbQkBoX69bSa82RzMjm BpPHTZg29h49iL0l24qJG/tDSjeDdlZaCC9HunPCMSIqbq0lDPTVeT0FROaiU6W1w0Bt tI8T3yyf0ZuW4D9JT2BCi5vWgmvn+Eu+wyA/xs2gYS76BlmzphiR8UJPeiC0aUb9L2FK 2i/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EqCBDTQW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x21si2059044vsk.197.2021.09.03.02.12.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:12:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EqCBDTQW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5F3-0001BL-IB for patch@linaro.org; Fri, 03 Sep 2021 05:12:09 -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) 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-Received: by 2002:adf:d1b3:: with SMTP id w19mr2810735wrc.152.1630659831791; Fri, 03 Sep 2021 02:03:51 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This will make it easier to add new exported functions. Signed-off-by: Alex Bennée -- 2.30.2 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; }; From patchwork Fri Sep 3 09:03:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506481 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp825581jai; Fri, 3 Sep 2021 02:11:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya5IHl23kPr8ZfzLvPgFI7o+jCqrYurzuubKwWqzcTTp/WaSwn4xN1ZLl9PdXjjXOOSS3q X-Received: by 2002:a1f:9412:: with SMTP id w18mr1588528vkd.16.1630660300823; Fri, 03 Sep 2021 02:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660300; cv=none; d=google.com; s=arc-20160816; b=B1WmQmsWvtnEm18gPFsmc5rq72tZqhUoY0XjEByDFUApfhvsT00wBwYw/aK+JVGJit zG334/X5Vhbv2GR5FREjPQxOwPwyZaGzSK5MtLnxmA3eegieji9FfNYKCUkvm+IzTQtR B1V2xx8gFVnwPOtzCXgEpA72Y8e1t40Euuf5aL/VM0+VMPOMx5h22q7Q6qt5PtY3wwgr OBRT6QLyCXHqlX2BwvArQxQDGTl3Mqthesx31KWDoTGKoMs5GbQFFS9rQdaFqIl9YCQO oR1nw3RiAHJMkoPCzUyrcmT7b9yJfAPQ+6X5QMZoB7TVzumpyK48P1D/7rn5Mbe4up0u Pynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=oeQeR+eEGJXX3Wt57/hk38LlH5xv/1yOOnlDT6GieeU=; b=HkT3+6sVk1GJ3XNZFOMTqbSA2aSYWvI1RYEG2Oks8yAVFMYuUFh7A7UqPPJd57Xh8u ktZft6Z8TWTWP24TOwfvLfpvlomes9qgtrP/9SfVIyoCTpnKyUF75P5eG0T9j4AsMcrr KBzJTUdShzCGpRhzC6K9vkMCLOuvg2YPr75323A14uhfd2LUVdjm0GgDIVXLVVwczCTo LdNLYKN+u+1pmasv4g0BrpW+5KqW2KqJTF1Z0lrfMXytTNuybr0trMn8dEzggNOdqIo5 d9PEprmPvtxSjlWTycP6gOTqH9Yr/TW6G2vHWUSVuHgLtujTCdSMLbSeNRkUQJOuWfOb ETXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZmfGX2u3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m9si2204967vsj.162.2021.09.03.02.11.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:11:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZmfGX2u3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Ea-0000Uz-5k for patch@linaro.org; Fri, 03 Sep 2021 05:11:40 -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) 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-Received: by 2002:a05:600c:2250:: with SMTP id a16mr2254455wmm.72.1630659833286; Fri, 03 Sep 2021 02:03:53 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Message-Id: <20210803151301.123581-3-ma.mandourr@gmail.com> Signed-off-by: Alex Bennée -- 2.30.2 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:: will report the following:: - 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 misses, imiss rate + 0 996695 508 0.0510% 2642799 18617 0.7044% 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 optional: 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 = :code:`lru`) + + * arg="cores=N" + + Sets the number of cores for which we maintain separate icache and dcache. + (default: for linux-user, N = 1, for full system emulation: N = cores + available to guest) From patchwork Fri Sep 3 09:03:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506477 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp822543jai; Fri, 3 Sep 2021 02:06:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWAvLnlSbYZH4Mt+4OFLBK6KQnCPiRd1IcyC8aby1ooSdcpZzVb0ckwUuChRlm78rYbovL X-Received: by 2002:a67:cb0a:: with SMTP id b10mr1650396vsl.9.1630660013242; Fri, 03 Sep 2021 02:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660013; cv=none; d=google.com; s=arc-20160816; b=vcWD7Je0YMndeWjEhc4o/JQSF301mlnazv6lBc1nmHp0oGuKYXvIcWvBILIBywxL9O 5ICCO1hZdxtCVE7WSZcDzMFNJBmwCxKVaX/gnHhDYiFjuEE3mkyEWDYNnF4vRBRjv2vd jTj0ha5QuFHRE8ATrAH99mcA8kFY32IEJaJvwWhN1EmSgZIkUH4bsXNP9Bl9+tcwfDuH WSq5YALQ/grdwStFQu++H9NsoGml3gktmxYq2bQWTIkeUXWw1sDVz1uQzpsyx7OFgCB/ YMnLQON62qGuTizSMpKS2P95zlcctfwaRRsEebiKTWdy15et7e0Nd8f1vHymhd8mo+DM avpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5/N/ygGGEO4FJCbA3u79534rctxSYi1cLOVSuXy4QtY=; b=fQc0slnLDIzqKaw2XmiMA+vPsi3+Xty6Hj3ULrmbTG+tkoFh7ez7xP81XrjKKvfaQz U9Z+10F+ian7arJplOcjWnq0hFGFf2En4hyCBDSOiJ8f/r/on6R3ZbqxJFuEh8tp9Q7v VqCd8qPCK04lieqDY+L5xPy0iUHz97ottP/aAIjftZqlaosBUxLXepJ8paNuCn/kbgoj v/CDwzYKx0pPASWjC4OvPOe4Q7sIEGz1wZwjJUwRF4JSppzfnLU0rrhXXYzP0ikq7+IV qqf4zKMMfvrkbBO9P8qq3vQcIsu3Lj+1bCaL2sOkbxQ3O1cILWwIt+vt/JJZwi3lYRwS 3plA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VZX6eXB8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v5si1769792uar.190.2021.09.03.02.06.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:06:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VZX6eXB8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM59w-00070s-IN for patch@linaro.org; Fri, 03 Sep 2021 05:06:52 -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) 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-Received: by 2002:adf:e449:: with SMTP id t9mr2704370wrm.135.1630659835119; Fri, 03 Sep 2021 02:03:55 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Passing arguments to plugins had to be done through "arg=". This is redundant and introduces confusion especially when the argument has a name and value (e.g. `-plugin plugin_name,arg="argname=argvalue"`). This allows passing plugin arguments directly e.g: `-plugin plugin_name,argname=argvalue` For now, passing arguments through "arg=" is still supports but outputs a deprecation warning. Also, this commit makes boolean arguments passed to plugins in the `argname=on|off` form instead of the deprecated short-boolean form. Signed-off-by: Mahmoud Mandour Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-2-ma.mandourr@gmail.com> -- 2.30.2 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[] = { "", "[[enable=]][,events=][,file=]"}, #ifdef CONFIG_PLUGIN {"plugin", "QEMU_PLUGIN", true, handle_arg_plugin, - "", "[file=][,arg=]"}, + "", "[file=][,=]"}, #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, const char *value, { struct qemu_plugin_parse_arg *arg = opaque; struct qemu_plugin_desc *p; + bool is_on; + char *fullarg; if (strcmp(name, "file") == 0) { if (strcmp(value, "") == 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 = p; - } else if (strcmp(name, "arg") == 0) { + } else { if (arg->curr == NULL) { error_setg(errp, "missing earlier '-plugin file=' option"); return 1; } + + if (g_strcmp0(name, "arg") == 0 && + !qapi_bool_parse(name, value, &is_on, NULL)) { + if (strchr(value, '=') == NULL) { + /* Will treat arg="argname" as "argname=on" */ + fullarg = g_strdup_printf("%s=%s", value, "on"); + } else { + fullarg = g_strdup_printf("%s", value); + } + warn_report("using 'arg=%s' is deprecated", value); + error_printf("Please use '%s' directly\n", fullarg); + } else { + fullarg = g_strdup_printf("%s=%s", name, value); + } + p = arg->curr; p->argc++; p->argv = g_realloc_n(p->argv, p->argc, sizeof(char *)); - p->argv[p->argc - 1] = g_strdup(value); - } else { - error_setg(errp, "-plugin: unexpected parameter '%s'; ignored", name); + p->argv[p->argc - 1] = fullarg; } + return 0; } 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 ERST DEF("plugin", HAS_ARG, QEMU_OPTION_plugin, - "-plugin [file=][,arg=]\n" + "-plugin [file=][,=]\n" " load a plugin\n", QEMU_ARCH_ALL) SRST -``-plugin file=file[,arg=string]`` +``-plugin file=file[,argname=argvalue]`` Load a plugin. ``file=file`` Load the given plugin from a shared library file. - ``arg=string`` - Argument string passed to the plugin. (Can be given multiple - times.) + ``argname=argvalue`` + Argument passed to the plugin. (Can be given multiple times.) ERST HXCOMM Internal use From patchwork Fri Sep 3 09:03:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506497 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp840359jai; Fri, 3 Sep 2021 02:34:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9p/RD1pmhCb73BXFM+DXYwZ/Vk3ymn3RV06FzCWZCLS9BrlEfEka+lk6Gu24ziG1v0VWV X-Received: by 2002:a25:b7d3:: with SMTP id u19mr3605404ybj.158.1630661698913; Fri, 03 Sep 2021 02:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630661698; cv=none; d=google.com; s=arc-20160816; b=V+ok4Ihk/vsCugvaiSL850q28aGKK0nS33tJzrpQptPvuqb7GKtSmaXacaJGGfvify tI7zH+VXhtgwZgWczxoxN3bVhl67+t5L6etC5HCu++BJNkceIBdGZd5Xs8Mq4pNO0Z/f +Ctor1AzlAN/FNlmrVxz8hhl5EehdjXVpyoMG67DaaHEiRgxhDbJm/OjAW5tukp6T/N0 DDidd1Sgefw7FsUuQYAnkN8aO3LIu3wYz7ysQbTOlsor21o160sWdxSXzjxdzJWvhAx+ GpbixhXAf6i92P70EB5SzquELqkqS4fvp0Z6gG9heZqccPfSLH9tTqb6DcxdEEjYRXtY k+qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1bVEVWhNaQF2veQzCYIds6OQeILaCkMmELL9XjWUDS0=; b=vkU7LPzK23lFPA76auP0F+9D7Lu7FUOMrGEfdX4+X+A9m79DtsLkT4Rnh8SUbL/H6Q SwS5AuIzU1bkzbmN7yGHuw8Po97LQm4ErMk6kS4E+2e4rzTbZWEcb0hftGtXUI80v84V xxt7Ag3QVfgR90TvvbJmmef4E75k0myu6b8wLGAhkn5Emprc6wvxSF3BaRphz1oJnKzw hhZVwm4D0BUtBUiZ/4xWLI+Y8/rK1xoPV8tsGZlMCkyvi/CFeRZS/dLWF2GHi/Cn9Pcm /lCg1vdhLP8Aor+PTixPOgai/KfHf/68q5N4hKl+j44zTeuyIpsL6U6YBwZGMtsuHMOG usqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UgRNCkOW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q203si4495776ybq.7.2021.09.03.02.34.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:34:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UgRNCkOW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5b8-00025B-CG for patch@linaro.org; Fri, 03 Sep 2021 05:34:58 -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) 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-Received: by 2002:a05:600c:350b:: with SMTP id h11mr2283763wmq.101.1630660325417; Fri, 03 Sep 2021 02:12:05 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20210730135817.17816-3-ma.mandourr@gmail.com> [AJB: add to symbols] Signed-off-by: Alex Bennée -- 2.30.2 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); +/** + * qemu_plugin_bool_parse() - parses a boolean argument in the form of + * "=[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=@val parses correctly to a boolean + * 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; From patchwork Fri Sep 3 09:03:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506479 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp824102jai; Fri, 3 Sep 2021 02:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuKcns6HlKlJpttsCqScIbJXjaZnFCZH+0QXD5Y6tai9iQo7i6p7j9jt6HDnksBZLqQZ1V X-Received: by 2002:a67:fb96:: with SMTP id n22mr1754216vsr.15.1630660160883; Fri, 03 Sep 2021 02:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660160; cv=none; d=google.com; s=arc-20160816; b=JDbvqkNLVU5hoxo9UoGg1fQjPzwz6bpmfr5Kzfv/00jYu38aVOI7Zgm/BGj/W+xkJi v4LPo7FprodZPCeaPCgtIBpYJkj2llLsRHNvivdEXzs80YFvQhYSlCrTcox071U9qGYT +KHswVHPNDg6ngfssVxz0eyYjaTrmn+BxjwYvCXUYbapkAMWJ1n5Q1j3dTl2li7HsSrv 2s/XnK0tUmD9qILF++G1yKb/kRfq5pQY3pC7UPpeQO1OIzjLshdInJcJBtZCL82da9Op bHy3mx9w+5EqJp82Fo0BLWmiG2chIRnGANHn9RQKJ9mIOaKjcxzUxPB4Sos3z684MaUL d0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=omwD0CvH7QKtlKqaBp+2tXe6lKOc5AVhGBgb958NX84=; b=IhpOwdT1gGQOoKcwS4pb7FdcwuO9ozZzXdTfaiT0cqsCpV2cLvUdJwC2EPWX38BLUn V5WVn7bR3fxIiNNiOib6xe5eutDVbvsx7FMpV6zv0KW7JRZtCKJaOsn6876Bo5DBsCmX C2oeRU+ua/wW03SgfWU8QiRGsk+q+EK7rgw2kpuJ0TGLgHGO1adM/KHoFBlUtCn+StMG E47mXv1nFVin2NorlSmxYtgnFW9NPo01lg80VnRyU+vieAxVwDUgz4+KukmIMSVp8TJE +MjeP/g5YzBfgkxxWj00RtN8DGCwWqAaTzjZ360SiWgCZy4pRHYMx74VcCUSZGqUItXG fSBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W30RGIQA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w11si2121131vke.27.2021.09.03.02.09.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W30RGIQA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5CK-0003jP-0E for patch@linaro.org; Fri, 03 Sep 2021 05:09:20 -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) 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-Received: by 2002:a05:600c:35cd:: with SMTP id r13mr7287927wmq.24.1630659829707; Fri, 03 Sep 2021 02:03:49 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=on|true|yes|off|false|no" Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-4-ma.mandourr@gmail.com> -- 2.30.2 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 accesses:: 0x0000000048b000, 0x0001, 130594, 0x0001, 355 0x0000000048a000, 0x0001, 1826, 0x0001, 11 +The hotpages plugin can be configured using the following arguments: + + * sortby=reads|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 writes) + + * io=on + + Track IO addresses. Only relevant to full system emulation. (Default: off) + + * pagesize=N + + The page size used. (Default: N = 4096) + - contrib/plugins/howvec.c 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 qemu_info_t *info, for (i = 0; i < argc; i++) { char *opt = argv[i]; - if (g_strcmp0(opt, "reads") == 0) { - sort_by = SORT_R; - } else if (g_strcmp0(opt, "writes") == 0) { - sort_by = SORT_W; - } else if (g_strcmp0(opt, "address") == 0) { - sort_by = SORT_A; - } else if (g_strcmp0(opt, "io") == 0) { - track_io = true; - } else if (g_str_has_prefix(opt, "pagesize=")) { - page_size = g_ascii_strtoull(opt + 9, NULL, 10); + g_autofree char **tokens = g_strsplit(opt, "=", -1); + + if (g_strcmp0(tokens[0], "sortby") == 0) { + if (g_strcmp0(tokens[1], "reads") == 0) { + sort_by = SORT_R; + } else if (g_strcmp0(tokens[1], "writes") == 0) { + sort_by = SORT_W; + } else if (g_strcmp0(tokens[1], "address") == 0) { + sort_by = SORT_A; + } else { + fprintf(stderr, "invalid value to sortby: %s\n", tokens[1]); + return -1; + } + } else if (g_strcmp0(tokens[0], "io") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &track_io)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "pagesize") == 0) { + page_size = g_ascii_strtoull(tokens[1], NULL, 10); } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; From patchwork Fri Sep 3 09:03:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506488 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp829530jai; Fri, 3 Sep 2021 02:17:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5uJVTn9gtZlUDFN5Bxegso41Z8+QjZTaCzQZkcIW6teCPRrCjzoDuOBmwHC0PHb7RjBHw X-Received: by 2002:a67:f7d3:: with SMTP id a19mr1652014vsp.17.1630660660280; Fri, 03 Sep 2021 02:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660660; cv=none; d=google.com; s=arc-20160816; b=iSgzaidfGTo9YBoG7U8an6pVY9ostaVqKFxNKvYtCGmLj2dP08VY50Tnh9UijGBDJ7 1/oyseDSnxfroAvoRNQRiO86hthcgg0z/jgvUffwflBIZZZJszo5IrCueypyz/AWh1G3 jYIB1LeXH3JgsnF3FzBR5EQOTvbOfPoXfi7c3vDPbDyVZ5hnuI0hqYhzWtJYyxTjeeaE iVg2eKFbDE4a2VkeGIHCTfnHhEOV2nxlAR2JWQp06nnSpyBGQsLShj1J2TmWgA3vaBfX A7DkWx/TNPur50zBRdBmIbeZoZY79YGEN+B+fYUSTIwDz6Yu7hutDq5nlPl5Dzg4G/wd OuJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Gnkvq2Rb6V5W7/htmB7BU5fOrcMpKnuqDaYrMUnPexM=; b=kUmTjl0AWjA/6uDTRafhjmh2HCCXT2JZzJDee4B5YF189MIavPGeILPdqRCaRlGDyT cc6RwmuUuV2y2hpLswB5JIFs/oT9gJlgsWsTB/NFA+d8Mokd3J2rKw2dOPCSRVjE9+wQ qAYRumBrvZFELyxG8yXyb8IESjAMv8wA28fAjJ0oKj0xFBYO5uOs31k8ssG2zZbltIrN 6cz/OM4KX863N/abmJLvQ0/FyX0Jh0qsJ9Fz0LPFDZh/lXtoM8xWp0LMVYLR4E1Ab5yJ hA4Jk/PW7ld3imaAivFKMJuKrwGFuZ09ljGf3LJL0MAK5kQFcsKr2lUUPq1oz+kpS6Kc Gd9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VWEhf7CR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ba8si2249600uab.55.2021.09.03.02.17.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VWEhf7CR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40230 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5KN-0004Cm-Md for patch@linaro.org; Fri, 03 Sep 2021 05:17:39 -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) 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-Received: by 2002:a05:6000:1808:: with SMTP id m8mr2773435wrh.272.1630659837996; Fri, 03 Sep 2021 02:03:57 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-5-ma.mandourr@gmail.com> -- 2.30.2 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") == 0) { - do_inline = true; + for (int i = 0; i < argc; i++) { + char *opt = argv[i]; + g_autofree char **tokens = g_strsplit(opt, "=", 2); + if (g_strcmp0(tokens[0], "inline") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } } plugin_init(); From patchwork Fri Sep 3 09:03:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506495 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp838385jai; Fri, 3 Sep 2021 02:31:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1xkc0f165DhLQFbDWJaIkbf0whokZZIchucWEAIr7rZ92adI3ydaaMV4FW2ozawYgCDMm X-Received: by 2002:a25:48c7:: with SMTP id v190mr3487170yba.312.1630661518363; Fri, 03 Sep 2021 02:31:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630661518; cv=none; d=google.com; s=arc-20160816; b=fXL3fOB/14f4YNc+aV+qtQ6qJ8En/pUSyIYaMYWYUjVGeDVY2NwI3xNN2TNOUvgk7C dymTPBqUbhoMXwwadZpNIG+nIJt0Uqr1HwGkrdnu1/4N68Y43wfBYpD+UyUDCrPGIHuJ HoNc/SI5W61Zjbl5JOS3ikOTVrTpAPiYFF5A+6KBS7b3dD7ZOVSCPg6Dd+2e4YhOfco+ 75hmFT5WX6qyqGoV2rFaV7EQzzO8wEkQDvt8awB/gdZtBOnNpkXakyjjK2cwuoxsA3FG OU/IVWOMXkjgWmgpfrz1Pwj2+ITrQVxHkdRqHVaRvJ+338e96PJt60raGQYNUsM9S1S4 vVkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ZXuwxkhWA08Lj53nliSBduusJq0bDFXFFfvFTQKmSYs=; b=hk6QoIDVZ4HpAY/6AgqzmUUamWHO2dIWFSNah02Whgjalpt4vNRTaNWZmAJwqELkLd oeR4C5y1vDyVOxTZ4yA61env1Dmt/XIvxRyIMGJrbo7YwpxWDA3Yvm2A9CVVjWYE7TOl 89euDRe7za0GxazLI3ec4HoHtrU8qoBTxLBYA9uv/97XDVqouawqdHfNQHXLKoXl8uLx +Huird2Ah9OGaE08SBB0Sm5exZjQQnvWDLeUs8Z4ffyNc1OFKWaTvx8f+vZ0WikwzmT0 U7szGslsw+nnXZSwzmFKPwMI30+ptji/3w6RkBQL+eD/aOCmf/slCOtfwx48mLNA9E9V MWdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HwZ+apV9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u64si4244309yba.456.2021.09.03.02.31.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:31:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HwZ+apV9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5YD-0003Bk-Ni for patch@linaro.org; Fri, 03 Sep 2021 05:31:57 -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) 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-Received: by 2002:a1c:98d5:: with SMTP id a204mr7200184wme.52.1630660329625; Fri, 03 Sep 2021 02:12:09 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-6-ma.mandourr@gmail.com> -- 2.30.2 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:: ./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=lockstep-sparc.sock \ + -plugin ./contrib/plugins/liblockstep.so,sockpath=lockstep-sparc.sock \ -d plugin,nochain 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_plugin_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 = NULL; for (i = 0; i < argc; i++) { char *p = argv[i]; - if (strcmp(p, "verbose") == 0) { - verbose = true; - } else if (!setup_unix_socket(argv[0])) { - qemu_plugin_outs("Failed to setup socket for communications."); + g_autofree char **tokens = g_strsplit(p, "=", 2); + + if (g_strcmp0(tokens[0], "verbose") == 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") == 0) { + sock_path = tokens[1]; + } else { + fprintf(stderr, "option parsing failed: %s\n", p); return -1; } } + if (sock_path == 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 = id; qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); From patchwork Fri Sep 3 09:03:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506493 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp835654jai; Fri, 3 Sep 2021 02:27:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKXFSQwHndSzLm7OknONVlT5/3FbCYXJj5cfAm7V82M4Ol0q8U5E8LD01VXmkmKXOEKuek X-Received: by 2002:a25:bc10:: with SMTP id i16mr3560074ybh.73.1630661261774; Fri, 03 Sep 2021 02:27:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630661261; cv=none; d=google.com; s=arc-20160816; b=sqB6z10w2B5LHgG8lsF+ZdM3jwixi1m9uvP+DnfZvGMMuWKbhaJvX21WKt+XDt1ZLa TI/x/33erbUBXU1mQV5b3XAe5lLG3MzZyIN7Cy1yajoQQ3ixWH7HJLaJsSclNvhKHL1O 6pWaAm/dVcmb5FzFfZTHlL7CylFrzmnqhnNmlUT5h7J6Fc50yEUtwPR4/+M6Nan5eOXw hYeya7E9f1NGCtJrHJiNnREXJxHiTGuO6F0MKMdbvGHsJlrI1BuKBYU83qy1H67FZDvB GpwiUXP935AtYZ58IWanL8v0sxtlSqYynPmsPSkFFBe0+h4UO7brTGOKktmDCO0IcH0i A+2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5M7LN/rhrQ/tByfAjAq1zS6Dlqe4MPUhzqfn+rf9SCw=; b=PGrcdstVlNqeg2b7sPfx5sseEmExFF2tyDmGRCC5ZcW5ajxarGgSPPwBIphl6WwaDT 6EK5sgQhtQlu925TKaR21u2syUWqbcltpHpUqnBaET7rMM85ugIUR2yKZnX4OZ2/d90r 1KjsZM/K6RIHfqAdyhMJsavAyi2Ap/UPBH4q518/XUAntv6sjfaODhWWEneHN9fa5FSa MvQHmk/UwF7w+ROs3MO7J7HRdi9FhogieGUXx+WrC34CEfCqjmhDPVsxwzFKxzcmRjDq BDpxQFdbv3ij20Ze2gEeuWnO1OIEClQLzTP6bNGOCtF3jgbVwBDIKh2CPjJ9wJFQnXwD cHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xNXZwStz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v4si5052061ybp.116.2021.09.03.02.27.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:27:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=xNXZwStz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5U4-0003Od-8q for patch@linaro.org; Fri, 03 Sep 2021 05:27:41 -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) 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-Received: by 2002:a1c:a9ce:: with SMTP id s197mr7120120wme.173.1630660327381; Fri, 03 Sep 2021 02:12:07 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Parsing boolean arguments correctly (e.g. pattern=on or source=false). Introduced a new "track" argument that takes a [read|write] value. This substitutes passing read or write to "arg=" that is deprecated. Also, matches are now taken one by one through the "match" argument. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-7-ma.mandourr@gmail.com> -- 2.30.2 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 options: - * arg=read or arg=write + * track=read or track=write 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. - * arg=source + * source Will include a detailed break down of what the guest PC that made the - access was. Not compatible with arg=pattern. Example output:: + access was. Not compatible with the pattern option. Example output:: cirrus-low-memory @ 0xfffffd00000a0000 pc:fffffc0000005cdc, 1, 256 pc:fffffc0000005ce8, 1, 256 pc:fffffc0000005cec, 1, 256 - * arg=pattern + * pattern 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 qemu_info_t *info, int argc, char **argv) { int i; + g_autoptr(GString) matches_raw = g_string_new(""); for (i = 0; i < argc; i++) { char *opt = argv[i]; - if (g_strcmp0(opt, "read") == 0) { - rw = QEMU_PLUGIN_MEM_R; - } else if (g_strcmp0(opt, "write") == 0) { - rw = QEMU_PLUGIN_MEM_W; - } else if (g_strcmp0(opt, "pattern") == 0) { - pattern = true; - } else if (g_strcmp0(opt, "source") == 0) { - source = true; - } else if (g_str_has_prefix(opt, "match")) { - gchar **parts = g_strsplit(opt, "=", 2); + g_autofree char **tokens = g_strsplit(opt, "=", 2); + + if (g_strcmp0(tokens[0], "track") == 0) { + if (g_strcmp0(tokens[1], "read") == 0) { + rw = QEMU_PLUGIN_MEM_R; + } else if (g_strcmp0(tokens[1], "write") == 0) { + rw = QEMU_PLUGIN_MEM_W; + } else { + fprintf(stderr, "invalid value for track: %s\n", tokens[1]); + return -1; + } + } else if (g_strcmp0(tokens[0], "pattern") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &pattern)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "source") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &source)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "match") == 0) { check_match = true; - matches = 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 = g_strsplit(matches_raw->str, ",", -1); + } if (source && pattern) { fprintf(stderr, "can only currently track either source or pattern.\n"); From patchwork Fri Sep 3 09:03:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506482 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp825662jai; Fri, 3 Sep 2021 02:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznjs3iccUKhJvxJb8uEHLgG/gjWYUyFlJf0sxBrM4SZwDIgHMvn+zl6/fxbQPPNV0R770k X-Received: by 2002:a05:6102:3ec8:: with SMTP id n8mr1763718vsv.39.1630660310436; Fri, 03 Sep 2021 02:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660310; cv=none; d=google.com; s=arc-20160816; b=SrtEYZbjgJnYVuxzCjz4v/qWq7bYHxE+MDZ8+1FLNhNW0lt5Dfdi2mQtrl57rigyHO n4DfKlcOLD59xzoo6arzfvAuXBbwPh7M1LCHHjWvyf55neHhYGrz1jppegpatkNdbc1T q2iQ3dmqkDT1fKUidvexdD94t8YRAbiy9J9XeSOXEoO3ILas86wHL0i1wqYp+4YaIxMP tggkuzYfl4NxgVSA4kv+C0Nu1zT/lXU5fVbHTkvXFc7ibs9rMSJOhUscPX516wZfpYGy 5NA+llvXe2KMSAVNc2fHUSqvlpaMieDjaCQ0N72enX63lwQfXyB2NfDELTOjCv8u7YAr OXNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=mR+DLJiG7KKaByVpRDzQv8ceHSAlvak8Zfn7rSXlsPc=; b=J6af/ePQCDJF8Le8Lk/N9DwDaHSOqrxm3Y0GUXgzwcCAagddSfI/UBYYpJEfLdotMQ jGuih+3A1CccrZ5lCerXgW8SP03r5Hzhwqf7LeMf2uvrYZciHbrnIIq1O8kLsndDUmwn oIbR3d0tiQ0c4msTTEP2/vqDD3SIv8OABsyrPy84ftCcKdsq6zoBCed59vwBI0LLrD3u 6w//AUBsCqJLGBTAoY6YukvNsOaHXjLwKCFsoGqOTFb6zmNwjUeTvZaEazZQ/1SfBHlh Z/902I7Qbfgykyp3fkxEsN5zboXInsQWJtm/39KMm56xH668zPpSnl2BinVZcASwtDnq Ajmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="rM8Q/Hjy"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m1si2369702vsk.344.2021.09.03.02.11.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:11:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="rM8Q/Hjy"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Ej-0000e7-R6 for patch@linaro.org; Fri, 03 Sep 2021 05:11:49 -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) 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-Received: by 2002:a1c:2209:: with SMTP id i9mr2267594wmi.92.1630659839899; Fri, 03 Sep 2021 02:03:59 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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=on,inline=on Also, introduced the argument "count" that accepts one opt to count individually at a time. Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-8-ma.mandourr@gmail.com> -- 2.30.2 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 loaded each with their own arguments:: $QEMU $OTHER_QEMU_ARGS \ - -plugin tests/plugin/libhowvec.so,arg=inline,arg=hint \ + -plugin tests/plugin/libhowvec.so,inline=on,count=hint \ -plugin tests/plugin/libhotblocks.so Arguments are plugin specific and can be used to modify their @@ -212,13 +212,13 @@ The hotpages plugin can be configured using the following arguments: 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:: ./aarch64-softmmu/qemu-system-aarch64 $(QEMU_ARGS) \ -append "root=/dev/sda2 systemd.unit=benchmark.service" \ - -smp 4 -plugin ./contrib/plugins/libhowvec.so,arg=sreg -d plugin + -smp 4 -plugin ./contrib/plugins/libhowvec.so,count=sreg -d plugin which will lead to a sorted list after the class breakdown:: 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_plugin_id_t id, for (i = 0; i < argc; i++) { char *p = argv[i]; - if (strcmp(p, "inline") == 0) { - do_inline = true; - } else if (strcmp(p, "verbose") == 0) { - verbose = true; - } else { + g_autofree char **tokens = g_strsplit(p, "=", -1); + if (g_strcmp0(tokens[0], "inline") == 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") == 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") == 0) { + char *value = tokens[1]; int j; CountType type = COUNT_INDIVIDUAL; - if (*p == '!') { + if (*value == '!') { type = COUNT_NONE; - p++; + value++; } for (j = 0; j < class_table_sz; j++) { - if (strcmp(p, class_table[j].opt) == 0) { + if (strcmp(value, class_table[j].opt) == 0) { class_table[j].what = type; break; } } + } else { + fprintf(stderr, "option parsing failed: %s\n", p); + return -1; } } From patchwork Fri Sep 3 09:03:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506496 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp839841jai; Fri, 3 Sep 2021 02:34:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7Sqb4W8nYKQqk6BvT1jLgumuFEZeWmAWONtOQutQ+7nFJt/f3NJ8a8NYVuO4h1a9WwlD5 X-Received: by 2002:a25:61c1:: with SMTP id v184mr3668310ybb.327.1630661653380; Fri, 03 Sep 2021 02:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630661653; cv=none; d=google.com; s=arc-20160816; b=OHW1JLl4g7w5lfgdHBGiEMSAlK3Tc0Np0xn8T+uw19zD3NlOX0bnvmuAEmqibipL+P VfLViWl6bP5R3HVNFBAYjzNdLdzFF7MPMue9klcPuDVZlQQLuoJqkOEk3KJkc20kfdlX KRH007IyhQCTyzP+i95qlHwZ0xG89hA3NrLOKRcPmHN18La0OSuMnctmXWB++sMCknwR 6eREbjGvQy7Fs520j5SHB3KPMGmKn0Cwhc92qicvtFPAhaVL4uex95RXrXI9sCgL01K8 MkHO5Su2EKrb8ZVch77qt+V+Pati6tUEJeZAUdQ17lrt/K+/6tasSrYsfl8iXeV5OGI8 UYHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=MwNqOLSs/h4JpB6SVAu+PmQQX3OyOVghXZoT0dCYuZo=; b=J8xf3oH/LEDZRYGX9EfABsRDo7zcFiDv7FEOJYhRQFkabZ11WFmPSXHdWGebwbfzaG uUjkwgRX95itHolZppCUOeU7SCBXZs1/9ySysw2SDHvLRAzXSkzq39LRS63QiUydSPKg GFa1xcdS1iD+F5D/BkQDOVCShae/ngONKhhPy/UlGlTudgwZMUb9xgoNdSHpEFdctLXz VwVy72ZlzzWrXatT6tTHtFQeHi6XIJtflboMnRTvcTM5mLSfl4qIp5brodU+Rr68Vtkg 6C8SbRxdfetIO24iPg58jYcnIvYHRrxFJfShudrkc6vfZIvLGxvDb2kxJB3tYeeKpxMz 9hHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="r/xX7dI2"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x5si4210403ybn.329.2021.09.03.02.34.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="r/xX7dI2"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5aO-0007aQ-FT for patch@linaro.org; Fri, 03 Sep 2021 05:34:12 -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) 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-Received: by 2002:a7b:c442:: with SMTP id l2mr7346299wmi.131.1630660332619; Fri, 03 Sep 2021 02:12:12 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-9-ma.mandourr@gmail.com> -- 2.30.2 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:: The plugin has a number of arguments, all of them are optional: - * arg="limit=N" + * limit=N Print top N icache and dcache thrashing instructions along with their address, number of misses, and its disassembly. (default: 32) - * arg="icachesize=N" - * arg="iblksize=B" - * arg="iassoc=A" + * icachesize=N + * iblksize=B + * iassoc=A Instruction cache configuration arguments. They specify the cache size, block size, and associativity of the instruction cache, respectively. (default: N = 16384, B = 64, A = 8) - * arg="dcachesize=N" - * arg="dblksize=B" - * arg="dassoc=A" + * dcachesize=N + * dblksize=B + * dassoc=A Data cache configuration arguments. They specify the cache size, block size, and associativity of the data cache, respectively. (default: N = 16384, B = 64, A = 8) - * arg="evict=POLICY" + * evict=POLICY 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 = :code:`lru`) - * arg="cores=N" + * cores=N Sets the number of cores for which we maintain separate icache and dcache. (default: for linux-user, N = 1, for full system emulation: N = cores From patchwork Fri Sep 3 09:03:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506490 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp830497jai; Fri, 3 Sep 2021 02:19:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm1kLvnTnU7IrVCXjCFrkiurBjbaV08DAtBp2TVqbOpKPOaYgVYeF3GHobSSb6I9TVsPRa X-Received: by 2002:a25:c74c:: with SMTP id w73mr3438227ybe.311.1630660763570; Fri, 03 Sep 2021 02:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660763; cv=none; d=google.com; s=arc-20160816; b=nGlVaZs8jnucjsfkh1q+KRLoECg4RrzM+j46kbVUjsPR1xFXWJJRu8RJazlSddrDhB 70PZNHPD1LfP1iXzScyt9ptIFby/I9CGsC8Jbr7DeKEV77hFIPxUL9bN8jVi4HKESQGz CcIAa/JrBosaJkjp+N8U8W1l/wGwFccPRqxLBqxj4zeDbs+PQk5h5ZC43ZYXky+r2IfF UxNPuWHU1OLAFp7yuj7/WI9y29Jl5sHtgIPMyVV5jVkAJTVM0jvmUMpcbphRaI6trX3f 0c+XAmVSojwXf2EzsFwaVwo/uGUZ+iZb7jjgp/FJbvTlNlVcpPWm5Q6dg33kjA4JeAXC WaiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=P0i71SO0mUfOxacGplPpPt2MK0kYjZTuvRy4ItPlDSU=; b=zMusf6uwbJDCHGCZBPQA6Eyo1Xrqqf/aCVhHUWmhXs95H0epONq6CPOlvvHCA53XYk UonoLm4BKD5/2MNM1/jxqUKFObOrbQhaWjjryrwRoE/wl1pys1xrq05NBZLOQXf+LpBd ulEBdjqrFkZ2nm5RFCwIdUrkNAdcLL03jTxOwENdxtu4V8nMv1SMR1Py+l/qbjiabE/a yMjBZkqZdsKUGgIjaxBiYlKkxu1b8Aeh4OQOeESIE3Fi2kZsx6S4U1El5FOGTYx2BpEN SMeGlwhP+ORhZ9xqMB0+WJH6crfLysFpxStLTuKFS/aHrzaddWG97T/6DP6IsYUAsrq2 5hhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YLuv6o8Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s13si5130804ybu.133.2021.09.03.02.19.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YLuv6o8Q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5M2-0001bN-Uy for patch@linaro.org; Fri, 03 Sep 2021 05:19:22 -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) 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-Received: by 2002:a05:6000:1091:: with SMTP id y17mr2729359wrw.202.1630659843986; Fri, 03 Sep 2021 02:04:03 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-10-ma.mandourr@gmail.com> -- 2.30.2 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_plugin_id_t id, for (i = 0; i < argc; i++) { char *opt = argv[i]; - if (g_strcmp0(opt, "inline") == 0) { - do_inline = true; - } else if (g_strcmp0(opt, "idle") == 0) { - idle_report = true; + g_autofree char **tokens = g_strsplit(opt, "=", 2); + if (g_strcmp0(tokens[0], "inline") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "idle") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &idle_report)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; From patchwork Fri Sep 3 09:03:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506489 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp829636jai; Fri, 3 Sep 2021 02:17:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9LgYPcoIvzh0m2pjAkJLkYWOy54tu7EEKdpt4mn2Rwo1DSGR7OsObk1B/c2V/cbE7pGk4 X-Received: by 2002:ab0:6485:: with SMTP id p5mr1688295uam.97.1630660669923; Fri, 03 Sep 2021 02:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660669; cv=none; d=google.com; s=arc-20160816; b=SVaEZNW/KA+JvES+Nwrnl06jNM9hIkaGCKcO97i2RP+26AFjpuKzBM+4GssjXa1G1s rsuZFYFuuhMUadfmcY01Qii3Z6mUPn0Fz7ac3Sz+OKAM4MSiJsdnH4UZbFTM7HPtHH+m QYGVqF/C2ujUUnF661kd9JjObF9sBn2POnP3J6L1aRjAMxsOqFIzm3TqlDlEte6tnB17 su/YtuQJ+9diCE7yuZrYW2c5mjWlneyzFa9HzvM1SwH7f6OTyLw23KZ0BvCLd1eI8CJi CY2uRfFmenkgLijKPQXu2T2YuiCaYw/wWWNfTOjNsY6SI5Vy+DekZlRP4ySoTBTH4C0J x2uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cPUmLfeX6y8YbGi3PEDcVcc78oGY3uTICFwnBB6uSQ0=; b=HTPzxjkgffUtF2YA/d5/0PsrhmmQkulNfYSVf/lwLzUA9i5wl935mC3sCWmPCTp6za hSYdk0myl1NayRGJ3lelUCxT45hXJtRtdEC6ufkdTylfTXGnNKRXoyvALOI02QIUwn52 Cik/iwCLUcXClDJYjTUYARSiZAJOXuY/XppH8mdXQ3bgYo4ojblLVD2awtKATOIFY/ci yD62XhgSRpdi7pJCKpFSMri7IhNZK7mq6wwvsiZCbZXt2XGM3UqhvZgXAP81Bif/lTBh zDnQ6I3aCTrnFkNdCNyDwmnL17NlUhOnhAJEVJNoBm6O/LJ6tPbag4RotNLteM6nw21E r4+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FIXDw4Ib; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p18si1898442vsu.420.2021.09.03.02.17.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:17:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FIXDw4Ib; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5KX-0004eu-80 for patch@linaro.org; Fri, 03 Sep 2021 05:17:49 -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) 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-Received: by 2002:a7b:c190:: with SMTP id y16mr2235838wmi.158.1630660328330; Fri, 03 Sep 2021 02:12:08 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Message-Id: <20210730135817.17816-11-ma.mandourr@gmail.com> [AJB: fix check-tcg tests calling arg=inline] Signed-off-by: Alex Bennée -- 2.30.2 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_id_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc && !strcmp(argv[0], "inline")) { - do_inline = true; + for (int i = 0; i < argc; i++) { + char *opt = argv[i]; + g_autofree char **tokens = g_strsplit(opt, "=", 2); + if (g_strcmp0(tokens[0], "inline") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } } qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefile.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=$@.out$(COMMA)id=output \ - -plugin ../../plugin/libinsn.so$(COMMA)arg=inline \ + -plugin ../../plugin/libinsn.so$(COMMA)inline=on \ -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 libinsn.so run-plugin-%-with-libinsn.so: $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin ../../plugin/libinsn.so$(COMMA)arg=inline \ + -plugin ../../plugin/libinsn.so$(COMMA)inline=on \ -d plugin -D $*-with-libinsn.so.pout $*, \ "$* (inline) on $(TARGET_NAME)") diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Makefile.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=$@.out$(COMMA)id=output \ - -plugin ../../plugin/libinsn.so$(COMMA)arg=inline \ + -plugin ../../plugin/libinsn.so$(COMMA)inline=on \ -d plugin -D $*-with-libinsn.so.pout \ $(QEMU_OPTS) $*, \ "$* on $(TARGET_NAME)") From patchwork Fri Sep 3 09:03:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506487 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp829350jai; Fri, 3 Sep 2021 02:17:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmDzVAGXmZqmfu7Neg62YNGSIq8tlN18yV+/YmwU6BjICueDZD7lYCNMUkaeSIKC0MQcXJ X-Received: by 2002:a05:6102:134e:: with SMTP id j14mr1602509vsl.18.1630660641939; Fri, 03 Sep 2021 02:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660641; cv=none; d=google.com; s=arc-20160816; b=yJBkBnruWddM9nII0D3XhaCUmqZjHpNo95uzD+eBOCWeD9TbLtJNWQfoAdf9DaDqLp gHKHxTT2N+juwwbrYywsDmnz8PuqZjzdBAr2G63fFFzcbGpy0Ccz13JYGg4QiwYtrHMj 3cqIzv7RjdaPK07+EEH6mPP4VmkvIKWH2t7PtGmZAsD/BeC2G9ZU21mS88VGg7RrdfT9 bXmbJ0rVKvNoHOD+KmdrBxHqyD/mE5X0Z1EJCNr89x1fQN8y/ipwnoIdmYnJIuU9Xjbz 6BQ1v//VurZ+x0Rjt8SfsT3/Jtd0wFVJnl4zqYCedL9KohgakMfOnWjUBopu1m8NKS9u AhwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=GrGtDf2HVWGiASARI4Tm+w/Zub0VNBXRgvn0lkzCIm0=; b=R7Eq7NaBGyqijVgDyQxySXwc4nkTsLLMndm8Fwua74/rZWE7eg68fTe1YPJFDwy5Gp Z0zp0IMb73lUYvyrLk9u/aT/0RsgdK5vx2l48E3wIYP7ipTa+Mvuvhhc+6Rnvd3GE4MX F8j7n+eMFbsZAfCV4jSyhA6/a4CKLHwklUeZBLw4dnOsuf2MdWH3+QfBUjrYeRhUprSG bPnSHJacUzky9Zd1JenGBp6Y3mmIH3OdDIESwOSUK0pyDCn5JUTHYAXFQNjTPYUTfDXy 2mpVi1R+i1letQUYNnCtKPjMHxHuwqubOejSlMohh8dtpIrJDqlq97rP8V0ILglLwodX rzzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OG2tUEas; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q187si2036862vkb.2.2021.09.03.02.17.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OG2tUEas; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5K5-00036q-8T for patch@linaro.org; Fri, 03 Sep 2021 05:17:21 -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) 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-Received: by 2002:adf:f490:: with SMTP id l16mr2749048wro.136.1630659841315; Fri, 03 Sep 2021 02:04:01 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-12-ma.mandourr@gmail.com> -- 2.30.2 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 >= 3) { - if (!strcmp(argv[2], "haddr")) { - do_haddr = true; - } - } - if (argc >= 2) { - const char *str = argv[1]; - if (!strcmp(str, "r")) { + for (int i = 0; i < argc; i++) { + char *opt = argv[i]; + g_autofree char **tokens = g_strsplit(opt, "=", 2); + + if (g_strcmp0(tokens[0], "haddr") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_haddr)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "track") == 0) { + if (g_strcmp0(tokens[1], "r") == 0) { rw = QEMU_PLUGIN_MEM_R; - } else if (!strcmp(str, "w")) { + } else if (g_strcmp0(tokens[1], "w") == 0) { rw = QEMU_PLUGIN_MEM_W; + } else if (g_strcmp0(tokens[1], "rw") == 0) { + rw = QEMU_PLUGIN_MEM_RW; + } else { + fprintf(stderr, "invaild value for argument track: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "inline") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_inline)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; + } + } else if (g_strcmp0(tokens[0], "callback") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_callback)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); + return -1; } - } - if (!strcmp(argv[0], "inline")) { - do_inline = true; - do_callback = false; - } else if (!strcmp(argv[0], "both")) { - do_inline = true; - do_callback = true; } else { - do_callback = true; + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; } } From patchwork Fri Sep 3 09:03:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506491 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp832311jai; Fri, 3 Sep 2021 02:22:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi7ccfeUytrDaOVc3PXQ8Sl2DvpUFhHm11u0ikEcyuBISD1P96IPt/pl6GggUe0Q8vPybh X-Received: by 2002:a67:df01:: with SMTP id s1mr1778964vsk.18.1630660925585; Fri, 03 Sep 2021 02:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630660925; cv=none; d=google.com; s=arc-20160816; b=Xh3yLGBPeTO8QymGDx5qpX+r6GUje8yA5gGpdaU09Y5NNQQouT/NuvPqxTKGTOoZ+S Aa6fRZo2BODzpqCEiuG7zyIRXWwvfEEkddmzk7h4I0Tvvb/dMQovkOTn+2bmEQfyQqff gQ0W9Qmj3AAUdBVf+1nCROg4r8GDZLH97wCB6tLB/Hclx9Oe+dbBaSY4S9WkfND5XEEN JgJHtLa5FJ14GQRMRhdzJRz60KS4/tD/XZG6KSVFQfe9r3yG1MdC/UjBhaK8J5ZHRQuM YI94+78NZsIwOWtq97HS5aJGGNIHNUwIof0dSzWRWT3RDGggjaCJm7DlvjO1xlXKW3Mh ij5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=rctBFtmR+dPbwtBUWAW00cSmCz1yMMhGQfbKWbQXJww=; b=eKhABzQAr5Unj+DGPExl8j8qV6ij763zDfBMAAFzu/h+JuSD72HN9nP7JoMk8/MDW1 mg1VSquw8ovv5CDxLjjfDFtU0kd4sbMxK66kCzneILkaa7qmar7cfXLO6e+PUQ5vyYj2 jHUP7k8u2Vv5Ogpke0Olxi0k2ApYMVjhq4ECmn7+mV8M2nMOjTSX/juyAE44y1hnCpvD 2kQdCQ4+XjD3rqVGlQFF6Z4MN856UwfECQHrNAe8/vVu3+j3pJhbQ1Pc3IJcxLAlnwqX vMvCxy66ImCY36PizR+tn2bowbN/5FbE7+rs9szX6lfRofm2SMsBlNA3WGkwrA2vL6/N GurQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Fr1STz58; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f16si1084258uap.82.2021.09.03.02.22.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:22:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Fr1STz58; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Oe-0007Ie-WE for patch@linaro.org; Fri, 03 Sep 2021 05:22:05 -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) 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-Received: by 2002:adf:a2c4:: with SMTP id t4mr2832210wra.258.1630659843258; Fri, 03 Sep 2021 02:04:03 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Signed-off-by: Mahmoud Mandour Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20210730135817.17816-13-ma.mandourr@gmail.com> -- 2.30.2 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_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc == 0) { - statistics = g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free); - } else { - for (int i = 0; i < argc; i++) { - if (g_strcmp0(argv[i], "print") != 0) { - fprintf(stderr, "unsupported argument: %s\n", argv[i]); - return -1; + bool do_print = false; + + for (int i = 0; i < argc; i++) { + char *opt = argv[i]; + g_autofree char **tokens = g_strsplit(opt, "=", 2); + + if (g_strcmp0(tokens[0], "print") == 0) { + if (!qemu_plugin_bool_parse(tokens[0], tokens[1], &do_print)) { + fprintf(stderr, "boolean argument parsing failed: %s\n", opt); } + } else { + fprintf(stderr, "unsupported argument: %s\n", argv[i]); + return -1; } } + if (!do_print) { + statistics = 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); From patchwork Fri Sep 3 09:03:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 506492 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp832945jai; Fri, 3 Sep 2021 02:23:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2VDofobHUz3vTtRxddfMNifkwALQ0MBXM5ugEK8Feg1a5pDPS8bcka2yRRc/xujjTPJZF X-Received: by 2002:a25:bbc4:: with SMTP id c4mr3646454ybk.114.1630661003662; Fri, 03 Sep 2021 02:23:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630661003; cv=none; d=google.com; s=arc-20160816; b=xc45fN3aW0L3TtoGyLl2HIF/oyy2Cx8Z5E2QRtwb/err6+BZ8l5jfLRwjT0l5rwyNl SIRTIclw+3YfHn8IJoBzPeY6eMao9IsN7A4qzWStH/drzFIlwTkuP4I+2YdN5sRMMQwW +kMwNhCqDH5zvyfFHIFgSEf5z207lvMhg6hdFUu6X9o58NvsCtyMMu24sbvxzQVsjX64 UMSi+pfhhiHwRadTPf6U8G0rr9J5wxZp41UwlDoo1pfQKDFHPbwpBrBwuyYRrYisxXYx JbR7GpKoiw4aBC7z9jGiC/fiPlmuf50PXJgnz94/xljnFOhRe+3CdJJZNv+nlVZz7zNx 8o+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=4Gz/8308YhmTTLG+j1+k+Mkb0OBIL4Jjcw0DjoEOP9c=; b=d+zrXs7vwTT/9ZvG1wEAE6Swqx7W0LcAV8BO3hQdPCEnw4V85mtwbaaZMSafpa0Ru4 w79q5zu9hV+qvYvrrdJVc1w5C+gi7dpN6KPcdWN1pc6BadyRfKj8OS4uoKHu8ykIsy2A xZ6HawiHOk4HLRtTQQh97x8uDuw8qAbHAs2doaGPGo2QZ1vB1/72XvQFMjP/KZp25h55 3hxdSpoM0cazpW7DZKlJI6zxIhwLje01zeDslZIRGFbc8JRl5wZK0KJnLjQ9eCHRFs7j kRA7fdsOwmEY7hX84fLx6Pt2nsrJTAVvjQ/Gy/JcPBOj57mcTgWMO5dk4oJ9g2B2yU99 gadA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yo5tq5YG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r10si4499329ybp.73.2021.09.03.02.23.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Sep 2021 02:23:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yo5tq5YG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM5Pv-00019E-5D for patch@linaro.org; Fri, 03 Sep 2021 05:23:23 -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) 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-Received: by 2002:adf:d0cf:: with SMTP id z15mr2855587wrh.356.1630660324585; Fri, 03 Sep 2021 02:12:04 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée -- 2.30.2 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) -- contrib/plugins/hwprofile +- contrib/plugins/hwprofile.c 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 options: @@ -360,7 +360,7 @@ which will output an execution trace following this structure:: 0, 0xd34, 0xf9c8f000, "bl #0x10c8" 0, 0x10c8, 0xfff96c43, "ldr r3, [r0, #0x44]", load, 0x200000e4, RAM -- contrib/plugins/cache +- contrib/plugins/cache.c Cache modelling plugin that measures the performance of a given cache configuration when a given working set is run::