From patchwork Thu Sep 7 10:50:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720600 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp163407wrp; Thu, 7 Sep 2023 03:51:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErMIvLgpa3nuzEWZO+gOj7sbURbNX2LhQTp6slj/o8/h/maw+QiDZTitPX+g534Md3LI0N X-Received: by 2002:a0c:8c8e:0:b0:63f:5868:ae45 with SMTP id p14-20020a0c8c8e000000b0063f5868ae45mr16928159qvb.11.1694083903927; Thu, 07 Sep 2023 03:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694083903; cv=none; d=google.com; s=arc-20160816; b=r65CQoJx6KWXd3UTuZmVK5oNNFjDgirsN5p/i04NminW0jd1P4DqfkiklfCTXQ5yFN fISbr+eGZjomVjju1Y2uyIqGDMX8UZR1Ub+B8tQ8eXnIsiGfuYfJ/U0BTF3GCsTAqk1P 7f1UkTB+nZyCBhKeXHaGsNmsaPqoC51WvU3YP0uXSFtGl41n5ECyHyKZchHQVGslS7Ii KNJZFx25Cbf77rEle8aGdCuSQQ0TDHyhPHPgsm/LvuXgOxoMur3CKGR+kE4BCnSryb7m Fa/vzel/Rf1BFc5HHViD49SS0rtHgOxinruT99EPry0trXw1NFS+Wyq3xxAMHiacao3l 3bAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8UPE02/7YQA/fj5qIs0xbVE8XkqTuGFuHRJC8n+RDZU=; fh=BW8kVGHgEV8gn3zw8WoObUnBXsqPghOK4kNDCIpquMI=; b=ADCvwTaG7Zo3S1OoNieGUicOj27Gl+heKGzx7xlrme6c7IqKAoj8a/LQGoFgPZ8NL9 4eV5tolMIUznpD50UjzZGmeVL9Xh26B0MypRK9e2q785H6WcmxWNvn8FDufrXoPiCAXO 7xKGgxqOm7riXQM079lhuQqtRrVEx8BP9/Knnsg91BZzBaVm2dOKCkcfo8MZOzsFFB2B 9q3o99lqi+gIrao6RzQm3CcFA+P2eIow8Lfk1OxcnpXj92TdKI5gLfMsKNOECQMtJV3m VAOLDRqF8NFHXhx+2DdvF3nEG5396n5Yg1BSprWiHkH7YV0Ap1JAXBa1TEB/5hkIqSwL 9lqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kamw+vzp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u7-20020a0c8dc7000000b0064f3f9c672csi11297966qvb.480.2023.09.07.03.51.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 03:51:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kamw+vzp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCal-00005B-2g; Thu, 07 Sep 2023 06:50:31 -0400 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 1qeCaj-000052-3A for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:29 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeCaU-0004k4-Nz for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:28 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-401b393df02so9619055e9.1 for ; Thu, 07 Sep 2023 03:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694083813; x=1694688613; 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=8UPE02/7YQA/fj5qIs0xbVE8XkqTuGFuHRJC8n+RDZU=; b=Kamw+vzpoLMM1mW1dUh8Qh1miJ3VtCF0wgV1MBnyJJgF8V3bfieJJGuZ1GJTD7Jt0D 1UXEPRQJAjn8gWqRM+iE1Vnmdo60eP6Qx8rl++yde4rji8ZvJXw+mDv2fmxLV6dVyGA0 NAWQVJa54r57jN91S4mbIT3KVbIRCKuRNEPcBN3pnI7GNyH9A7gJOo+9HDr+IJZmhowH RZ2epVAd0cvoNW0R72xqesLrtvvlmBYAqX3dUTh9dxp2ytHRi8fQ3uDYGF/DjA4jWuHd 8GYniqfYfOT1ghs8oQvY7wBxGmRznHpkDza7uDP+Mg/ZPXoTjfJmuh4yg8JHB5mMynR4 DYYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694083813; x=1694688613; 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=8UPE02/7YQA/fj5qIs0xbVE8XkqTuGFuHRJC8n+RDZU=; b=PXQ+fl/KDblJBUixdbWXgVfmLdv1ly7m5F13iVbkCPIIjrRlERaWZgs0MACyzxA1KE v7nREcuDGrMTXu6j/guuOqpQS42RwLGkf7mJl/uo4opkzsA7PeOZvB1bEc0/YaJfrqnm z71y56UOo9RdNjf6OvVlpRnNFdAInx1/TMhh1OotX8JJMmtpIiDaDDlqTcC7JR5BQd7u Qcm6XLpm5tp/6GN99U/L1rv/rXd1YQ4iQkL7Vjyd7qg0PGR8qQVIpHNNUvK4p0lIoddw uGmoSOqICMKuT8i7rXHgWv/64Qcu/4qCpHAUf+UUqOHB3FBMB/46GudvU3Lb8SsqZ/K2 qFhg== X-Gm-Message-State: AOJu0YziN1DWgYsWsd2y9W6tK8wRlEDeMECcCsPKmSz9z8RnZNEzrWrS 0OZUODQG6GXZWfJjbkc5LZKZyTgVZ9apksEdF10= X-Received: by 2002:adf:f689:0:b0:317:5d60:2fea with SMTP id v9-20020adff689000000b003175d602feamr4401345wrp.52.1694083813065; Thu, 07 Sep 2023 03:50:13 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-226.abo.bbox.fr. [176.131.222.226]) by smtp.gmail.com with ESMTPSA id f12-20020adffccc000000b003143c9beeaesm22901440wrs.44.2023.09.07.03.50.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Sep 2023 03:50:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH 1/5] contrib/plugins/cache: Fix string format Date: Thu, 7 Sep 2023 12:50:00 +0200 Message-ID: <20230907105004.88600-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907105004.88600-1-philmd@linaro.org> References: <20230907105004.88600-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This fixes on Darwin: plugins/cache.c:550:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_daccess, ^~~~~~~~~~ plugins/cache.c:551:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_dmisses, ^~~~~~~~~~ plugins/cache.c:553:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_iaccess, ^~~~~~~~~~ plugins/cache.c:554:28: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l1_imisses, ^~~~~~~~~~ plugins/cache.c:560:32: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l2_access, ^~~~~~~~~ plugins/cache.c:561:32: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] l2_misses, ^~~~~~~~~ plugins/cache.c:665:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l1_dmisses, ~~~ ^~~~~~~~~~~~~~~~ %llu plugins/cache.c:678:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l1_imisses, ~~~ ^~~~~~~~~~~~~~~~ %llu plugins/cache.c:695:52: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] g_string_append_printf(rep, ", %ld, %s\n", insn->l2_misses, ~~~ ^~~~~~~~~~~~~~~ %llu Signed-off-by: Philippe Mathieu-Daudé --- contrib/plugins/cache.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index dea4a56c8d..4fca3edd07 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -545,8 +545,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, l1_dmiss_rate = ((double) l1_dmisses) / (l1_daccess) * 100.0; l1_imiss_rate = ((double) l1_imisses) / (l1_iaccess) * 100.0; - g_string_append_printf(line, "%-14lu %-12lu %9.4lf%% %-14lu %-12lu" - " %9.4lf%%", + g_string_append_printf(line, "%-14" PRIu64 " %-12" PRIu64 " %9.4lf%%" + " %-14" PRIu64 " %-12" PRIu64 " %9.4lf%%", l1_daccess, l1_dmisses, l1_daccess ? l1_dmiss_rate : 0.0, @@ -556,7 +556,8 @@ static void append_stats_line(GString *line, uint64_t l1_daccess, if (use_l2) { l2_miss_rate = ((double) l2_misses) / (l2_access) * 100.0; - g_string_append_printf(line, " %-12lu %-11lu %10.4lf%%", + g_string_append_printf(line, + " %-12" PRIu64 " %-11" PRIu64 " %10.4lf%%", l2_access, l2_misses, l2_access ? l2_miss_rate : 0.0); @@ -662,8 +663,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l1_dmisses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l1_dmisses, insn->disas_str); } miss_insns = g_list_sort(miss_insns, icmp); @@ -675,8 +676,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l1_imisses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l1_imisses, insn->disas_str); } if (!use_l2) { @@ -692,8 +693,8 @@ static void log_top_insns(void) if (insn->symbol) { g_string_append_printf(rep, " (%s)", insn->symbol); } - g_string_append_printf(rep, ", %ld, %s\n", insn->l2_misses, - insn->disas_str); + g_string_append_printf(rep, ", %" PRId64 ", %s\n", + insn->l2_misses, insn->disas_str); } finish: From patchwork Thu Sep 7 10:50:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720597 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp163270wrp; Thu, 7 Sep 2023 03:51:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEW7DyMTNzCYME7uYvqAK6f90gDnrB2V104jUbdIw2gKcLs3pFOTMQphbUH0cloO38tSwS X-Received: by 2002:ac8:578d:0:b0:410:a088:38f5 with SMTP id v13-20020ac8578d000000b00410a08838f5mr21834953qta.4.1694083886659; Thu, 07 Sep 2023 03:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694083886; cv=none; d=google.com; s=arc-20160816; b=j6asJ4wOUJhIkOC+heicnowWD5G+HfwngNlE0qjQBoFeaWX3IR5aXS+RRdNwV03ufG UA0gVZt77aL0EO4BaYMzQ5XQOrK7c+qmkXdkK+eJlGJLOT1pCwwC7fHgxc8rAnOLKW1J VKEPZxVqX9UUX1YE8d9OFDa8nJ0qGnWIFnpdkPsbilnC5wbFwZQR7E8Z9+vvhYJTF0So wAM8s/68P6ypynXlSc+WdsK0uXOBX1oJ792wJWUYIgqSm6qbUuxNWxSIAiaxUmRh7I+T am2e0E68AecjSkz++tmyVrhKgOLvMtD5lNyI+B+XOPVaqxR9DbdslEFUkC/pL+ZjhN0l GQXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qR76MJysRFRlkGpkSxfycYOt+ElbLTNXgKJufTxw2AU=; fh=BW8kVGHgEV8gn3zw8WoObUnBXsqPghOK4kNDCIpquMI=; b=0JarNRXfeFVpp0Uezw0v6Leen+DNeVnZXkSA5YVu/149R3RpHJH67G4ghRTCSrA6fH LUU9ZOPAmfrcUDYq7JAOcAtVrWVEjEVLIbuItXlWe5TOCj6OyJ1xW6pLKk07Hq4ykgo1 g58eyJ4T33l0TzQho670gt+O+5vt2dwluurAKO3zxYCmmODfCSMIJha48hBtvbE/PvAl GVDFlc9ccmQ2ZHiWdTQ7t/a8i8mdrPS5XxoNby09QilTqqd2r3JyrdAH5ZWIqcrX9QDH RXNL1PmdJXjCOJTTRZh9OIiLeE7bBiuMB9LTsOMWvXP0T246rzqt/43UIZ4a21+0PhPq xGwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gulcJRA7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x18-20020ac85f12000000b00410993e39e8si10978776qta.260.2023.09.07.03.51.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 03:51:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gulcJRA7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCae-0008VK-8q; Thu, 07 Sep 2023 06:50:24 -0400 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 1qeCac-0008TR-KB for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:22 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeCaa-0004kd-66 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:22 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-401c90ed2ecso9272665e9.0 for ; Thu, 07 Sep 2023 03:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694083818; x=1694688618; 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=qR76MJysRFRlkGpkSxfycYOt+ElbLTNXgKJufTxw2AU=; b=gulcJRA76m7pJodcyzudwxUwmifekV+Z+Nx6U3MT0Llie2MDlOVo+W8ucQg1M3Mov1 eOtYNZXpUzmT3nJbjXqYbi5gRMHo04utZezVms0TwJnwKaDmlGZJwbMMC0gcnEYLms5p 1WDVlsYdk9geKQieKCcJi4slvhis0z9Zbv1brTwJe/WtbWRx1ShSNoLZbYPw2KGY7Srg vb6u6hbfGJgN0M7dzR5mQP1p0HnnSVrcXSarL0Cn7sE641JoK0u3Y6610p/uEwogOqRq WpyE1FdF/T5ya34nLhFfVJi9v76xA2Yk6sHpPwlx38Y9HaCXejVs32CSm6LE881uytc5 +6Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694083818; x=1694688618; 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=qR76MJysRFRlkGpkSxfycYOt+ElbLTNXgKJufTxw2AU=; b=ksyXzRsCWNepeJRawuqlCLqMo8Q9teikArhD2eB34ojWQ34kxt0KbMyERbHQ2wn/xf Da3OY3yrJJ54PCMbRBwQctqa7pf2h1eiGu+B5kl0gA3+2z4Qo6K5ME//51XlN7zgZwSa hc5rTBikgibcWM6AEJ2YsHd+gpQiRKKFK6lslITknoPH5SxD+6gdMt23hlB9rlf+K3s8 68EM3kyiTLcAKQlQ7+3sikCOd9HNpnBXJN4xN/0aa2II/5K7IjETAjlDL0G5meauKdyh K/NdkW5SrzMDG3BdvzJqWabuS5OV2rhEZV11D6u+kDRU28WnL8nmHfixqi8dxPg6mF/h r+4w== X-Gm-Message-State: AOJu0Yw1thU4TqX7dyLjFU4TTamsxdBTDGOgYWH/yIRITSqdGohbVh3R FZZHVynI4vn0EjTsEbamOWU6r6IX7Itw0DAoVJU= X-Received: by 2002:a05:600c:204:b0:401:be77:9a50 with SMTP id 4-20020a05600c020400b00401be779a50mr4312229wmi.8.1694083818635; Thu, 07 Sep 2023 03:50:18 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-226.abo.bbox.fr. [176.131.222.226]) by smtp.gmail.com with ESMTPSA id 23-20020a05600c231700b003fed4fa0c19sm2191436wmo.5.2023.09.07.03.50.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Sep 2023 03:50:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH 2/5] contrib/plugins/drcov: Fix string format Date: Thu, 7 Sep 2023 12:50:01 +0200 Message-ID: <20230907105004.88600-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907105004.88600-1-philmd@linaro.org> References: <20230907105004.88600-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This fixes on Darwin: plugins/drcov.c:52:13: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~~~~~~ plugins/drcov.c:52:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~~~~ plugins/drcov.c:52:35: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] start_code, end_code, entry, path); ^~~~~ Signed-off-by: Philippe Mathieu-Daudé --- contrib/plugins/drcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/drcov.c b/contrib/plugins/drcov.c index 686ae0a537..5edc94dcaf 100644 --- a/contrib/plugins/drcov.c +++ b/contrib/plugins/drcov.c @@ -48,7 +48,7 @@ static void printf_header(unsigned long count) uint64_t start_code = qemu_plugin_start_code(); uint64_t end_code = qemu_plugin_end_code(); uint64_t entry = qemu_plugin_entry_code(); - fprintf(fp, "0, 0x%lx, 0x%lx, 0x%lx, %s\n", + fprintf(fp, "0, 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64 ", %s\n", start_code, end_code, entry, path); fprintf(fp, "BB Table: %ld bbs\n", count); } From patchwork Thu Sep 7 10:50:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720598 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp163403wrp; Thu, 7 Sep 2023 03:51:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqOsK7yIrhzg4U3php4K+dPsoOtcHpLj46OZ6DrKPTKH3B+YLOdE1odMovypbW3LmQpnXU X-Received: by 2002:a05:620a:248a:b0:76e:eeaa:a079 with SMTP id i10-20020a05620a248a00b0076eeeaaa079mr22148723qkn.10.1694083903787; Thu, 07 Sep 2023 03:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694083903; cv=none; d=google.com; s=arc-20160816; b=bqECTtSQ0DLV0kMqsuVcI9kIVhHuCl3eRFp16eismNvikC01txjJHPXHTQyAwko4dE Uf+DyXu+P8JVn6YnYvcF67yEs4mQ5EW5iuFfP4HfpUlxN1lrIjyh8M5SEk0jTkeUT1Oj TnkKvJSkHCNb5B4G8kuRbO+QajpVq5NzsUiuanSFM/BNIAkUe4NsfkNZ5Gw3xFocNEjH eLud4XL9+o8SS2M4wc0YIgAiArO1zbp/iFOVhKyhB3XTWjrT88MuidkvuoKKfmwNNejF 1IQ03bjQyPcEAFHnq7EbzivU9GTP9R09OGJSL0R9YpY09JbkuTpE+GP+jQrzxR43/r42 Q0BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EGcUdcCLBUtbOEaXKDnL3F02Ox1clS60PlAXYhCrD+c=; fh=BW8kVGHgEV8gn3zw8WoObUnBXsqPghOK4kNDCIpquMI=; b=gGhtj1ES5KiHw3yoJkOa2AISlC8RccdFhGikSGLRU1g0/awPSIqQGlSUR//3TEDPTP PDmMXk1DLlURvV94fd0JLqrtJcyj9P5KGY6CqdYLVkvMFG7w1A9FQ/jk8vZqOr3hG5vc ddc4tPjU7X2+tEFUDrzexpVFbHYmQpLfiew4QJoDNYsavg6GsDIaPf4AKshRCLS4ZZCP 6aqHzcK01+ZkiipXDIYXuzKvtGy1sL6ZazcXlDa3nti34F70zp3ow2gCAsEy3k+Rqbca Nk5KGEfNsdAtA1znaTwc3JHTe1jFJ6fGHSnrqD9xxDKsAA7+3kwA6nNO8xZXeJGTFv8J ZXAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WB+XGbeH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bk26-20020a05620a1a1a00b007683e40b553si11895345qkb.440.2023.09.07.03.51.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 03:51:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WB+XGbeH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCaj-00005A-MS; Thu, 07 Sep 2023 06:50:29 -0400 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 1qeCai-0008WR-LG for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:28 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeCaf-0004lM-W4 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:27 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-401da71b7c5so9170285e9.2 for ; Thu, 07 Sep 2023 03:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694083824; x=1694688624; 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=EGcUdcCLBUtbOEaXKDnL3F02Ox1clS60PlAXYhCrD+c=; b=WB+XGbeHp+W5KAyFB3kw4vthhkDKqJBQcVyZKqoXcGJrKr955AhyVrSbAGV+U0XcV0 Fm2S7D8QpUZU8aDLslMftlMzD/KP1hfd0n4f0tWtP/MCl3ub7K9Keu0FYLTloJBSWadH zfbSpfCpNRJldMUOBpJxbhYhqFJmJ6tSsHtWlPwse6ekoea8w9bIVzf97kt2lXtt6YFk VPole3v2PFMIgs7VuGlivlk2nfM9jXHgeBLeBDHr7f89qIU55nKQa4FKa4xY4lRk7UX+ 8flT45S3Jf4s78uiekedTTyGjRbvcvQNsusUWR7NfQRFK7Nmlev8JFjX21r8eLFDmz3A 3zVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694083824; x=1694688624; 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=EGcUdcCLBUtbOEaXKDnL3F02Ox1clS60PlAXYhCrD+c=; b=Oad3ILRi8nUxdWAPemMyP/YNZVwA4jYw96U6gxiF47cTGKvsptqQXAYWYI3LocFQvW W6Ykstb15YKI4bmawREI0QvrrhiUGrwxx2N2Xm5WiOxvv/vC8hQEa1BDegW+tSCO62pF eQA8Drb378wGg492hS35ZmghqowV/jiDxIaOPDa1q4Q30U/Sfo1sRrtIAL35Abckaii6 fTnnJhi9PSAVhPQVJ3vEYpkaVrWDhB8BaK+jr8zHnAaOMJMj2WmrSCb/PiUySjq94x/N mAvQw8JKlZxPa8ZTuH2pN4cSJ94LKGJZFESUn44YjYlarOpNq33rVVQiSNXBmIIjZpYs XF3A== X-Gm-Message-State: AOJu0YyMNN1ymXASaNWb3tjow0Xja3CCd9ii9sIZIP/DpGZscN/YCbkI 56oK4CeoEoy5/1t4RbxpyK7OFadK39H0hdZE5kQ= X-Received: by 2002:a05:600c:45c8:b0:402:ee67:45d1 with SMTP id s8-20020a05600c45c800b00402ee6745d1mr928521wmo.36.1694083824206; Thu, 07 Sep 2023 03:50:24 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-226.abo.bbox.fr. [176.131.222.226]) by smtp.gmail.com with ESMTPSA id y25-20020a7bcd99000000b0040210a27e29sm2141832wmj.32.2023.09.07.03.50.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Sep 2023 03:50:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH 3/5] contrib/plugins/howvec: Fix string format Date: Thu, 7 Sep 2023 12:50:02 +0200 Message-ID: <20230907105004.88600-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907105004.88600-1-philmd@linaro.org> References: <20230907105004.88600-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This fixes on Darwin: plugins/howvec.c:186:40: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] class->count); ^~~~~~~~~~~~ plugins/howvec.c:213:36: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] rec->count, ^~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé --- contrib/plugins/howvec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 0ed01ea931..644a7856bb 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -181,7 +181,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) switch (class->what) { case COUNT_CLASS: if (class->count || verbose) { - g_string_append_printf(report, "Class: %-24s\t(%ld hits)\n", + g_string_append_printf(report, + "Class: %-24s\t(%" PRId64 " hits)\n", class->class, class->count); } @@ -208,7 +209,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) i++, counts = g_list_next(counts)) { InsnExecCount *rec = (InsnExecCount *) counts->data; g_string_append_printf(report, - "Instr: %-24s\t(%ld hits)\t(op=0x%08x/%s)\n", + "Instr: %-24s\t(%" PRId64 " hits)" + "\t(op=0x%08x/%s)\n", rec->insn, rec->count, rec->opcode, From patchwork Thu Sep 7 10:50:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720599 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp163404wrp; Thu, 7 Sep 2023 03:51:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHBrwCdycP/1LVvwhOMBpYXL6lwQ74mUTac4uIiWHTOzl/Ocjz6MZEbT2g06SSYLR5prG3r X-Received: by 2002:ad4:528b:0:b0:63d:218:c83f with SMTP id v11-20020ad4528b000000b0063d0218c83fmr18584470qvr.36.1694083903869; Thu, 07 Sep 2023 03:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694083903; cv=none; d=google.com; s=arc-20160816; b=UDAGzsub/3wnHF86mCFn2jsbc7NLoD+kodjTIZCd97fBemQLI3OfmvyKZmuKLZJICQ oGILzMlpNH63Dl0CZUsJmDxQkG6Rp4L7kH+GEhbyjZxQkcEeWRSi+DjlDN7RmS4eASA8 m0zq8Wu6ww6zqcz7EkVjksKQkt9yMhIbuR6qCrtIIb+Lff2BJQ7sLCRV1h03+Nu5iNhA 4q7zmOorHJD1OoeumbUVkzq1mfhS0azeAAmQPAP0hJ20LUlWbDrJ5m2d6M4C0YNWhZZB u8kRHr/6nmErMjfYosp2hGo6gEG96qnM12QbXBTXZPZYBdZc/2MT/tjabLQze3HJvdBq NkMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7e245FoK5q01LB4PXDdn1jGxm+SXz3DlMpzLfK1cumM=; fh=BW8kVGHgEV8gn3zw8WoObUnBXsqPghOK4kNDCIpquMI=; b=D3jpyf2rvHwvJ9Z+rWjcqzg2qkpzgwbZWlU1MVtLmwJukC0THxgImyy57asCu26HcH O/bPpgzv+gFf9k7LGwBMtiAhH/TKhB99WZD2aVLfXdJJjlod0wW17EwAUltseZLuLztl W+oNzwVxtNybPClrahwpc8Pdy9N41E4QDorpwOKFvvyZyzymUE+4L0POnozduaMjICCO 6IfdUJLB7H64z3jGw8V9LiW20YFZTsoM3DZpBPvtCO7uC7Dv7AElXaFX/0rVLTTtpZ/j 2M9WbgOMsFo0wQQvTwWGGO+kRW4nBocW8ARyEoKSyQTJQihdfJvVIrQQG1ld7ZDeIizb Ai8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NcvG9ysu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u7-20020a0c8dc7000000b0064f3f9c672csi11297960qvb.480.2023.09.07.03.51.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 03:51:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NcvG9ysu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCaq-000069-7n; Thu, 07 Sep 2023 06:50:36 -0400 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 1qeCan-00005y-Tu for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:33 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450: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 1qeCal-0004n8-Kh for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:33 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31c63cd4ec2so814594f8f.0 for ; Thu, 07 Sep 2023 03:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694083830; x=1694688630; 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=7e245FoK5q01LB4PXDdn1jGxm+SXz3DlMpzLfK1cumM=; b=NcvG9ysuIlePKppQnCP/t9NVOP8XESAWpsRtmDEV//GQFF0fTmeV+p9gqHx+yW5y7C B/wHmASZqQ+nhUx02P33s4Dxqx8HpFSSqYCkisqyREc8M9pPFxO0u6MXXveuCw48d1Oq Li2Jdux8tWOE5hysOwj1sQt06/V8AzLFQPkGu9roT7eyLkDADH9rwiBKqQ7sbpwxzc17 hhBs/ACInUZnLNxE9TEezKuZ3tUSEoUQBnA1RZenjRQ3GsjEj1bmOJzUpk6usHncTvg/ xEZXcNRpRpIttHK1YIY+AK3UiC56FXtVyBT7IMJouHHdrziJKlcHilL++HkXDbwwz3Vv mW8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694083830; x=1694688630; 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=7e245FoK5q01LB4PXDdn1jGxm+SXz3DlMpzLfK1cumM=; b=hZ7ine9pSzS+fcvO29zLRwERTZ7KWGOeR0EjBaNMxbviycAWryRlwCGy8eFbUeVAxM 8L2kwG4wyq7YTQyEE1WgPtF6fepnUj56uiAuBLzyL0EbQBlqMUhkgq76D2M0BgxAecwy vI9onJl8bGQG05XEqjNjfGj/b5tvlCVNdcLaaEwaRRbESwXtCQi23bjwOryA7pRhR7Da jLGPqCqhMPbv8B55f07zxRRJoOdud+udnXSFgSgyWDbRPu4DnfoXNND+UPRaVoXQYs6K lGY+3J3iycBn6tBJNXs5QBp/IpQ9185Vbs4Kp+ICNPk5krGm32S/8aFxssZSOQ2oL/99 i7ig== X-Gm-Message-State: AOJu0YxWXIQhTzONsVrRuGHnW8/EmSXK1sEUb9HiZlxz3evMV35S26MP 95xqIm1lxhpgkO5jrjtoNWP7ZGRUA24gsnGl09s= X-Received: by 2002:a5d:4246:0:b0:31a:dc58:cdd9 with SMTP id s6-20020a5d4246000000b0031adc58cdd9mr4297383wrr.60.1694083830003; Thu, 07 Sep 2023 03:50:30 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-226.abo.bbox.fr. [176.131.222.226]) by smtp.gmail.com with ESMTPSA id q20-20020a056000137400b003142c85fbcdsm23103720wrz.11.2023.09.07.03.50.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Sep 2023 03:50:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH 4/5] contrib/plugins/lockstep: Fix string format Date: Thu, 7 Sep 2023 12:50:03 +0200 Message-ID: <20230907105004.88600-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907105004.88600-1-philmd@linaro.org> References: <20230907105004.88600-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This fixes on Darwin: plugins/lockstep.c:138:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~ plugins/lockstep.c:138:33: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, them->pc, g_slist_length(divergence_log), ^~~~~~~~ plugins/lockstep.c:148:25: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~ plugins/lockstep.c:148:49: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] us->pc, us->insn_count, them->pc, them->insn_count); ^~~~~~~~ plugins/lockstep.c:156:36: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~ plugins/lockstep.c:156:53: warning: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] prev->block->pc, prev->block->insns, ^~~~~~~~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé --- contrib/plugins/lockstep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c index 850f7b2941..682b11feb2 100644 --- a/contrib/plugins/lockstep.c +++ b/contrib/plugins/lockstep.c @@ -134,7 +134,9 @@ static void report_divergance(ExecState *us, ExecState *them) /* Output short log entry of going out of sync... */ if (verbose || divrec.distance == 1 || diverged) { - g_string_printf(out, "@ 0x%016lx vs 0x%016lx (%d/%d since last)\n", + g_string_printf(out, + "@ 0x%016" PRIx64 " vs 0x%016" PRIx64 + " (%d/%d since last)\n", us->pc, them->pc, g_slist_length(divergence_log), divrec.distance); qemu_plugin_outs(out->str); @@ -144,7 +146,9 @@ static void report_divergance(ExecState *us, ExecState *them) int i; GSList *entry; - g_string_printf(out, "Δ insn_count @ 0x%016lx (%ld) vs 0x%016lx (%ld)\n", + g_string_printf(out, + "Δ insn_count @ 0x%016" PRIx64 + " (%ld) vs 0x%016" PRIx64 " (%ld)\n", us->pc, us->insn_count, them->pc, them->insn_count); for (entry = log, i = 0; @@ -152,7 +156,8 @@ static void report_divergance(ExecState *us, ExecState *them) entry = g_slist_next(entry), i++) { ExecInfo *prev = (ExecInfo *) entry->data; g_string_append_printf(out, - " previously @ 0x%016lx/%ld (%ld insns)\n", + " previously @ 0x%016" PRIx64 "/%" PRId64 + " (%ld insns)\n", prev->block->pc, prev->block->insns, prev->insn_count); } From patchwork Thu Sep 7 10:50:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 720596 Delivered-To: patch@linaro.org Received: by 2002:adf:eec5:0:b0:31d:da82:a3b4 with SMTP id a5csp163172wrp; Thu, 7 Sep 2023 03:51:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDwQmtB2qPuYIcICOkHztnWAc3o9m70nr9W8mHybRN2DuZShMmsAa7lz5yiPlT9fdVG9HM X-Received: by 2002:a05:620a:4709:b0:76f:16e9:be92 with SMTP id bs9-20020a05620a470900b0076f16e9be92mr22050586qkb.11.1694083873023; Thu, 07 Sep 2023 03:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694083873; cv=none; d=google.com; s=arc-20160816; b=QJGpAcQ+RJc/befvWhK9YoTa3C3zwT3QvPjwXRMbIZdZaR/MO8G93eqEITS4Xk/vPe 5pypLFWym2mCtIqA4eZ3LhCZN5PuySMKvw9iIfc9svhvtuUzbJg+s3NDjEPCA0HEe/4d 77seEbYoUDYG7c0fZFOCayvDhPfdSMfkR10DQD2g8eAsdqbEAe2tYznITy/2p2Xaujad MS8qs+k7umVQ/XAAbsWnnv5mRyIk1PtABtlcrNz04hRG6HBbFHiv4//SXzC9tjdR9G8u vf+mfojsH2lZ8d+IWDHRvOdcvfKTRxXhMhJVt+dmfBjMu39tlyIk4vY/9xPwUagb4JNF vsaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hS+d+xDE7ab+3Ts35wM0NjR7BehB229Silm4f3RZJWI=; fh=BW8kVGHgEV8gn3zw8WoObUnBXsqPghOK4kNDCIpquMI=; b=b2JNygyZvA4F4CIKNE5mkTp2aXhOn4xo85gBNbh6hReDJx5xFJbPVZvoo48tIzmaqh 6wELYCoUtwSkI7QgmsxKbFWxUjh6lqmfiSvfWzG7VmJURYL+8AqJEmQV9KkVseTqhc3a sHJRStBpwB9uFG93rHoCW9IfsRqcPR5xYEecPQx56jQqECf5b4O2FEdrfR8Og24sWs0N ihOM4jYlDdHsi/I7JZMe2Fsp2aKPEiw5IJeU1JIXXZB7vRDg5txmPdTIJsiDBr694lwU KJmveLb7c5x0HjvQIGnPu/dKDAFs4cxTHNcfrbIpWARQaZqn5c/FqnF6mAzV7oBni0hE lP1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RuhRR2N4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ov4-20020a05620a628400b0076ef03a1ebbsi10891010qkn.75.2023.09.07.03.51.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2023 03:51:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RuhRR2N4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeCav-0000CY-SO; Thu, 07 Sep 2023 06:50:41 -0400 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 1qeCau-0000C4-73 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:40 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeCar-0004qy-W5 for qemu-devel@nongnu.org; Thu, 07 Sep 2023 06:50:39 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-401da71b85eso8728725e9.1 for ; Thu, 07 Sep 2023 03:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694083836; x=1694688636; 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=hS+d+xDE7ab+3Ts35wM0NjR7BehB229Silm4f3RZJWI=; b=RuhRR2N4QqewP1vXRiBZNU8IbwFky/VbKvHTgm/Zrl4XiiofvfIC5Q3N1zPZkIQcs0 U28zoYIAK9CLL5yUU8SxCGCQduR1Bu0hdWwQt8xjjUQ2SWdSI5pafBOIZ7zOE3wMujyC wdYfM7dh1vbNrgDEMzJH89DERYPDXSabvDaTIHVXJelh8LeUNgdSgKQ//tnKvJ1Qd4pQ q7B6+s+ZS42Hz/+t8rh2SVGvJYZQKuQ7oWOH77/84Eg+CK/eMxV1bXr4olJRiYsyK6wj RgYfgQXJUc5exWb3+Xgq/9R4x+rJZVRZjnhiJNUDxi4ntHsDIBFafCixSpDjFKGp+KZe WQSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694083836; x=1694688636; 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=hS+d+xDE7ab+3Ts35wM0NjR7BehB229Silm4f3RZJWI=; b=Siv8T92KWqfUrvzDGK8pNPd/NrokurTuvpFykh3O915m93VWzUSyLGvVTvfX1v46D4 nO4G1E+SeTjDU/1Pwh0zmbRW+Qt5iadv2lyiyZWTOdvvhVLO7MdpWTGPBd5rYyq0FMcu vE/CAn9ehRGclsVD0nN16JoPyzXymhZbRfu+9Lts6ITAWu+5ro709oHvHjslVPi2z+TP W5M4FL1Mbt0vnAP13oPqou7DcvG++ByBs7JGy9BdRPJMvrNVkwkLMPBSw0nMoW9hzyrX GvE1UnxBq2qg5pglu4d61d/LsVhLNFEQkEgP5411ops0b0dYV+67uqwfB8pEa8Xu8hyL S8Nw== X-Gm-Message-State: AOJu0YwbPqw/XEVGXqkyEf2zOmWuC7whu8yw3uAE7zRhQuZmDOZmIV9q QnjKPd01ea57Kv3b9s5AVOD0bytfSj2Z++UHlnI= X-Received: by 2002:a05:600c:2611:b0:401:dc7c:2490 with SMTP id h17-20020a05600c261100b00401dc7c2490mr4140589wma.0.1694083835912; Thu, 07 Sep 2023 03:50:35 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-226.abo.bbox.fr. [176.131.222.226]) by smtp.gmail.com with ESMTPSA id m12-20020adff38c000000b0031ad5fb5a0fsm23018749wro.58.2023.09.07.03.50.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 07 Sep 2023 03:50:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alexandre Iooss , Paolo Bonzini , Mahmoud Mandour , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PATCH 5/5] contrib/plugins: Link with GLib Date: Thu, 7 Sep 2023 12:50:04 +0200 Message-ID: <20230907105004.88600-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907105004.88600-1-philmd@linaro.org> References: <20230907105004.88600-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This fixes on Darwin: ld: symbol(s) not found for architecture arm64 "_g_string_append_printf", referenced from: _log_stats in cache.o _log_top_insns in cache.o _append_stats_line in cache.o ld: symbol(s) not found for architecture arm64 "_g_string_free", referenced from: _g_autoptr_cleanup_gstring_free in cache.o "_g_string_insert_len", referenced from: _log_stats in cache.o _append_stats_line in cache.o ld: symbol(s) not found for architecture arm64 "_g_string_new", referenced from: _log_stats in cache.o _log_top_insns in cache.o "_g_strsplit", referenced from: _qemu_plugin_install in cache.o ... Signed-off-by: Philippe Mathieu-Daudé --- Note LIBS was unused. --- contrib/plugins/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index b2b9db9f51..e9173972eb 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -26,6 +26,7 @@ SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) # The main QEMU uses Glib extensively so it's perfectly fine to use it # in plugins (which many example do). +LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0) CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) CFLAGS += -fPIC -Wall CFLAGS += $(if $(CONFIG_DEBUG_TCG), -ggdb -O0)