From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475469; cv=none; d=zohomail.com; s=zohoarc; b=RAfz5axl72W42XxhYHZ/b1RJHyaJqSoJZFKAIjOb6pI+S9heB6sDJdbtzVK4/hKlCzGgv7h69dUpvvPQrfigg+Its/A4qc+0gQHqcwIpG6bZZVe6NKatKOYeeS66JcluyJksDEQ82/oZ4tets3mCXlXYGVIO3cg3deXaHiZqGcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475469; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pMDwQlE3l0KKa7P5lbeW0nhoWgR5/Mui2HXPodnjcRo=; b=e1VjGyqXYfpJFO/6Ets8579k7oreV48SYv148PbRRvhgM/67B7VD7pB65yFzbOV8vY5WsHZGKUqyIcQS7FkU+9Zbc/xpeFVNKMz0eZi2TdOa0iHm/MeDf1qDYRPLRYXFtUH/crHP3rlLnswONYY3MXRv5g1ezdHVNWuxjRCIaNA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475469147155.158785653652; Tue, 17 Dec 2024 14:44:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHd-0004J5-S6; Tue, 17 Dec 2024 17:43:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHc-0004Ij-Sv for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:16 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHZ-00018j-39 for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:15 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-728f28744c5so5443533b3a.1 for ; Tue, 17 Dec 2024 14:43:12 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475391; x=1735080191; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pMDwQlE3l0KKa7P5lbeW0nhoWgR5/Mui2HXPodnjcRo=; b=EZaar5tKTrCAjHivfNNmdLuo7DHj2zJTPwLO3+tQ2/tsN0Dn7hX0AbVvN7YoEtuipj qzk3+eR4DJiXyE10e446UXMn15j42j7lXCs8PII+1qnW65EwxdLw9nzsuGDfQt8LjT5t ZeBLzUCer8fKiuoPZkrUjzl4ESra/1NlHCm8amURJFK6QVipTJMh6TfipxAW1FQsNmlz ydbkdVGXq8QqQAzrbuwn0/aB3vbWxBnL3q0T56/x/8hJcGEjerwN+GYBdj3AMo4txjs9 VGgpKTkNLJILWe6WyHjhR0TXu5vlOpAF0z812eaKjJB743dCNM/fGLrwhJYVTarfEey8 cTRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475391; x=1735080191; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pMDwQlE3l0KKa7P5lbeW0nhoWgR5/Mui2HXPodnjcRo=; b=nbWHA2naut8nT4P3b3HPGCenPM0ScApzQAYqs3fcVn3hyDJu1lVjWXT8JffoEvivyV Cq5vKxvNs2nFJ06/UUZWh0vsuresIMXX0lFGs1UgwligcStxcbVP7uCzYVEb0RhQb3Iv EsSzLNhjyQddAFjF0OlarzYO6juuVIUxd+La3NfPjDPpJHMCiFXkoi1+9uZcx0gJVAXY L6RRE01kGFlR5yEjKTPcowr7xL8BKurZDednRhznM7I2kPgswSJBxU7EU5DBYG/aPoQI AnbwxZYi3P6JyOLhrNfHxj1L9cskDaZUpBNm92jZVepaRzitgMM/otd3FW2unDJG9WIS cwuA== X-Gm-Message-State: AOJu0YzxojLQRmcnBBz/Ncnc4/95RiuW3EFyBl5BE2ejdKeXL7mJscPD ilgsKzH/CxUGEiby0BIcYXT0+2WmIClM39VEwyJVw85owh16RXV7+WlJTNIxgXI0tMwuedMY634 cuco= X-Gm-Gg: ASbGncv9/sQH7l0wmcD944MWCqsS72FxHBMjxzTicCBbM71vsTJx6OfWVIzwDys0POh X4TYPtpw4EZecHps9BFFoqt46ZZQz7vVmfAAPWtj2Dcc7X1CbY6aBOhk68gTvBUblSx2GoDod+5 nMv4wMMo2JoBzeUGmkJRMBbrDVyEY9oH5PgNPSyi8arNli5iMhBVMZ5oGst8361O7I/izhXUWS0 RDF6Tr9DGDH9JkGrufq0wyI7xB2z8xaZnwPYObfJ4k8RK9NM3CH/g0o X-Google-Smtp-Source: AGHT+IE8f34zBMELnL4l1SA+4UpYCaULbwZkjbMJqC5q/RbITjhIlarLbDGtwX+LOYyZbtm8SNZwWw== X-Received: by 2002:a05:6a20:6a1d:b0:1db:df34:a1d6 with SMTP id adf61e73a8af0-1e5b48a4612mr1126803637.42.1734475391556; Tue, 17 Dec 2024 14:43:11 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 01/11] tests/tcg/plugins/insn: remove unused callback parameter Date: Tue, 17 Dec 2024 14:42:56 -0800 Message-Id: <20241217224306.2900490-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475470471116600 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/insn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index baf2d07205d..0c723cb9ed8 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -150,10 +150,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct = qemu_plugin_tb *tb) qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); } else { - uint64_t vaddr =3D qemu_plugin_insn_vaddr(insn); qemu_plugin_register_vcpu_insn_exec_cb( - insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, - GUINT_TO_POINTER(vaddr)); + insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, NULL); } =20 if (do_size) { --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475500; cv=none; d=zohomail.com; s=zohoarc; b=D2R23FF2vBeRyiw7iblYsvFyl7xHfky8bTn5kISaz4HlvAeRxTLd0l/LDlyGHrMIQvilnPnEf/riZSk3FZISAXqI8zMboJCkp4yTSiDwgMLvWaGg4uOgiUAeIEv4UvIHxQNRoqZ3samgE0x7Es84gRsFcgs5sROOZEeYAU1Oq54= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475500; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NOzYfBh0zmSLp+iKqt+C5cDNqScuCpesF/tusP6QFbo=; b=T5+JsGieiJY2TFi/YF3q/ZR4OAD5gR42hNa1ci0F4eYb8+A+hPfJEMfpAYz79872W+t8ypy1jJNew9U6DOdWPrUnbVOr+WaM4pN1hmqRNq+YxfrYM/NL0x8suNRuWPlrnfpJRhTozeViCf1Js3s/qw6utNIevAMF8U7S644114U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475500979355.80478978198494; Tue, 17 Dec 2024 14:45:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHj-0004LJ-18; Tue, 17 Dec 2024 17:43:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHf-0004JG-8K for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHa-00018u-De for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-725ef0397aeso5228161b3a.2 for ; Tue, 17 Dec 2024 14:43:13 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475392; x=1735080192; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NOzYfBh0zmSLp+iKqt+C5cDNqScuCpesF/tusP6QFbo=; b=rEWGNR369wdoc06ayRxkHSUnPdDE9NKxzf5Kivzx16yYZPMZSaStqaMJTKNMeVeZGZ jfDawKWGULon7JIXsAzEevh0LKshkStIbusreQ5ANzduQtp7LjBQlUlJ5+mPd+7sGkJV L/L1RGJfPiyj3FFWvDFePVTCyzNxKLfFV15XjTsJJqW/bkKNz1rmCG61zmvChtSmFgVn c/ZM32y3GyTB/08AAC2Z56GcQrQRHeQhhaeLXPNA5gMrApzQv1ZAGqjHelT8BwHLIEOg LSGOYWNrvzR4gW0eSw9P2etLExL8qa2X3keST39vey9GjEYbraRUC2aiPcgRSTF0N3uT UejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475392; x=1735080192; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NOzYfBh0zmSLp+iKqt+C5cDNqScuCpesF/tusP6QFbo=; b=hp91nQqv+pP2Zx59YmmyvRZfyaCG5RL4rlmkugwQ2L0a81ZQFVg72OhSBG5npg9Fj4 jvRurS1OZjo4I5TKfGAOd6Unzwn+CHyzir8yQUKJe2aqH0drLmIEDGv0WZj56ZoxCnjg b+Dw9gqMLYQEda9P2FTeez7zwDfdAuOLemfHZVRixiIBGTUfsuit9kJZDwDlxhgquokq J6BLQTOcth2XpF4V/xbkd+rwjCVX3CUbGHDSvYh6ObiM0eRt5QwTu1b5/XxZtX78gzKK f+ob4rVJFHKUa74FIjzUiKV8KBaMkDIsYPO5C4YLQi1wXfn0Um4VBT0VSLa4a4wIQitu M8zg== X-Gm-Message-State: AOJu0YxTC/V/h2+UrxrieZqfnSCytU9jJOfqUe0Rky5vcKqs/wpPT6Rv pujUCQEfGogzI8er0GYOsSr2+9yBQX+CAB7C8mn/E7xrDQYF9bBjoUTgb9Dp477gUbus+n7lkx8 j/2M= X-Gm-Gg: ASbGncsvZbz2mnwS1jNYTRkFgiG8mKpDwqCCMtsasIWzqx7FoZ9be3pwpHUxymumsqw CK+y8NWMGxZSJhXGIEebnOd7pxvb2c8+3kHpmfCG/aHjLMdIRzGREQW7BqFSJ2nVUYVR1MUqxQp Bai/sB9+CPhUMvcw7Udtq7gm02fahZ6TqyzRz1Nmbdwxq8gVxPWxUY+Zc5K/+0yYws64b3gUkN2 fHxqkDH5s4g07GtleXonesZ6Z9WMSnl5yiQRE22Tf96IdLIppzaUF35 X-Google-Smtp-Source: AGHT+IEUxcPkbKMgJH8DF+rpWL0LnbAVVqUrC6NlUMoZ/OUexBFb6RJ9bcwqusG3AvdU7hFLKEfDCw== X-Received: by 2002:a05:6a00:21c6:b0:728:eb32:356c with SMTP id d2e1a72fcca58-72a8d2611f2mr991827b3a.11.1734475392496; Tue, 17 Dec 2024 14:43:12 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 02/11] contrib/plugins/howvec: ensure we don't regress if this plugin is extended Date: Tue, 17 Dec 2024 14:42:57 -0800 Message-Id: <20241217224306.2900490-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.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, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475502581116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/howvec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 9be67f74534..2aa9029c3f0 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -253,6 +253,8 @@ static struct qemu_plugin_scoreboard *find_counter( int i; uint64_t *cnt =3D NULL; uint32_t opcode =3D 0; + /* if opcode is greater than 32 bits, we should refactor insn hash tab= le. */ + G_STATIC_ASSERT(sizeof(opcode) =3D=3D sizeof(uint32_t)); InsnClassExecCount *class =3D NULL; =20 /* @@ -284,7 +286,7 @@ static struct qemu_plugin_scoreboard *find_counter( =20 g_mutex_lock(&lock); icount =3D (InsnExecCount *) g_hash_table_lookup(insns, - GUINT_TO_POINTER(op= code)); + (gpointer)(intptr_t= ) opcode); =20 if (!icount) { icount =3D g_new0(InsnExecCount, 1); @@ -295,8 +297,7 @@ static struct qemu_plugin_scoreboard *find_counter( qemu_plugin_scoreboard_new(sizeof(uint64_t)); icount->count =3D qemu_plugin_scoreboard_u64(score); =20 - g_hash_table_insert(insns, GUINT_TO_POINTER(opcode), - (gpointer) icount); + g_hash_table_insert(insns, (gpointer)(intptr_t) opcode, icount= ); } g_mutex_unlock(&lock); =20 --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475412; cv=none; d=zohomail.com; s=zohoarc; b=nsAcJLjzuSp80FiklxVKxOSK1kdI5SLiKIiXS/hPGlmNkIA1/uRoHy4w9yAF07SFCo60aqK/jKNGom+mVnBpq1RSIOOcYnc5YVCbcYz9xloacZqbQhVkjXVFWvgif2obNP/P4j14tgOIRgtDKFaz8Z4Hcof5uTG7iynViGEFhWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475412; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FtDnDxoim/xhxV1Wp1Am01Tmaf0WaBzRac6ychlNj2g=; b=ThbRDqzFm0On0njIl1HiOT6pjnzZK9bMSoVyE0jRM4WFPZdXhdVs3+P/qGJVSIhq7Lus3/DtWFZFfOEQVZuwVrfd1ufSq+Y9rNu5vjDP6MC2af9Xhf1+dbUlV5tI/iihu8YJJoGYtV7SGSp+4U5y8/facjZVbG4gHZU1mvXCOcc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475412293966.3265595698891; Tue, 17 Dec 2024 14:43:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHe-0004J9-VO; Tue, 17 Dec 2024 17:43:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHc-0004Ii-Sb for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:16 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHa-000194-SX for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:16 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-725abf74334so5130225b3a.3 for ; Tue, 17 Dec 2024 14:43:14 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475393; x=1735080193; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FtDnDxoim/xhxV1Wp1Am01Tmaf0WaBzRac6ychlNj2g=; b=vgrUOOB9Bm9Qh4mcnM3QtJ9vigBbpDj2gykRBjWtvCJk6/D7ribXa5KlRq2/gr/X+2 7tisHupeBuYUPZ1GQLOEZDnNCriHlbSVeuy+djXgSYS4swJqZAslGEYGoyfGWDfdrdlq lZyhevSKhsVrOzYhGRnfF8Fpdzb0utKbsNgMGcYW2d1vYx6gIQaA2YpqNxlZOqVyYJhk 8EvjXIV/rZTRJJ5CyLaep3j/Kna6KrAJtzS/bPC0WnWU5aoUQnXtjOfhXNMNcqMtmgOI p39v/8Y7OXHW4jaqU5znf7q/FvLkzxTIRPvhiLc9Bi/nCIGQ7uAk4JHrl1K9fGFoYYUS QI0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475393; x=1735080193; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FtDnDxoim/xhxV1Wp1Am01Tmaf0WaBzRac6ychlNj2g=; b=jCt4f+yNdJW3sHw3G8yJw1mlioAmF+juGWbWxmz1h6es49+GTrcYpAaR9L+dB7Y2yo i269zl1bTmMBCYB5KId6qPAG8ugipK4iihey5tTy1lgmL0jxT/p4o252aA8Ztbs3rLcx Yu+N+28OvOu8Z1kHAUAvGC1Ud6d6pDMsuQW0CXDo+OdOoV7M9iD4LoelHLr3/JfICf1Y rsiJeQqBSxGi7ug/o4s7l/LM5sRqLK367zptNQ3e6/yC1Gu6CUlXX5TTowikMvmVAyH+ 594M+yzgxCmHkMf2gIA3o6/mJjbUlpWQ5zndg8FhHohbyWB2FsFEKKJSwxiAzTpnQ5Qk dVmg== X-Gm-Message-State: AOJu0YyeFYGc4iFZ2jnVGGV5IiKca3MX02YUaC32/y7vrk//tFSzfA6S B0O03RnSy3JFpUYkNXXZ7bR6QuHnT+pFJ+x4nQHrjlkGUt0fXx+105UE9TB+BucUaLMr/dm/aOb 5Sys= X-Gm-Gg: ASbGncvMN8/yYV97u5KfFf//MP8TZPwct63FG0PWueUCsDFJZLC5CU7HWi1VbQRUnr2 JaOYK+SGsp7OzjVHgtUU3BPQxkEgpwMy3MHXE65V7lWyNtj67jr4fqbEDO7N4ylG3rqpO3byRX9 XmNOdSmgxIGSHqs3rIXNptv48vLJZ1ijhUgFFAizXABxaFrpleJdYi7lqQsze1zLs5vCi7fXa9t MdHCl6h97d8r2j47+UxTslEtMfb1pIwUMQNTkmkbddChdGVkwhstkNW X-Google-Smtp-Source: AGHT+IHZvji7vI6NXTxDkqPGf7cm9WpgcjO9tCO+7PdQI9oDOSSnUb4p/D9NiyVWNZjZTw6ITCFtMw== X-Received: by 2002:a05:6a20:9183:b0:1e2:2e4:689a with SMTP id adf61e73a8af0-1e5b489b0c1mr1147195637.41.1734475393437; Tue, 17 Dec 2024 14:43:13 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 03/11] tests/tcg/plugins/syscall: fix 32-bit build Date: Tue, 17 Dec 2024 14:42:58 -0800 Message-Id: <20241217224306.2900490-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475414280116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index ff452178b18..47aad55fc1b 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -76,12 +76,12 @@ static int64_t write_sysno =3D -1; static SyscallStats *get_or_create_entry(int64_t num) { SyscallStats *entry =3D - (SyscallStats *) g_hash_table_lookup(statistics, GINT_TO_POINTER(n= um)); + (SyscallStats *) g_hash_table_lookup(statistics, &num); =20 if (!entry) { entry =3D g_new0(SyscallStats, 1); entry->num =3D num; - g_hash_table_insert(statistics, GINT_TO_POINTER(num), (gpointer) e= ntry); + g_hash_table_insert(statistics, &entry->num, entry); } =20 return entry; @@ -232,7 +232,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, } =20 if (!do_print) { - statistics =3D g_hash_table_new_full(NULL, g_direct_equal, NULL, g= _free); + statistics =3D g_hash_table_new_full(g_int64_hash, g_int64_equal, = NULL, g_free); } =20 if (do_log_writes) { --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475420; cv=none; d=zohomail.com; s=zohoarc; b=Eub+NtT5vuu38DK/Ipkq+bB236Dxcx7OtPYsxcsGkKK1ap5wLdlkR5x2SpSHd4GMTZTpS4KfxoNkc3uN8igj1ePyTrj8G1ZzyfN5Zcopu2ftbftLmnf5qUhwB4832lRATk12QayrfhmLuWd/q0dciwTZmrxLmGqXVNO8C0/2XKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475420; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+FHNfG1b8pwrU+SQi579sB8c86h/0xjzKBe/XqZ77yg=; b=UhtOGDLRm/RGWVghEJehSbLaaexVkXzmqM0nqrOZRIlsmv6b41mc+yqXjHLuHyhYbB5PQvXI74fgSgl09EHGiC/AP41qVuy5PxtlR0m9kqc3YsNEc2b/V5LdlZtOOmJxwzQ1ntyvFIHQROhfiJ5bXTshsAKYe+REW15AD6oPOrs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475420309400.58651015991904; Tue, 17 Dec 2024 14:43:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHg-0004Jg-6o; Tue, 17 Dec 2024 17:43:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHe-0004J6-7B for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:18 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHc-00019D-MI for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:17 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-728eccf836bso5151642b3a.1 for ; Tue, 17 Dec 2024 14:43:15 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475394; x=1735080194; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+FHNfG1b8pwrU+SQi579sB8c86h/0xjzKBe/XqZ77yg=; b=OOtjmH7k9KPnzozY+LEnKimkvSMRBcc/6kSe+a2I5xfUk1b1OPKROBUs1a2dI/hzf2 X/IRN1jjmfLY5Z5KUgXQFd5tEi7wUaIJ1gZPLh5M1JyNoglhEtF4J8A291/dIFcC1j84 h1zVIT8eQ1tgFx3Xxy2+tsRmjMGcrgYYscsT27MYFa3f2NnfZn2Un1oRmslIJvPLmoc4 49O4/fVifzV2mkCDaXacwkuVy4KS0b40HPFQVNv9Q3BO8AoOcqJxef5HVvIAz0u21nJV UtGcVKkjT0Dlk1nKZz3cODpufsxsw3ZGU7yV+knyNYIZY5Z9jIOZy8NWjcS95teM9MiB jTRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475394; x=1735080194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+FHNfG1b8pwrU+SQi579sB8c86h/0xjzKBe/XqZ77yg=; b=OoargjfdgRxVXrmvA7HNUkrGxc6SPmQJXQaZyeBE7aSD6sfsM/WL25SvSThUVJ4jRr NYURr8TbnBDb9wvHyBCf88iIE/+sz+WIn3tzSLqptCUSv+wRdlYMv2PeCkS8SghWI4fH SiYSkhtAPkt+kIJZbSDnHLFDR7AxWYedoHwgEIHxz3bRJuWew8enAH1tYaxFXxmPD5JM TqsIXDQYNP00AITJcyAs+oE9qjfGAgI5N3/KMOlKyhubyNBbdU05MWgHtLGbU+WUR0lN hYD7IqET599QU+4OKurz6weSZQvZqOYFeqNA0ty+obMfK+jVcBnlj9QwaDQRUmRGO7NB 9E4g== X-Gm-Message-State: AOJu0YwQobHZxvd6vR2rlcgKOmhb/xhorO8FV9/HSZ25ep+YO6AovRUk 8R4N6MOG5trAiUqFy29NHV6JQjJ897ZHj5ANONr5aOV86oEcBedAcM7G43YM6nt2jY1jeeqdsg/ xZcs= X-Gm-Gg: ASbGncvLDiFt5dooZsf/4ebGrZPJGYt1rf+b2Yn+h98inoi2VnBXpMZWx60zu66FMcA r65U/8a4chhnKGO+2cD7Xo/E0BHCPjNul/iTjzikWVS2gpy8nrppt+zaixf9j7ISTeHCSEtekl+ rldQqyTl3zCjAgcTiknAJbofVF7VEBfkvCc7LWziXPALzMzOx2b6CpfNdXLFSTX1e4xkZFLETKT 4nym08ogkLhFgps7W5CdPUl5pr4V7VhsjMza168+7/3oJne562dFKyQ X-Google-Smtp-Source: AGHT+IH97l2I3+bwXh9iofiP6Dm9PCAsdAuMxWdBjebNHx/+Mt7NL1gNlIqfA1AKWyN/Y4sQL+5FqQ== X-Received: by 2002:a05:6a21:9990:b0:1e1:becc:1c81 with SMTP id adf61e73a8af0-1e5b487dfa4mr890237637.32.1734475394339; Tue, 17 Dec 2024 14:43:14 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 04/11] tests/tcg/plugins/mem: fix 32-bit build Date: Tue, 17 Dec 2024 14:42:59 -0800 Message-Id: <20241217224306.2900490-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475422235116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index b0fa8a9f277..d87d6628e09 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -135,14 +135,14 @@ static void update_region_info(uint64_t region, uint6= 4_t offset, g_assert(offset + size <=3D region_size); =20 g_mutex_lock(&lock); - ri =3D (RegionInfo *) g_hash_table_lookup(regions, GUINT_TO_POINTER(re= gion)); + ri =3D (RegionInfo *) g_hash_table_lookup(regions, ®ion); =20 if (!ri) { ri =3D g_new0(RegionInfo, 1); ri->region_address =3D region; ri->data =3D g_malloc0(region_size); ri->seen_all =3D true; - g_hash_table_insert(regions, GUINT_TO_POINTER(region), (gpointer) = ri); + g_hash_table_insert(regions, &ri->region_address, ri); } =20 if (is_store) { @@ -392,7 +392,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, =20 if (do_region_summary) { region_mask =3D (region_size - 1); - regions =3D g_hash_table_new(NULL, g_direct_equal); + regions =3D g_hash_table_new(g_int64_hash, g_int64_equal); } =20 counts =3D qemu_plugin_scoreboard_new(sizeof(CPUCount)); --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475468; cv=none; d=zohomail.com; s=zohoarc; b=Bl+XFHF1VcBgT9Sffgbf17uC9KYLhaNQkfOAgwOACxdjlzd3g5xVq/W7cJgZKX2XOVluS8e9W0gutedsAsF62mhM2L7V0gwgPlbCVShUV0XSB01gbnDAKWazhRh/uppdAnczhQ+bKl40uccqYjcXvTOWJvfcuRwaYZGPhrpTQ0U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475468; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=E0X1MlNNMfXe3fyFvrKoslEpzjFsMN2sr/cA5ARxGXA=; b=YuqHkJzwS8TcBZGi7KZ3IWNz2tLNb5u29v+x36rULhdiOyvpVXpijtv2otYq/9uiDiA/Ro1jB+4WUDSZDVJryRB+N61PgDUqoSVBsDgADkktfFXHXUC75/741ubkOYAMMvoA52nEpwYIYffa+uj2COmGOfBu/PlXT+UEaoiD2oQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475468522924.2842477884074; Tue, 17 Dec 2024 14:44:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHh-0004Ke-In; Tue, 17 Dec 2024 17:43:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHf-0004Je-Ps for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHc-00019k-Rd for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso4575806b3a.0 for ; Tue, 17 Dec 2024 14:43:16 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475395; x=1735080195; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E0X1MlNNMfXe3fyFvrKoslEpzjFsMN2sr/cA5ARxGXA=; b=mzHlmLHcZ8Fo7pqVvqGdxzzG9QxkoKMX4Rgvb15Ro1+Hge2csQtIxynVJZrg97tyoW Yk7LCkr5IuYB9yIRDbnFB45gPOYfb7tUuRxUD7SvdE2tmRsofpD0lnBuj5QZKHfIqWE9 m/DsdB+9qE3ruYMDUN5orL25aV3DBSBqLUxf5Wrhy6H6GG8dPZMRsnEg50b5E0GFQ/M+ X8QZU2ImB6wZ6z05Abio2e0bOdSf3/4NnyMq2S/sNsq7Sw/q7viSNGljQf0VOS2a/BZw vmnUVewZzQ2Po5fQwzI57S2ZM5oDl5lrKs6OnFEariDmnB3Zs3r7n0oynYjUNthQA+x6 W4Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475395; x=1735080195; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E0X1MlNNMfXe3fyFvrKoslEpzjFsMN2sr/cA5ARxGXA=; b=gRi2dsIGhrIVLUvweIvXHQGKrguKWowa4pb5sF7VOvdMIU0vUWodgsLV3wsMhOJbEU Vbu1BtxaiJ4fk5bgt0KMABLHEa9EHF2joLhU048oMGqZj8wP/7Lb2dnmnGiL8BEhE/aM JxOoX+1C1ua8IeGN0xzLzV343n5KjOgI0c6fUQgjjZPg1VRTiVf1OLRdBacrKW71NppP +vrJF3NfFK0GkxGIhadIGjnKFfkSzJaFIdvs/5vQWSTK2vB/cP0QrREzL/mfr8wckIf2 CeS7MtfTHcKcTigF7fmTnH+f4MxBbjcBMO8UyusWzhs6xOpk8a0jN956HuRx40OSwJ6X YspA== X-Gm-Message-State: AOJu0YwxEhn4GNeDx9jnMynQt1V4pBQkcVQ1XL+Q5tbnqdpECBIjXO5w hvBrIuJwER6e9vT71F4ZgZF8CHQ2WgJ0gZN46Lfn57e8qZ0hk99/ZOtqLkEoFBlo508T6CNif1j Qp6s= X-Gm-Gg: ASbGnctVRaiO2sQW9BmU5VpOeAVgyP232C62haWdKNcQyaCDh0a1jJTeYVP7GIKR+fc LAwAix3BGk6S2/qTP3TPfwfvpsqwueA6DqZd1lKOE4C+8xnWBXo/wR9hOg6fISk+DA+NHAPprAF /q8PRP8kGWJ/30PF9IITT2FAU6iGF1BqwHbs0N+PXExmycNfUWiZXC2V2qaOC6GL4Luu1EuEIVJ XaloPsLqMO8OvN6bRHkUhUArDh/gUboXzUMGLDVkdkw+KeNGlY5gM7s X-Google-Smtp-Source: AGHT+IHhV1+e7qDlpH/39EOrBl/0IOuMcvsw5ERVXjjgPkTXYRyNqhcHKibk/u+Mm65vUu65rltJZw== X-Received: by 2002:a05:6a20:c70a:b0:1e0:d380:fe66 with SMTP id adf61e73a8af0-1e5b4515e91mr1107320637.0.1734475395262; Tue, 17 Dec 2024 14:43:15 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 05/11] contrib/plugins/stoptrigger: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:00 -0800 Message-Id: <20241217224306.2900490-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475470474116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- contrib/plugins/stoptrigger.c | 48 ++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 03ee22f4c6a..b3a6ed66a7b 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -21,9 +21,11 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUG= IN_VERSION; /* Scoreboard to track executed instructions count */ typedef struct { uint64_t insn_count; + uint64_t current_pc; } InstructionsCount; static struct qemu_plugin_scoreboard *insn_count_sb; static qemu_plugin_u64 insn_count; +static qemu_plugin_u64 current_pc; =20 static uint64_t icount; static int icount_exit_code; @@ -34,6 +36,11 @@ static bool exit_on_address; /* Map trigger addresses to exit code */ static GHashTable *addrs_ht; =20 +typedef struct { + uint64_t exit_addr; + int exit_code; +} ExitInfo; + static void exit_emulation(int return_code, char *message) { qemu_plugin_outs(message); @@ -43,23 +50,18 @@ static void exit_emulation(int return_code, char *messa= ge) =20 static void exit_icount_reached(unsigned int cpu_index, void *udata) { - uint64_t insn_vaddr =3D GPOINTER_TO_UINT(udata); + uint64_t insn_vaddr =3D qemu_plugin_u64_get(current_pc, cpu_index); char *msg =3D g_strdup_printf("icount reached at 0x%" PRIx64 ", exitin= g\n", insn_vaddr); - exit_emulation(icount_exit_code, msg); } =20 static void exit_address_reached(unsigned int cpu_index, void *udata) { - uint64_t insn_vaddr =3D GPOINTER_TO_UINT(udata); - char *msg =3D g_strdup_printf("0x%" PRIx64 " reached, exiting\n", insn= _vaddr); - int exit_code; - - exit_code =3D GPOINTER_TO_INT( - g_hash_table_lookup(addrs_ht, GUINT_TO_POINTER(insn_vaddr))); - - exit_emulation(exit_code, msg); + ExitInfo *ei =3D udata; + g_assert(ei); + char *msg =3D g_strdup_printf("0x%" PRIx64 " reached, exiting\n", ei->= exit_addr); + exit_emulation(ei->exit_code, msg); } =20 static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) @@ -67,23 +69,25 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) size_t tb_n =3D qemu_plugin_tb_n_insns(tb); for (size_t i =3D 0; i < tb_n; i++) { struct qemu_plugin_insn *insn =3D qemu_plugin_tb_get_insn(tb, i); - gpointer insn_vaddr =3D GUINT_TO_POINTER(qemu_plugin_insn_vaddr(in= sn)); + uint64_t insn_vaddr =3D qemu_plugin_insn_vaddr(insn); =20 if (exit_on_icount) { /* Increment and check scoreboard for each instruction */ qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); + qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + insn, QEMU_PLUGIN_INLINE_STORE_U64, current_pc, insn_vaddr= ); qemu_plugin_register_vcpu_insn_exec_cond_cb( insn, exit_icount_reached, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, insn_vaddr); + QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, NULL); } =20 if (exit_on_address) { - if (g_hash_table_contains(addrs_ht, insn_vaddr)) { + ExitInfo *ei =3D g_hash_table_lookup(addrs_ht, &insn_vaddr); + if (ei) { /* Exit triggered by address */ qemu_plugin_register_vcpu_insn_exec_cb( - insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, - insn_vaddr); + insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, ei= ); } } } @@ -99,11 +103,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin= _id_t id, const qemu_info_t *info, int ar= gc, char **argv) { - addrs_ht =3D g_hash_table_new(NULL, g_direct_equal); + addrs_ht =3D g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, = g_free); =20 insn_count_sb =3D qemu_plugin_scoreboard_new(sizeof(InstructionsCount)= ); insn_count =3D qemu_plugin_scoreboard_u64_in_struct( insn_count_sb, InstructionsCount, insn_count); + current_pc =3D qemu_plugin_scoreboard_u64_in_struct( + insn_count_sb, InstructionsCount, current_pc); =20 for (int i =3D 0; i < argc; i++) { char *opt =3D argv[i]; @@ -124,13 +130,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugi= n_id_t id, exit_on_icount =3D true; } else if (g_strcmp0(tokens[0], "addr") =3D=3D 0) { g_auto(GStrv) addr_tokens =3D g_strsplit(tokens[1], ":", 2); - uint64_t exit_addr =3D g_ascii_strtoull(addr_tokens[0], NULL, = 0); - int exit_code =3D 0; + ExitInfo *ei =3D g_malloc(sizeof(ExitInfo)); + ei->exit_addr =3D g_ascii_strtoull(addr_tokens[0], NULL, 0); + ei->exit_code =3D 0; if (addr_tokens[1]) { - exit_code =3D g_ascii_strtoull(addr_tokens[1], NULL, 0); + ei->exit_code =3D g_ascii_strtoull(addr_tokens[1], NULL, 0= ); } - g_hash_table_insert(addrs_ht, GUINT_TO_POINTER(exit_addr), - GINT_TO_POINTER(exit_code)); + g_hash_table_insert(addrs_ht, &ei->exit_addr, ei); exit_on_address =3D true; } else { fprintf(stderr, "option parsing failed: %s\n", opt); --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475419; cv=none; d=zohomail.com; s=zohoarc; b=C2RfbdtEF4i0DpQqUBITb12KSDzMeGr8w9Ak1TDpeNpRtAvPhiOnxm/GO/yVnZNDrPYW+GGMLrgB/9SavY2Du0cNijHlpmTOgbtDHFf1JkOkwE9ECi8kGzbSNwSP+KlaUy9uMsjb3VJF6iIyGiudxvtwTbJTOxZuvyg5UYnG9ww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475419; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7+nQuV745MSVduGtVwWvyxFW8ma4a2v2SK14uCf1mjQ=; b=UxWoLOpkbbvwNOd3x8BuHy/0dTuuBS0okjaBVwwH3ySlQeNYG12LekvxtBD1gg7XNCL+aOi64GGOb5U7IhxMv2uzIusrKFva+w8WyXL3aAJbxLr28C+kFs2yJwfYpGJxr5UBcxu/nn3WHSJ4blLx1uaS7B6xe96gZqPr740sKGQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475419954814.5482609046358; Tue, 17 Dec 2024 14:43:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHi-0004L8-Rt; Tue, 17 Dec 2024 17:43:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHg-0004Jy-QE for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHd-00019v-Kb for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso4575812b3a.0 for ; Tue, 17 Dec 2024 14:43:17 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475396; x=1735080196; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7+nQuV745MSVduGtVwWvyxFW8ma4a2v2SK14uCf1mjQ=; b=a/mBksHYTHQ9MkPGP5YM74WEz2oxK4mDr7QnXTbYQ+MEFSVFNcNjd9BryGmFMugfnl rIcxnJ/BC3FibTJGS3cp/VYsI7ooq8jUpoNopzqxA+W7PZf5KeRQPy6IsrZSgFJObtya miVvADzU+b0CzjGfM6c4mD/30p2FEsXmzgyUcoECW8XrSqNuyMtPeoMufpozEmNNTOy9 afYVAFgzwJkRwYL5164wicbfSK0J7ScfULG3q1l6W4fIFOeM42aDEJLrC/DqO+xqwd0p BeZaFb4atUDB8jrb33EVm4kflANqf5cIK9iS9M48t1Dvm/TPGICwnXMDAsuxFvONIfDc GXVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475396; x=1735080196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7+nQuV745MSVduGtVwWvyxFW8ma4a2v2SK14uCf1mjQ=; b=l7U6OJQexbmEVYBbZX37ccD0QgqtT0B/Szj9uMX/0TfLT8yIbYoRD9r3fg1UW8CPKY 0Et8PadJzz/zGLtiG5+VzIagBaIDYX0WE4wCxCwrz/WVqJN69RwXiOsKhGN3sECgKoGz dGiPN9FQHWevvgfXOXl4ii0eMf3y+fwOKSDQ04ZMfFIcwMOw6Jv5O0Z2KWyGN3GUpIBx S0dUuJLCS32Q4DfA4i1Tu3zkFjQ7226c9PbMD9luztVW8oXLotRirWBM3SeEBQ3Ltk8a ye5IehL8kZCFR0OPq2btCb0PjXLzWWAc+QrBbhQFaMeYbVmj/hXT8gabbGarqxALWupu y55g== X-Gm-Message-State: AOJu0YxIik0dBH56eQFgpaiq6uQQB+oywNoSrKWtWmvj+9bvTFSaArA1 NBlRbfzPyrtvv0wbs21vqwgXlsTTOUscLE5XO37fBVsNH2T5BTW6CZ/iKMhXNY+881wGK0EBILQ MUzQ= X-Gm-Gg: ASbGncsXykDm6gIP9LyxlSwu5uTUOZgni6C3F+QUtYUTI7NzLjnwooaJr1tEnNN9nZE AucKjpnXo1pBo2XLzoXdT+GRa/2cYftOLO3f/BOoj4wyCg/EePpOlqxvulAcEmgyLne9+SJozVl JLo7v1YvrHG4fRZx8S1gqdH9+4s8E0PX6TQW0ZY2W0RGIXQ7IC0m1LfGGiTcEjGZnmqApfYH2VG IgYedQzitSwzOp6p1sH8wns9HJb2e13VG/XoCjKsoMsb/yf5+L7v8cv X-Google-Smtp-Source: AGHT+IEVcYxo6vfxppxRKBr1g1wRzj7evYJKsUDoSV9n/lBdfgjMuj/TntCbYjVt5fdyvnhspmDK5Q== X-Received: by 2002:a05:6a00:114c:b0:71e:16b3:e5dc with SMTP id d2e1a72fcca58-72a8d2dee69mr1079991b3a.19.1734475396186; Tue, 17 Dec 2024 14:43:16 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 06/11] contrib/plugins/cache: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:01 -0800 Message-Id: <20241217224306.2900490-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475420446116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- contrib/plugins/cache.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 512ef6776b7..7baff868609 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -208,7 +208,7 @@ static int fifo_get_first_block(Cache *cache, int set) static void fifo_update_on_miss(Cache *cache, int set, int blk_idx) { GQueue *q =3D cache->sets[set].fifo_queue; - g_queue_push_head(q, GINT_TO_POINTER(blk_idx)); + g_queue_push_head(q, (gpointer)(intptr_t) blk_idx); } =20 static void fifo_destroy(Cache *cache) @@ -471,13 +471,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct = qemu_plugin_tb *tb) n_insns =3D qemu_plugin_tb_n_insns(tb); for (i =3D 0; i < n_insns; i++) { struct qemu_plugin_insn *insn =3D qemu_plugin_tb_get_insn(tb, i); - uint64_t effective_addr; - - if (sys) { - effective_addr =3D (uint64_t) qemu_plugin_insn_haddr(insn); - } else { - effective_addr =3D (uint64_t) qemu_plugin_insn_vaddr(insn); - } + uint64_t effective_addr =3D sys ? (uintptr_t) qemu_plugin_insn_had= dr(insn) : + qemu_plugin_insn_vaddr(insn); =20 /* * Instructions might get translated multiple times, we do not cre= ate @@ -485,14 +480,13 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) * entry from the hash table and register it for the callback agai= n. */ g_mutex_lock(&hashtable_lock); - data =3D g_hash_table_lookup(miss_ht, GUINT_TO_POINTER(effective_a= ddr)); + data =3D g_hash_table_lookup(miss_ht, &effective_addr); if (data =3D=3D NULL) { data =3D g_new0(InsnData, 1); data->disas_str =3D qemu_plugin_insn_disas(insn); data->symbol =3D qemu_plugin_insn_symbol(insn); data->addr =3D effective_addr; - g_hash_table_insert(miss_ht, GUINT_TO_POINTER(effective_addr), - (gpointer) data); + g_hash_table_insert(miss_ht, &data->addr, data); } g_mutex_unlock(&hashtable_lock); =20 @@ -853,7 +847,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu= _info_t *info, qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); =20 - miss_ht =3D g_hash_table_new_full(NULL, g_direct_equal, NULL, insn_fre= e); + miss_ht =3D g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, i= nsn_free); =20 return 0; } --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475483; cv=none; d=zohomail.com; s=zohoarc; b=bT640Ug7bDWAjs+o5noMi0rNtihRnwYwIaVoF+ICAkilEVKDamChULQfgTZZvdJonADGdRXhuKYMD7z0aIuQcJBdZx9F09in2+ai7xCioysY4DId8hH7a2xci7mWZ7T60KWskhEacvZrgsN/eIr9HEAV8t/xN8U2SOKcek7OF78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475483; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gSO3SqC3k3PD4UDj10nreaVmTIRbnjLL+fnwPXL6Pds=; b=B5J7u6GZtLY6tJUyqKHGLe2KqIOD4d2rTgCo5ELtbTAyU9hM/3H71X94z7I8CUIB+KHVWlM3MsadIJR0olxAn24vBglaeyL/3tovaRTgSO3nC9wW+eWoaxYRX+Xw/f3OZfe1wiaQdXgIDJss5CN2/8aaOglPmwAYZgd6RGeOuow= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475483231152.7548610261989; Tue, 17 Dec 2024 14:44:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHj-0004Lb-6a; Tue, 17 Dec 2024 17:43:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHg-0004Jn-Ad for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHe-0001AK-J4 for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-725f4623df7so5204430b3a.2 for ; Tue, 17 Dec 2024 14:43:18 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475397; x=1735080197; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gSO3SqC3k3PD4UDj10nreaVmTIRbnjLL+fnwPXL6Pds=; b=gB5X4eeJskPzkm8pmNWS2gNYrLWy4EYVV3NRbKRJsGIjPho2dLFYHWKrScTwjHNo6+ RL6XFQ13t7uTS/XUS0ZizHh1fPNJvFmdHqoh4RSa+ZifX4B+JJJxKwBeX2nU6m/4PTKs 2Xl5tA2wgwAYPHexNRMZ+fjG1bS0x65bSwVN+eHShuf1EYgbxyQDgA6mGyc5fRqetP/q 1IjF5RlDmnDTn7ASxPf+6TiyWTKqaECZGBgcb1Wnt0URetoKTZpnsq7wnhNwUKoV9zSN xhqgERzeAKnG1TM1s9ilVUDyJaGPaj5OPeMIp3xa94StNvRM9q96Oh5X4ko1uD+e0h4n VKIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475397; x=1735080197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gSO3SqC3k3PD4UDj10nreaVmTIRbnjLL+fnwPXL6Pds=; b=wOZ8m+IHJdJFzLwM5+bX+NwpqtTVQvstGOEhVDPFlaZpEG7lVdc6gT7FSK0SGJstpG /45Af/ZgVjyLwFqzQp0AwiVKYppUEdeCHCioFWDSJAPCxQovZ/aylLEirv1wIbWxgJGO COKAyWP3YxpYckPLWnohvDQwOYOk4Szc8XY17bCQXgu6rCDAx+WOAiaSODVsTlbSfukU 8ASWYyavqsnAirwSln0pQMOGYT4RW8s5moJpJO2AJiGoTuGC3hHMbB8ZyyE9YN4R08Gf mKxfi9D+FY+K5oO2PWTvQHMmNrruVQgH4RQ3KnO47gHCicjfJwBk9o5J3dskVTNyiCh7 Injw== X-Gm-Message-State: AOJu0Yy/c442VNdenUR2TgOJq9gxzb2JicVp7+ngiS/mqagVvKkzcRwa HiK7KnXQro8VEwsyxo8jvXQUIa+xc40o9cnNE38U/5L7jHUcr5nJSTCwETIb75ghoaxkY4eAVkt T8hw= X-Gm-Gg: ASbGncvYWXVuVIOAMuHrDFFEKTK/9jhAFv2+uM83NRt85sqXD5xu9tIopWekow6vw5l es1L9HfpokSsuNN6FY/VOijp+MY+557ziLvFFa/GDnSuF0IIFtlJAN0/I5AEhlOZPnfX++QEx7M NMirvfIQZPagMNLkfrw4PFHwyaNx9qhzwbYcIi2QnKYk6HDcEGM3NAv7KcM6SqJxnuc4b0Y3n2h 10LPtp8SkPKdFo/CiOE//PKPYYWx71Qs2pWoxP+X3t67txY/b8xD1k2 X-Google-Smtp-Source: AGHT+IGcC9iroE+cDy4FJzJW+JsVd7PUZwPGM3vEdrc/l84rdn36WbmNhgU6yGnJSBVid6dMlMXJsg== X-Received: by 2002:a05:6a00:6c98:b0:729:643:744f with SMTP id d2e1a72fcca58-72a8d2ee4f9mr906549b3a.25.1734475397117; Tue, 17 Dec 2024 14:43:17 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 07/11] contrib/plugins/hotblocks: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:02 -0800 Message-Id: <20241217224306.2900490-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475484603116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- contrib/plugins/hotblocks.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..f12bfb7a267 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -29,7 +29,7 @@ static guint64 limit =3D 20; * * The internals of the TCG are not exposed to plugins so we can only * get the starting PC for each block. We cheat this slightly by - * xor'ing the number of instructions to the hash to help + * checking the number of instructions as well to help * differentiate. */ typedef struct { @@ -50,6 +50,20 @@ static gint cmp_exec_count(gconstpointer a, gconstpointe= r b) return count_a > count_b ? -1 : 1; } =20 +static guint exec_count_hash(gconstpointer v) +{ + const ExecCount *e =3D v; + return e->start_addr ^ e->insns; +} + +static gboolean exec_count_equal(gconstpointer v1, gconstpointer v2) +{ + const ExecCount *ea =3D v1; + const ExecCount *eb =3D v2; + return (ea->start_addr =3D=3D eb->start_addr) && + (ea->insns =3D=3D eb->insns); +} + static void exec_count_free(gpointer key, gpointer value, gpointer user_da= ta) { ExecCount *cnt =3D value; @@ -91,7 +105,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) =20 static void plugin_init(void) { - hotblocks =3D g_hash_table_new(NULL, g_direct_equal); + hotblocks =3D g_hash_table_new(exec_count_hash, exec_count_equal); } =20 static void vcpu_tb_exec(unsigned int cpu_index, void *udata) @@ -111,10 +125,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) ExecCount *cnt; uint64_t pc =3D qemu_plugin_tb_vaddr(tb); size_t insns =3D qemu_plugin_tb_n_insns(tb); - uint64_t hash =3D pc ^ insns; =20 g_mutex_lock(&lock); - cnt =3D (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) h= ash); + { + ExecCount e; + e.start_addr =3D pc; + e.insns =3D insns; + cnt =3D (ExecCount *) g_hash_table_lookup(hotblocks, &e); + } + if (cnt) { cnt->trans_count++; } else { @@ -123,7 +142,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct q= emu_plugin_tb *tb) cnt->trans_count =3D 1; cnt->insns =3D insns; cnt->exec_count =3D qemu_plugin_scoreboard_new(sizeof(uint64_t)); - g_hash_table_insert(hotblocks, (gpointer) hash, (gpointer) cnt); + g_hash_table_insert(hotblocks, cnt, cnt); } =20 g_mutex_unlock(&lock); --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475490; cv=none; d=zohomail.com; s=zohoarc; b=B5CpFXr0T13bHBRi0cQWZMbZ1BgTY1gGXsSm3n5G4x9UCVl0l+pv6cq9kL6/sGDyTZnAcZ7UzOxIgP+u+owZOXZpX5XSCY6gkfIS8dtE9wkatKxycgpxi/P2N6c8zNti2zMCjO5fybk3rlumWE1MDVlVG9Y0KF7c7g9k4Cpb8QM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475490; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Fpq9JRkJksoEkEWeOYDLbD75PjoHd4ohCmD67AV53u8=; b=T22Wt24UW18XzJkDm66/7ZlSyRnsx88sHdaHeZRYQRCtsGZmD5ZLJOJNwpjOWQQtXTGsBYlEItiH5BM2W1hBYhGYrlySe3UR+kZrBBu6rgEyC6d9KWgQ7G+sq9eUjAubDl+/WtxpShLFWD1fAKxODouDXcAXPTV2yDgZ66onIEI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475490343603.0490416763224; Tue, 17 Dec 2024 14:44:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHl-0004Ms-Mb; Tue, 17 Dec 2024 17:43:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHg-0004Jz-Ub for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHf-0001AW-98 for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-728ea1573c0so5112694b3a.0 for ; Tue, 17 Dec 2024 14:43:18 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475398; x=1735080198; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Fpq9JRkJksoEkEWeOYDLbD75PjoHd4ohCmD67AV53u8=; b=Iqk/lGhU7rni03XzBqYo/YngFsgOgKjsNKz9sSBzBeDWMEOSWAn3E91gKekUKVcAlg EPmKQpYo57xdsKyfAyzj4JKIqY69FUc1c/4a7rsau+f4hNz3krp0w5C6DlFwFo26qY1K ZkGsUEfnxr9sZ+T9bZsrr9CTZgl0nkUPnpTOAO8nrbUyvjr8l8GZ2QXnpgXoABpMHuDz 99zDtYoXvx5j7fjPmrqP83VamhhWcT+exSJg9fzf8uL0TN1XFvSEZIZNxTKwNwFS2/2w WDuIg0+tON2QLA4cPQmRaw/qRqwTRcEMxc9gNdrcen7qH4Cmbfg2i/g/K9oz9niMJsoW C16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475398; x=1735080198; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fpq9JRkJksoEkEWeOYDLbD75PjoHd4ohCmD67AV53u8=; b=uoiLQ4l/wK/+pJcQ6mNfgYkyZKSXhyWZnyhP+oTwIRu28b0BFB9V4J7QJXwEkeYsst ZNDGyOyGzO+ypZH1rj3zljUg5ZA9D2y4ZXRAfihABe/+Cq8zHXI4hpOu+BO6iCJpPvZJ ap3NiOa69SvsPuprgZJ+IGE7ZFN5+M1JrTWZ617OsKAAaYSpU68qgqM4JxKP/njHZLqD +1HLz2JppI0xE+mdk60/60oexs2fcT9w5nmVbcbhVlVMNX83Pa1hwz+T2zI6UezZY71Q 1R6BScwXWKv0aG2ql0rhIUB2waa2hr8TPqn/QCcO5l93hxZfZcEwZDsRfdtow2fRvX5K mXGg== X-Gm-Message-State: AOJu0YxuSiYklh+9050qRx40CVnZeCrJY6a1h+bT0KVxWVihUCIEG7HK 7fC5MiHoNeIRlTrdVIOMSAkUke7c2v4QR60nxBI/aPbNtn8/9rrYnsIweJUCvPNtlKrEHOj6qpW 0guo= X-Gm-Gg: ASbGncss2W2E4NyU8s5truzlOm+0wfBW+/sb7tNuqqPwHlLr8E1evA+u3ONsSJVHO24 wgmuP9dPqhBuzx1sp7zxu85VwrSahqQ1SpXnvYpJpDcoH/k7VGThc2QHhxu5OMJQpPVv+nwZQyH TaoLbDc2oOrTsD+UXQ481es//IaoLwlCRC+eXbp/r6fFMJfx1vD1AO7o7WaBh/0FjKp8K7s0jd8 oYdhT5Wd1YjCYOvQzEw68cRMrjiAewHILdjqrtuJifLIlYw7SSvMxRB X-Google-Smtp-Source: AGHT+IEDYvJfYG57rYGxOhmIsTt0v8reNhAbSO3hpKXBG93eYpkGY5OVbt7m4JNSYv/INQFu+psG+A== X-Received: by 2002:a05:6a00:21c6:b0:728:eb32:356c with SMTP id d2e1a72fcca58-72a8d2611f2mr992157b3a.11.1734475398045; Tue, 17 Dec 2024 14:43:18 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 08/11] contrib/plugins/cflow: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:03 -0800 Message-Id: <20241217224306.2900490-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475490593116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/cflow.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b39974d1cf3..930ecb46fcd 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -76,6 +76,8 @@ typedef struct { =20 /* We use this to track the current execution state */ typedef struct { + /* address of current translated block */ + uint64_t tb_pc; /* address of end of block */ uint64_t end_block; /* next pc after end of block */ @@ -85,6 +87,7 @@ typedef struct { } VCPUScoreBoard; =20 /* descriptors for accessing the above scoreboard */ +static qemu_plugin_u64 tb_pc; static qemu_plugin_u64 end_block; static qemu_plugin_u64 pc_after_block; static qemu_plugin_u64 last_pc; @@ -189,10 +192,11 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { g_mutex_init(&node_lock); - nodes =3D g_hash_table_new(NULL, g_direct_equal); + nodes =3D g_hash_table_new(g_int64_hash, g_int64_equal); state =3D qemu_plugin_scoreboard_new(sizeof(VCPUScoreBoard)); =20 /* score board declarations */ + tb_pc =3D qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, = tb_pc); end_block =3D qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoa= rd, end_block); pc_after_block =3D qemu_plugin_scoreboard_u64_in_struct(state, VCPUSco= reBoard, @@ -215,10 +219,10 @@ static NodeData *fetch_node(uint64_t addr, bool creat= e_if_not_found) NodeData *node =3D NULL; =20 g_mutex_lock(&node_lock); - node =3D (NodeData *) g_hash_table_lookup(nodes, (gconstpointer) addr); + node =3D (NodeData *) g_hash_table_lookup(nodes, &addr); if (!node && create_if_not_found) { node =3D create_node(addr); - g_hash_table_insert(nodes, (gpointer) addr, (gpointer) node); + g_hash_table_insert(nodes, &node->addr, node); } g_mutex_unlock(&node_lock); return node; @@ -234,7 +238,7 @@ static void vcpu_tb_branched_exec(unsigned int cpu_inde= x, void *udata) uint64_t lpc =3D qemu_plugin_u64_get(last_pc, cpu_index); uint64_t ebpc =3D qemu_plugin_u64_get(end_block, cpu_index); uint64_t npc =3D qemu_plugin_u64_get(pc_after_block, cpu_index); - uint64_t pc =3D GPOINTER_TO_UINT(udata); + uint64_t pc =3D qemu_plugin_u64_get(tb_pc, cpu_index); =20 /* return early for address 0 */ if (!lpc) { @@ -305,10 +309,11 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) * handle both early block exits and normal branches in the * callback if we hit it. */ - gpointer udata =3D GUINT_TO_POINTER(pc); + qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( + tb, QEMU_PLUGIN_INLINE_STORE_U64, tb_pc, pc); qemu_plugin_register_vcpu_tb_exec_cond_cb( tb, vcpu_tb_branched_exec, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_NE, pc_after_block, pc, udata); + QEMU_PLUGIN_COND_NE, pc_after_block, pc, NULL); =20 /* * Now we can set start/end for this block so the next block can --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475535; cv=none; d=zohomail.com; s=zohoarc; b=XXm6KPxl53jDJfn3x8X+kXx1f/dFR3WohuBTUAjanKogQwFZVKIvXvMxoRhYfdwWCBU9OeIcoe8TyWtQJ/UK5w0WgimVIpqb/uqEjUfeH8nQjg60YSDbWR6hZaW1Y3DZSOnMTSQtEGAMgi1Q8kd5v/SlmcT3GhyLdVJ6cqz5HCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475535; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Rw327xVdkany76CVhD99+3VcZY22zDM8k532HNs8NjQ=; b=T+K1KL3gmV2JyXbt/C9fTjDCNfKdL6WgwpqNyK282J/NdQoWttxqJWehwFcYunxe10j0XUS/TKL83sZV1swezXvdRbjJ9gBMDUGdSpkklaA2ebDDhXDAeclhpDjxCJQCzO6JZzjZMq3/Bsw910shsv5hfToPZYHfX6YcICJUdWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475535105798.6804154302285; Tue, 17 Dec 2024 14:45:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHm-0004NN-Iz; Tue, 17 Dec 2024 17:43:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHj-0004Ls-In for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHg-0001Ap-Io for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso4575847b3a.0 for ; Tue, 17 Dec 2024 14:43:19 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475399; x=1735080199; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rw327xVdkany76CVhD99+3VcZY22zDM8k532HNs8NjQ=; b=sACk+fdIJD3tCbI1JA8tK8/Ur0x+MvfyypoCURus24y10/wgEAXYK/dqMtMxo2m0vs /BqD2r46E8ydMkypLwwHlgHSPSaOH7rfQsWSINZEei+x8RIryLaNvBxQWRksDTNulb83 zXXtPx4fSkInSSxtorr6gYYFJB/7TFvjRoXbGa6VVTRMRFTjDgsUp3Y+WBw2m/iRvDrg Dv9q9u6GbqiNwTJ4e/MTQF6GfQQ0l4F2guTh4pcK5/p5EEtocKOXScIGEk9AXZKOeRaQ sqoaOw+axbz98isnHwCevTwA7OzusdQfAibCZJCcnjMt0NQ70ZE4+GqKd2fspDUWnbWy aj6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475399; x=1735080199; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rw327xVdkany76CVhD99+3VcZY22zDM8k532HNs8NjQ=; b=Fabu5T0TnQeevEFiUWf19LfkkIF1evzAZ2IGWsJNr0NCnUV91SBza9CSMc9hYEnu3T FmpbDaxMvA6ukaAlsjTWT52mVuDvXmVjUF8Tae+x03VaAOpmy9/6wX7mlnswXoxuWxQJ vwYJVHHCIKmJRtb4fyFXmTYFteIQVeFhkqAdqSMUVQmDr16RCi3ufUJgASSiWZyiaEqf HHH0RvVKJlO8A3OpAZDRUiO5SyIy4eNypU6m4Ro2H3ARd3owPP6ubiOnVmwfZF1c2+Mk 4m61E28j5O625b59+jT3Dgf9PapOPCXpg+ep65BhCMewCRDZKCDxEbrCYOjY9OyA6ePu Ysrg== X-Gm-Message-State: AOJu0YyQkrhWB3SfMm7FAQ17beaGUYpddX1wyKQNg13o7INssoKD/MVf GdVtzRofZVVzz2oKZDKqCFzJVWXz3RAmTW/KjREU7xMzPKRROXu3YR0elctvPHsrPGByyYfE6JT e6kk= X-Gm-Gg: ASbGnctS/+53ehHrPpoEs0FbKkgG5QUKvdPpCdKCrUIRyoLx55IsQYHiNJZaergk+fd WcvV7IJMWNGaFmAkOY67b4is87aCZOnHi4v9VrQpJ3lbqVY5hBjNPMhBulf0aa00c8u5pI+2ksh bexb0rQLeeJ4UVWv0so0LNmYLz6+wJWp98fO/WFf3STZBxZ8J7eJo2TZUXQS/TQy9YB//0dGfX8 1l1czX0Wtm5CD69hDL0u4IrqiQLPfCtAanjUK1jyCmCLFaPw+rE1Rb7 X-Google-Smtp-Source: AGHT+IGvulE8p89xg5rjVFNmDmQpdz8FWCJ+fhfTbUtW69SqDfMXrBulO+W1ETGlPSnGgYJQbe9O0A== X-Received: by 2002:a05:6a21:1646:b0:1e0:d73b:15e4 with SMTP id adf61e73a8af0-1e5b487e05fmr1261600637.29.1734475399007; Tue, 17 Dec 2024 14:43:19 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 09/11] contrib/plugins/hwprofile: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:04 -0800 Message-Id: <20241217224306.2900490-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475536823116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/hwprofile.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 739ac0c66b5..2a4cbc47d40 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -43,6 +43,8 @@ typedef struct { =20 static GMutex lock; static GHashTable *devices; +static struct qemu_plugin_scoreboard *source_pc_scoreboard; +static qemu_plugin_u64 source_pc; =20 /* track the access pattern to a piece of HW */ static bool pattern; @@ -159,7 +161,7 @@ static DeviceCounts *new_count(const char *name, uint64= _t base) count->name =3D name; count->base =3D base; if (pattern || source) { - count->detail =3D g_hash_table_new(NULL, NULL); + count->detail =3D g_hash_table_new(g_int64_hash, g_int64_equal); } g_hash_table_insert(devices, (gpointer) name, count); return count; @@ -169,7 +171,7 @@ static IOLocationCounts *new_location(GHashTable *table= , uint64_t off_or_pc) { IOLocationCounts *loc =3D g_new0(IOLocationCounts, 1); loc->off_or_pc =3D off_or_pc; - g_hash_table_insert(table, (gpointer) off_or_pc, loc); + g_hash_table_insert(table, &loc->off_or_pc, loc); return loc; } =20 @@ -224,12 +226,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_p= lugin_meminfo_t meminfo, =20 /* either track offsets or source of access */ if (source) { - off =3D (uint64_t) udata; + off =3D qemu_plugin_u64_get(source_pc, cpu_index); } =20 if (pattern || source) { IOLocationCounts *io_count =3D g_hash_table_lookup(counts->det= ail, - (gpointer) of= f); + &off); if (!io_count) { io_count =3D new_location(counts->detail, off); } @@ -247,10 +249,14 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) =20 for (i =3D 0; i < n; i++) { struct qemu_plugin_insn *insn =3D qemu_plugin_tb_get_insn(tb, i); - gpointer udata =3D (gpointer) (source ? qemu_plugin_insn_vaddr(ins= n) : 0); + if (source) { + uint64_t pc =3D qemu_plugin_insn_vaddr(insn); + qemu_plugin_register_vcpu_mem_inline_per_vcpu( + insn, rw, QEMU_PLUGIN_INLINE_STORE_U64, + source_pc, pc); + } qemu_plugin_register_vcpu_mem_cb(insn, vcpu_haddr, - QEMU_PLUGIN_CB_NO_REGS, - rw, udata); + QEMU_PLUGIN_CB_NO_REGS, rw, NULL); } } =20 @@ -306,10 +312,9 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qem= u_info_t *info, return -1; } =20 - /* Just warn about overflow */ - if (info->system.smp_vcpus > 64 || - info->system.max_vcpus > 64) { - fprintf(stderr, "hwprofile: can only track up to 64 CPUs\n"); + if (source) { + source_pc_scoreboard =3D qemu_plugin_scoreboard_new(sizeof(uint64_= t)); + source_pc =3D qemu_plugin_scoreboard_u64(source_pc_scoreboard); } =20 plugin_init(); --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475530; cv=none; d=zohomail.com; s=zohoarc; b=R0i/Bylng+IEpKXqBC6ReZUyQthC5PIqvVFgLnCb9zEI9wawgTX059NIfQies+NVwjogVpKU7P2+b2PFTHhFZan2enXBH7b+61b10brrv1AEtVbLzxls7ymzz6cbRdhw1gec+QOEkodt9PBpt3MYWteQFGv199X3/7hk0XaTx/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475530; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hu3Esp4NNyduPBoo/WasSoSQDzLT4+3rhRtkkpGwr3E=; b=THHwb4MOOvHlNE9CgkaaT+3aW8ZjZS/hfDbtE9i9kK20mgpUPWsZbUGOcAwXe7bDKyeZaDVkDEYgMkC9P+p6VswYF5xHYn0bJ+N3QuHBUPEzDcFRTcste8kvJnKxGmagvHBFb9McMsJfnTP/hzs6KImenMH7IMneofWm5LV5QMI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 173447553076582.2710870544712; Tue, 17 Dec 2024 14:45:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHn-0004NT-Dh; Tue, 17 Dec 2024 17:43:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHj-0004MJ-Tu for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:24 -0500 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHh-0001BI-CV for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-725dc290c00so143138b3a.0 for ; Tue, 17 Dec 2024 14:43:20 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475400; x=1735080200; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hu3Esp4NNyduPBoo/WasSoSQDzLT4+3rhRtkkpGwr3E=; b=tjEl73Gm4ECZ2jnVitQeAAZEi9eqammy2zCXCe7SnYh/XSK4HJji+AekuW/cVwJzvu zzjbqwmcy4YcfDep8uSn7UKBUrR5sgDiMHngO5wzTFduB//8ZEuX0sDHwX4iblrKI8pP qC2zLFoga/idR+Kp04aHwz+CLuCvySsJGV9mkXSSIbWkqRZCb6LEGD6FExqlmNV1X+p5 yzqIz+y41aVDICx1VW2d1tB996OwtLHuX4BPWdII0v+V8HRsmcNsMdq4+7XddsX9OcYF TS5cfu3nJUNNaJSBBY5GaZjqBEcWf87MGbtLmA2p/lXqyQagxwZkqBdGehFxKy0u0wf6 PZhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475400; x=1735080200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hu3Esp4NNyduPBoo/WasSoSQDzLT4+3rhRtkkpGwr3E=; b=D3jVYWlZ3qd0W1XDyuFBlX/04X4VrPLBb2qO4vu8Z/7B4ch5VnlgmUnjVrKW1Ky8/y FiYF1n+97GiGqp8oECUGziCTaWDdRCePYoaQ3AbnfdIq2uNe8xgj79bSlZoBdUOlhG1U TxHgs3vs++OyanXSL7YiOByGwLokO/Vhd1Jo+QZHb7pamNKUZNblJh1hcrEVTpZ6cVxt ZZjwyfYFnvYH/gZGOmsIosewSkqYoWvu8Pp1BqGyEIRY0r3WiYZvEPHxGEJT+aezbwnT 0AqQ9/W16Vcb6uPfIZXOMYfYF/dG2wL3cEZ38zdV2r1vSAlUKzVF/li3BCWtAskqfTKF Pq7A== X-Gm-Message-State: AOJu0YwGIK5tas0GhlrWDLssub65bP3gi4abSMmBLx/wcORhrpsKMG7A mmjpHaVYFZysyvJUjctxkllraxQR+MqPtbnHAMxuptAYfH7W89zh0N3wQvw9msuTdhvMmv3hn0I rNEc= X-Gm-Gg: ASbGncuFjoM+Vcs6ga6r2ncGamP+tb9wtmam6J0Hauw7iYoRe1Ecn1JALKT+pQxlVbe iDz2jjfZLGmxze8ybtg4uZQa7Cqd3Y5ng+s/a8Ko8HWx69SCpWiz2GfLf1vc17XUQwmzn3aYrvd S/GUIVX1XFxNUxmvmzI00gB6wRL3klCFgu+JTkY9e5BNcrQXKLwE/Dl+38Y4VI4IqknUSFEWerK sxmw0wZRO4CrvXNJ+pyKoFfzok0esJqmUxN6ACyShdfQpd+bQTXKjoR X-Google-Smtp-Source: AGHT+IFq+FZeCXaZUx5kF1xcLqImGYXhZPo9xcSFq7rXY3R5u5DgqVcpPBFIp5dp/9IbzlLDb/fxmg== X-Received: by 2002:a05:6a21:3a8c:b0:1e1:adb8:c011 with SMTP id adf61e73a8af0-1e5b5a3e875mr730480637.18.1734475399959; Tue, 17 Dec 2024 14:43:19 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 10/11] contrib/plugins/hotpages: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:05 -0800 Message-Id: <20241217224306.2900490-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475532778116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotpages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 8316ae50c72..c6e64937194 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -103,7 +103,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { page_mask =3D (page_size - 1); - pages =3D g_hash_table_new(NULL, g_direct_equal); + pages =3D g_hash_table_new(g_int64_hash, g_int64_equal); } =20 static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t memin= fo, @@ -130,12 +130,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_p= lugin_meminfo_t meminfo, page &=3D ~page_mask; =20 g_mutex_lock(&lock); - count =3D (PageCounters *) g_hash_table_lookup(pages, GUINT_TO_POINTER= (page)); + count =3D (PageCounters *) g_hash_table_lookup(pages, &page); =20 if (!count) { count =3D g_new0(PageCounters, 1); count->page_address =3D page; - g_hash_table_insert(pages, GUINT_TO_POINTER(page), (gpointer) coun= t); + g_hash_table_insert(pages, &count->page_address, count); } if (qemu_plugin_mem_is_store(meminfo)) { count->writes++; --=20 2.39.5 From nobody Wed Apr 9 01:10:19 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734475502; cv=none; d=zohomail.com; s=zohoarc; b=lvElxJYeMdQ84uxp9GfQrRKTIGXxYRMfHBrfJgp8QDS+wO52gXj13SOS9NIjLJ4PEMUKxj0Teokw3xhA3qsq63pefYQ+xvm93+UJxRPpRKktOwgQMiC75lyfRFDxIOWbapXUbLlle589uLPAGcGxxxo5W2SIWwLv1GQpFQj2M/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734475502; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jgxR9arESI3Aidanx+cexjGed292D3H2X6RqwRpaLC4=; b=R7Zz7/XkmB4l9vgf3lyangNsw13sfhU6JRdlhuzOpXmtOOEsj3bhiH5IAMNfVNBk4z1XoXrycNcjc+Uv6F1TQJa2cd30pt/mDyDdjQkK92tL0sBnjiIUgNUxYF8zwFrVtSQApWe/NOmO4wXMhMsNZ9cvbz9HXpAayjBDeWH1Tzs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734475502079553.5539069252886; Tue, 17 Dec 2024 14:45:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNgHl-0004NJ-LS; Tue, 17 Dec 2024 17:43:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNgHj-0004M9-Nr for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHi-0001Bb-1o for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7292a83264eso2468954b3a.0 for ; Tue, 17 Dec 2024 14:43:21 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475401; x=1735080201; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jgxR9arESI3Aidanx+cexjGed292D3H2X6RqwRpaLC4=; b=B/Eee2/BQZ6S80+QlreecIwlDk6/dbBNBBjqgkezvwtqEpcnmTEv791tAaDcAiLSkw 30pOxW1Jj8KbxGOU/FOQTrf0RUNNyIaI79nrNkVncJnhFwLONAUPXAaMuLvBDk8EI+2M hMn7PiFIpWF9ay/rgbJ1bL14Waqo+qDzLewjTJBvT2wgj+9x8FRXa4dwrweViD32XCh3 4cC/P8wisHxF4B2ZuWed+shYtql8xxYh69Oa+kDpmTdkWmEEdzwu8jTKuchJm9lXfXg/ PR8xDDyzh159dsAYt4Izb9fh3LrpIMJ5JvndqnKytH413Dm7uF6EKfHun/OJGgjuBPqw 8Idw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475401; x=1735080201; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jgxR9arESI3Aidanx+cexjGed292D3H2X6RqwRpaLC4=; b=IOt8pi6ORp4MI+FzTxjZI2xGnatoBrA01ysYEmJRjoOkMLGBIHRAiE9Mel78Lkj3m9 oUYl3NZbx+XBx4MXFbnaopglA+RtA3od/qBVV6dhWJZ37M+k6zp9pRWSaiZrl3Nt6T97 Pzn475U25a1+AwLBlcnmg2eEoHNMRyIiq+z7bzDClSSEhZUi4xCIFwChYr9BmCoLJvSh YdQzBEiiGgd9Gm4oYhQIzWboBIjTBSAd/7My8V7rZHJ5+doD/AuvbkOHv78jUrkMG8D0 OXdcmixOd9PNTLTSYhHHyu/oHpcV7xOrkkqZsdcd3NH4+HfIWGSLDJSFsTaKI3f5Bi9r DwrA== X-Gm-Message-State: AOJu0YzdXZXLcq431zl2Fl5hmz+XZ3S1r+IboPs5wuHGVEd5UQYBa5Nk Vs5bfyw2yqCRn2LGSsbQ+F93fKyAsY09tjM463mNtB0DaqRDJRnATX+ik8r4BMQf04CqigSZbz/ /9HA= X-Gm-Gg: ASbGnctAYUKq2jceSpZWucifDkx4JTaGxv14N99KfYxGhcOTMSBQxuwbrWBVylbVdMW Oiyecs4xktnaS6p5zo/7SNe2y/1mVpBnV1Zph3M+TNuQN3tQrqm9abbpTVZRC62o6WxYx9nABFh uhrTcEuQ7PHtPXQcdm6tnz58s8YdJyWc0t16VXNlYuxKMVPZFMLlb5keSrPEqk5INeqStRriG+7 +BPHjVpPmanHtnMsOD38fOVjKPq3LDZni6joUdiSxZWAe+0DUL8EYq9 X-Google-Smtp-Source: AGHT+IGN6BduqgEMB5ckD0vOMFunG6nxzDmBNpQZSvK87izGm+GAny8oGTFSVPrUOI3ohevVDfFeag== X-Received: by 2002:a05:6a00:2906:b0:724:f86e:e3d9 with SMTP id d2e1a72fcca58-72a8d260780mr971134b3a.14.1734475400871; Tue, 17 Dec 2024 14:43:20 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 11/11] configure: reenable plugins by default for 32-bit hosts Date: Tue, 17 Dec 2024 14:43:06 -0800 Message-Id: <20241217224306.2900490-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734475502572116600 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- configure | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/configure b/configure index 18336376bff..02f1dd2311f 100755 --- a/configure +++ b/configure @@ -528,25 +528,6 @@ case "$cpu" in ;; esac =20 -# Now we have our CPU_CFLAGS we can check if we are targeting a 32 or -# 64 bit host. - -check_64bit_host() { -cat > $TMPC <