From nobody Tue May 13 07:09:24 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=1734397793; cv=none; d=zohomail.com; s=zohoarc; b=dA2B+psPabHYvRtpAH1Pkh2jnjvqqDd2jMpiZqPTAoGgQRIlNtl3+ziiBWGNQccuo1NduVC4p1YgyqoU1TxWSSJ+Eev5g8CtKb/rSO6yVLn8wH4baNpygO/PN04CPYUPfvfAUsGTu1v3OSo8eWWAkr9buZzsTkqEo91RQBJ0Shc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734397793; 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=J4yd/tBwPNPBRY/0J+B/Kg1jzHM613LeB/uGZ5OlcYk=; b=X7M4nbmZ2J/yoH5yGARjPwJvMrzvR5pHdYwoIWZQG+5FYON2Y1XjscZO4MNc6Y7ODEWVhwS/Lvy44/fCWSlYF1Q+hX4V8nfSibTtWafrCWksro1KjPJPBPOZGdA6fJbGBLUUODbO3u+94UDGtxM5I2UgfZiB+9AISLlcQIPPwcs= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734397793597888.289174221569; Mon, 16 Dec 2024 17:09:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tNM3h-0008I2-Lp; Mon, 16 Dec 2024 20:07:33 -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 <pierrick.bouvier@linaro.org>) id 1tNM3d-0008HV-4p for qemu-devel@nongnu.org; Mon, 16 Dec 2024 20:07:29 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1tNM3b-0004yS-Hk for qemu-devel@nongnu.org; Mon, 16 Dec 2024 20:07:28 -0500 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2ee9a780de4so3113031a91.3 for <qemu-devel@nongnu.org>; Mon, 16 Dec 2024 17:07:27 -0800 (PST) Received: from pc.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-218a1e6d0e4sm48746595ad.261.2024.12.16.17.07.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Dec 2024 17:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734397646; x=1735002446; 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=J4yd/tBwPNPBRY/0J+B/Kg1jzHM613LeB/uGZ5OlcYk=; b=K2xmaP9Pw9PUacevACZWtRYiwodluRfZl2IVVNxG8lxLUbAVz1cWygBlkccjBUVO9n IA1FM5IuzD9AzUTKPQ1gZWext2UWeUjh5kJQK3JEK4DwmNHqLc7+GYrFYZqNTKIZHjd/ yIKPSTUiZWOfXd0gQhW9n5zANhm86lmyXnt7JjrwLbHu01t4lfERtQCh8qOpXc5/UeZF MZdhLmMOT/el1VVNoLTxSyi1r085UOu9i++Z6KnvFM+HqP7t2b0NhFP9xjSR0GZpkBLm 9DXUYMwrvDLiFM33yzm86x3UCdKP+n7gh5i1KG6DJTGBpMNXqaP5Qi9IxRG81eCaWIDZ bBAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734397646; x=1735002446; 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=J4yd/tBwPNPBRY/0J+B/Kg1jzHM613LeB/uGZ5OlcYk=; b=vjoaPGNmTM8+pDfYAu+7O0+QMGWdGWlmK4rPyd98GsJ8+Xc7YWnJYtQSE1HtKo8v0+ zzmAroN8+zSXO9AV9GAUce/1NX0ehZZSW656AsZ7mmsLf5xfUO9x/g9hygIAyUUliKgf BJ6tMWnhlcdg6arwe858bVtQCEVBRAoHmO4fMcJReV86row57FMzqPOoFHIRV8nhEGDp 1a/qeVLVGYrUlmAs4Xq+RCh7TroixljON4wAXZiimBIcdfqyjiWURdgIW/q8KoViF681 DD/WuEPerYYEggO+B7g5sCh3g0GQKxpVxCUlGtdcMiDnYk+AMhQIebbuidmFURME8yKl aQ5Q== X-Gm-Message-State: AOJu0Ywdwx+ZZjwwkySs2RGt2aHRslZp6kXSNUCApyCqXzF1x8Q18fkE YDREDq5cFwDsZyqA4s8Hoi4cKcmrqCyn04lH+3r2Sw4M15p4Vjo4qkHc8F+lgEt0ulLF/olMshp i2xY= X-Gm-Gg: ASbGncteXVu8axb+EAGYR6FD5FQdU5FvX44HXNhpBA3eiUQJGcMLzZswJ1m06Se+6al xu68HgAe8jZ1J/zRPMe4olw872yuqbGbZce0UrjwjFvWxJ1W0mVHh4+0Ia121ISR99VKvqOQ35T B4zZQaDhW+OWw5AcqmrufZE9vbTd4wqXkr2HxeFwEpqdPHDD+sMAIM7H/jmypYMDVL88eiVbnWd cZNRzSdo5c/3fArejWLUwyfXtM2x6DIuPJuYh5Z9g9jUivIQuIl8G8YBL7BiYxgsbvmYfyCz3JE esMbmPrKFgYQb2w= X-Google-Smtp-Source: AGHT+IHR6JZbza8aEyEMkScKl3yzbecxn8Y8NpROIDO5fbxiHeY88O1XMfa37Jm9qVNFctmO3lXkUw== X-Received: by 2002:a17:90b:2fcd:b0:2ee:b2be:f390 with SMTP id 98e67ed59e1d1-2f28ffa7e4dmr18261917a91.28.1734397645981; Mon, 16 Dec 2024 17:07:25 -0800 (PST) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee@linaro.org>, richard.henderson@linaro.org, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Paolo Bonzini <pbonzini@redhat.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, Thomas Huth <thuth@redhat.com>, philmd@linaro.org Subject: [PATCH 09/13] contrib/plugins/hotblocks: fix 32-bit build Date: Mon, 16 Dec 2024 17:07:03 -0800 Message-Id: <20241217010707.2557258-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217010707.2557258-1-pierrick.bouvier@linaro.org> References: <20241217010707.2557258-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::102b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102b.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1734397794065116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- contrib/plugins/hotblocks.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..09b0932275c 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -34,6 +34,7 @@ static guint64 limit =3D 20; */ typedef struct { uint64_t start_addr; + uint64_t hash; struct qemu_plugin_scoreboard *exec_count; int trans_count; unsigned long insns; @@ -91,7 +92,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(g_int64_hash, g_int64_equal); } =20 static void vcpu_tb_exec(unsigned int cpu_index, void *udata) @@ -114,16 +115,17 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct= qemu_plugin_tb *tb) uint64_t hash =3D pc ^ insns; =20 g_mutex_lock(&lock); - cnt =3D (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) h= ash); + cnt =3D (ExecCount *) g_hash_table_lookup(hotblocks, &hash); if (cnt) { cnt->trans_count++; } else { cnt =3D g_new0(ExecCount, 1); cnt->start_addr =3D pc; + cnt->hash =3D hash; 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->hash, cnt); } =20 g_mutex_unlock(&lock); --=20 2.39.5