Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2075143/?format=api
{ "id": 2075143, "url": "http://patchwork.ozlabs.org/api/patches/2075143/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/0fcddfca16ca8da2bdaa7b2c114476f5b73d032b.1745295397.git.ktokunaga.mail@gmail.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<0fcddfca16ca8da2bdaa7b2c114476f5b73d032b.1745295397.git.ktokunaga.mail@gmail.com>", "list_archive_url": null, "date": "2025-04-22T05:27:10", "name": "[v2,06/20] contrib/plugins: Fix type conflict of GLib function pointers", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f309d2a0b51608a2fada337f751c30475ab20523", "submitter": { "id": 90637, "url": "http://patchwork.ozlabs.org/api/people/90637/?format=api", "name": "Kohei Tokunaga", "email": "ktokunaga.mail@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/0fcddfca16ca8da2bdaa7b2c114476f5b73d032b.1745295397.git.ktokunaga.mail@gmail.com/mbox/", "series": [ { "id": 453631, "url": "http://patchwork.ozlabs.org/api/series/453631/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=453631", "date": "2025-04-22T05:27:04", "name": "Enable QEMU TCI to run 32bit guests on browsers", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/453631/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2075143/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2075143/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=jkIjgHsA;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ZhW5l5CzCz1yMZ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 22 Apr 2025 15:30:03 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1u76CI-0001xb-J4; Tue, 22 Apr 2025 01:29:31 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <ktokunaga.mail@gmail.com>)\n id 1u76Bk-0001W0-9P; Tue, 22 Apr 2025 01:29:00 -0400", "from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <ktokunaga.mail@gmail.com>)\n id 1u76Bg-0007qf-Lh; Tue, 22 Apr 2025 01:28:56 -0400", "by mail-pl1-x634.google.com with SMTP id\n d9443c01a7336-224100e9a5cso54450415ad.2;\n Mon, 21 Apr 2025 22:28:51 -0700 (PDT)", "from localhost.localdomain ([240d:1a:3b6:8b00:e142:4a4f:1ebb:3ca4])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-22c50eb4483sm75692085ad.118.2025.04.21.22.28.42\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 21 Apr 2025 22:28:49 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1745299730; x=1745904530; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=N77jI1TJkHkxuSuEB7FQGv9pn4PKhNEGgbsGxqAnoxA=;\n b=jkIjgHsAOjWmjWIUYS6VKOJP2doN8/JWc7z005nZ4lbpiY7T1HIh4SAdmtG9RtfQsV\n HuJv063WSvIS3wUN/t5C4nNj0InWKskT52JCnQ07AMH5OiZcPowZlefsFsu/TERvN1KB\n y+3h3xaViy4oC1uwk/TVKF+CRaMMO7/D4n+FE5DTw0Z5hHWeJSwWZ2eUMr+QzkLHaZ8N\n eLpgesaafCbKHgx+KAtGwBbpLTSw8T5KHAWJQfigrPopVdg/NyildkJW6mEqTxTEZg62\n kBMy4nfhoG9U1XebORPBOgFmx5z3QLBm3tY15RyUP1cCuwYPA6gnIV+De/OjleqesJEP\n QJlA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1745299730; x=1745904530;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=N77jI1TJkHkxuSuEB7FQGv9pn4PKhNEGgbsGxqAnoxA=;\n b=HapRo3h/qqG44IC+Ch+oXR5qvn/xH9xvwNw3013HTMHJHtrJDYyMrBomEPV8EyUxtz\n AdOrPGt9z2E7f+oV70TKP4llHvPj34AnJ8hBu3IltsfDWfmkhbypCS/ev0Kwrv6wWNmv\n j4tmEuMuwVsQtgX6PaIGMJmKgkdIqLx5jcxTX1FQNJweKN2YXpJi178F2DTAFTJJ9HhG\n xgHYudUscHEaGC9Dzb7XrS5qs1Z+EehXVYIScKr80HM1SwG1ProEzVM1dw/c99NSIATV\n J+0NGYejSUH6rdB1TAHgRjgzmIVMK3uIm5TOZNR3AuZ79f6au89FknhdeSTiHo5MNZah\n jKmg==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCVb007KKTHLNBQ8rn5thVnvPngkdPorBqXMLPI6pqUuoBkerDgWl1wntxFT7BHQX2RI+6kAm1Vz/uE8QA==@nongnu.org,\n AJvYcCW7LIDmGb15xW6G2gRa18JM32pt8OMe6Vy3r3ynivWtih2CLUNuKukv9Kk8NIk+IGgo6MV3OAUVBiFK1w==@nongnu.org,\n AJvYcCWM/t/dKgLHvVcVhZsa9RraLs3WX0fc8I5/qXDbmvoVZ/6QNuH+3RKy8PgSsn13rtPF8DctBe/JPw==@nongnu.org,\n AJvYcCXwII/y43dgL17ZtEqJGJXYKjetibdzgbuM+zB9catB5JYv/diGybDhQNn2JtRRwQe3JCGqJJf1trE=@nongnu.org", "X-Gm-Message-State": "AOJu0YyJl1rjLLthZv1z8YyvtUt1Ready0jUUO5WrPvTUUvEsM4OI3dr\n O81jpbc+ptCexOALqGic+xKCVi8FEAqYJ/xOzIln8xJA3OQ1SC3u2VGS0iUK", "X-Gm-Gg": "ASbGncunqg9hBBgblum5s6XglQwsq1g5uBdN+G+oTsVvQrK+FgmCR0c/MqvaqhSBuzT\n GjMDoh28AIa1ROEpiM1VuxeCgfARbdLPhbVG3iItP20XYmA1xODh9UnXLiS2cbcoe2MU+9xlQca\n bCjNSMcUKLa5b5S6k0ePPGA/94xjEH1yZkFPT61Yn/vwHjV4QPlymWDG6sA9KEmrY1O+AL+uIuf\n TGtP8oeyyr36sXK/haSm7w1c8BaHkdFIaDxkg+ArBf95tQTtocPWxv1lCvpLhZvj9O70vHJkhLG\n MosiFt8cr/h2a6Ja1dNBNbFASyoekJUqPkpyNrEe53naNzBH9A0QhaTGbppRuodCV5nSTg==", "X-Google-Smtp-Source": "\n AGHT+IEzO/OjrHgYHWrum/0TCfoaM8O8Mfn1Scpmvq5a7CT1HGi/VbS6op7C4w92p+94XfsgeUi2hQ==", "X-Received": "by 2002:a17:902:e808:b0:220:c34c:5760 with SMTP id\n d9443c01a7336-22c5361b398mr186284245ad.51.1745299730025;\n Mon, 21 Apr 2025 22:28:50 -0700 (PDT)", "From": "Kohei Tokunaga <ktokunaga.mail@gmail.com>", "To": "qemu-devel@nongnu.org", "Cc": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, =?utf-8?q?Philipp?=\n\t=?utf-8?q?e_Mathieu-Daud=C3=A9?= <philmd@linaro.org>,\n Thomas Huth <thuth@redhat.com>, Kevin Wolf <kwolf@redhat.com>,\n Hanna Reitz <hreitz@redhat.com>, Kohei Tokunaga <ktokunaga.mail@gmail.com>,\n Paolo Bonzini <pbonzini@redhat.com>, Alexandre Iooss <erdnaxe@crans.org>,\n Mahmoud Mandour <ma.mandourr@gmail.com>,\n Pierrick Bouvier <pierrick.bouvier@linaro.org>,\n Pavel Pisa <pisa@cmp.felk.cvut.cz>,\n Francisco Iglesias <francisco.iglesias@amd.com>,\n Vikram Garhwal <vikram.garhwal@bytedance.com>,\n Jason Wang <jasowang@redhat.com>,\n =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\t=?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= <berrange@redhat.com>,\n Eduardo Habkost <eduardo@habkost.net>, Peter Xu <peterx@redhat.com>,\n David Hildenbrand <david@redhat.com>,\n Peter Maydell <peter.maydell@linaro.org>, Zhao Liu <zhao1.liu@intel.com>,\n Nicholas Piggin <npiggin@gmail.com>,\n Daniel Henrique Barboza <danielhb413@gmail.com>,\n Richard Henderson <richard.henderson@linaro.org>,\n Ilya Leoshkevich <iii@linux.ibm.com>, Stefan Hajnoczi <stefanha@redhat.com>,\n qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org,\n qemu-s390x@nongnu.org", "Subject": "[PATCH v2 06/20] contrib/plugins: Fix type conflict of GLib function\n pointers", "Date": "Tue, 22 Apr 2025 14:27:10 +0900", "Message-Id": "\n <0fcddfca16ca8da2bdaa7b2c114476f5b73d032b.1745295397.git.ktokunaga.mail@gmail.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<cover.1745295397.git.ktokunaga.mail@gmail.com>", "References": "<cover.1745295397.git.ktokunaga.mail@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2607:f8b0:4864:20::634;\n envelope-from=ktokunaga.mail@gmail.com; helo=mail-pl1-x634.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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n 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>,\n <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>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "On Emscripten, function pointer casts can result in runtime failures due to\nstrict function signature checks. This affects the use of g_list_sort and\ng_slist_sort, which internally perform function pointer casts that are not\nsupported by Emscripten. To avoid these issues, g_list_sort_with_data and\ng_slist_sort_with_data should be used instead, as they do not rely on\nfunction pointer casting.\n\nSigned-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>\n---\n contrib/plugins/cache.c | 12 ++++++------\n contrib/plugins/cflow.c | 10 +++++-----\n contrib/plugins/hotblocks.c | 4 ++--\n contrib/plugins/hotpages.c | 4 ++--\n contrib/plugins/howvec.c | 4 ++--\n contrib/plugins/hwprofile.c | 8 ++++----\n tests/tcg/plugins/mem.c | 4 ++--\n tests/tcg/plugins/syscall.c | 4 ++--\n 8 files changed, 25 insertions(+), 25 deletions(-)\n\nV2:\n- Updated the commit message to explicitly explain that function pointer\n casts are performed internally by GLib.", "diff": "diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c\nindex 7cfd3df249..56508587d3 100644\n--- a/contrib/plugins/cache.c\n+++ b/contrib/plugins/cache.c\n@@ -576,7 +576,7 @@ static void sum_stats(void)\n }\n }\n \n-static int dcmp(gconstpointer a, gconstpointer b)\n+static int dcmp(gconstpointer a, gconstpointer b, gpointer d)\n {\n InsnData *insn_a = (InsnData *) a;\n InsnData *insn_b = (InsnData *) b;\n@@ -584,7 +584,7 @@ static int dcmp(gconstpointer a, gconstpointer b)\n return insn_a->l1_dmisses < insn_b->l1_dmisses ? 1 : -1;\n }\n \n-static int icmp(gconstpointer a, gconstpointer b)\n+static int icmp(gconstpointer a, gconstpointer b, gpointer d)\n {\n InsnData *insn_a = (InsnData *) a;\n InsnData *insn_b = (InsnData *) b;\n@@ -592,7 +592,7 @@ static int icmp(gconstpointer a, gconstpointer b)\n return insn_a->l1_imisses < insn_b->l1_imisses ? 1 : -1;\n }\n \n-static int l2_cmp(gconstpointer a, gconstpointer b)\n+static int l2_cmp(gconstpointer a, gconstpointer b, gpointer d)\n {\n InsnData *insn_a = (InsnData *) a;\n InsnData *insn_b = (InsnData *) b;\n@@ -645,7 +645,7 @@ static void log_top_insns(void)\n InsnData *insn;\n \n miss_insns = g_hash_table_get_values(miss_ht);\n- miss_insns = g_list_sort(miss_insns, dcmp);\n+ miss_insns = g_list_sort_with_data(miss_insns, dcmp, NULL);\n g_autoptr(GString) rep = g_string_new(\"\");\n g_string_append_printf(rep, \"%s\", \"address, data misses, instruction\\n\");\n \n@@ -659,7 +659,7 @@ static void log_top_insns(void)\n insn->l1_dmisses, insn->disas_str);\n }\n \n- miss_insns = g_list_sort(miss_insns, icmp);\n+ miss_insns = g_list_sort_with_data(miss_insns, icmp, NULL);\n g_string_append_printf(rep, \"%s\", \"\\naddress, fetch misses, instruction\\n\");\n \n for (curr = miss_insns, i = 0; curr && i < limit; i++, curr = curr->next) {\n@@ -676,7 +676,7 @@ static void log_top_insns(void)\n goto finish;\n }\n \n- miss_insns = g_list_sort(miss_insns, l2_cmp);\n+ miss_insns = g_list_sort_with_data(miss_insns, l2_cmp, NULL);\n g_string_append_printf(rep, \"%s\", \"\\naddress, L2 misses, instruction\\n\");\n \n for (curr = miss_insns, i = 0; curr && i < limit; i++, curr = curr->next) {\ndiff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c\nindex 930ecb46fc..b5e33f25f9 100644\n--- a/contrib/plugins/cflow.c\n+++ b/contrib/plugins/cflow.c\n@@ -98,7 +98,7 @@ static GHashTable *nodes;\n struct qemu_plugin_scoreboard *state;\n \n /* SORT_HOTTEST */\n-static gint hottest(gconstpointer a, gconstpointer b)\n+static gint hottest(gconstpointer a, gconstpointer b, gpointer d)\n {\n NodeData *na = (NodeData *) a;\n NodeData *nb = (NodeData *) b;\n@@ -107,7 +107,7 @@ static gint hottest(gconstpointer a, gconstpointer b)\n na->dest_count == nb->dest_count ? 0 : 1;\n }\n \n-static gint exception(gconstpointer a, gconstpointer b)\n+static gint exception(gconstpointer a, gconstpointer b, gpointer d)\n {\n NodeData *na = (NodeData *) a;\n NodeData *nb = (NodeData *) b;\n@@ -116,7 +116,7 @@ static gint exception(gconstpointer a, gconstpointer b)\n na->early_exit == nb->early_exit ? 0 : 1;\n }\n \n-static gint popular(gconstpointer a, gconstpointer b)\n+static gint popular(gconstpointer a, gconstpointer b, gpointer d)\n {\n NodeData *na = (NodeData *) a;\n NodeData *nb = (NodeData *) b;\n@@ -138,7 +138,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n {\n g_autoptr(GString) result = g_string_new(\"collected \");\n GList *data;\n- GCompareFunc sort = &hottest;\n+ GCompareDataFunc sort = &hottest;\n int i = 0;\n \n g_mutex_lock(&node_lock);\n@@ -162,7 +162,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n break;\n }\n \n- data = g_list_sort(data, sort);\n+ data = g_list_sort_with_data(data, sort, NULL);\n \n for (GList *l = data;\n l != NULL && i < topn;\ndiff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c\nindex f12bfb7a26..98404b6885 100644\n--- a/contrib/plugins/hotblocks.c\n+++ b/contrib/plugins/hotblocks.c\n@@ -39,7 +39,7 @@ typedef struct {\n unsigned long insns;\n } ExecCount;\n \n-static gint cmp_exec_count(gconstpointer a, gconstpointer b)\n+static gint cmp_exec_count(gconstpointer a, gconstpointer b, gpointer d)\n {\n ExecCount *ea = (ExecCount *) a;\n ExecCount *eb = (ExecCount *) b;\n@@ -79,7 +79,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n g_string_append_printf(report, \"%d entries in the hash table\\n\",\n g_hash_table_size(hotblocks));\n counts = g_hash_table_get_values(hotblocks);\n- it = g_list_sort(counts, cmp_exec_count);\n+ it = g_list_sort_with_data(counts, cmp_exec_count, NULL);\n \n if (it) {\n g_string_append_printf(report, \"pc, tcount, icount, ecount\\n\");\ndiff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c\nindex c6e6493719..9d48ac969e 100644\n--- a/contrib/plugins/hotpages.c\n+++ b/contrib/plugins/hotpages.c\n@@ -48,7 +48,7 @@ typedef struct {\n static GMutex lock;\n static GHashTable *pages;\n \n-static gint cmp_access_count(gconstpointer a, gconstpointer b)\n+static gint cmp_access_count(gconstpointer a, gconstpointer b, gpointer d)\n {\n PageCounters *ea = (PageCounters *) a;\n PageCounters *eb = (PageCounters *) b;\n@@ -83,7 +83,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n if (counts && g_list_next(counts)) {\n GList *it;\n \n- it = g_list_sort(counts, cmp_access_count);\n+ it = g_list_sort_with_data(counts, cmp_access_count, NULL);\n \n for (i = 0; i < limit && it->next; i++, it = it->next) {\n PageCounters *rec = (PageCounters *) it->data;\ndiff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c\nindex 2aa9029c3f..42bddb6566 100644\n--- a/contrib/plugins/howvec.c\n+++ b/contrib/plugins/howvec.c\n@@ -155,7 +155,7 @@ static ClassSelector class_tables[] = {\n static InsnClassExecCount *class_table;\n static int class_table_sz;\n \n-static gint cmp_exec_count(gconstpointer a, gconstpointer b)\n+static gint cmp_exec_count(gconstpointer a, gconstpointer b, gpointer d)\n {\n InsnExecCount *ea = (InsnExecCount *) a;\n InsnExecCount *eb = (InsnExecCount *) b;\n@@ -208,7 +208,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n counts = g_hash_table_get_values(insns);\n if (counts && g_list_next(counts)) {\n g_string_append_printf(report, \"Individual Instructions:\\n\");\n- counts = g_list_sort(counts, cmp_exec_count);\n+ counts = g_list_sort_with_data(counts, cmp_exec_count, NULL);\n \n for (i = 0; i < limit && g_list_next(counts);\n i++, counts = g_list_next(counts)) {\ndiff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c\nindex 2a4cbc47d4..a9838ccc87 100644\n--- a/contrib/plugins/hwprofile.c\n+++ b/contrib/plugins/hwprofile.c\n@@ -71,7 +71,7 @@ static void plugin_init(void)\n devices = g_hash_table_new(NULL, NULL);\n }\n \n-static gint sort_cmp(gconstpointer a, gconstpointer b)\n+static gint sort_cmp(gconstpointer a, gconstpointer b, gpointer d)\n {\n DeviceCounts *ea = (DeviceCounts *) a;\n DeviceCounts *eb = (DeviceCounts *) b;\n@@ -79,7 +79,7 @@ static gint sort_cmp(gconstpointer a, gconstpointer b)\n eb->totals.reads + eb->totals.writes ? -1 : 1;\n }\n \n-static gint sort_loc(gconstpointer a, gconstpointer b)\n+static gint sort_loc(gconstpointer a, gconstpointer b, gpointer d)\n {\n IOLocationCounts *ea = (IOLocationCounts *) a;\n IOLocationCounts *eb = (IOLocationCounts *) b;\n@@ -126,13 +126,13 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n if (counts && g_list_next(counts)) {\n GList *it;\n \n- it = g_list_sort(counts, sort_cmp);\n+ it = g_list_sort_with_data(counts, sort_cmp, NULL);\n \n while (it) {\n DeviceCounts *rec = (DeviceCounts *) it->data;\n if (rec->detail) {\n GList *accesses = g_hash_table_get_values(rec->detail);\n- GList *io_it = g_list_sort(accesses, sort_loc);\n+ GList *io_it = g_list_sort_with_data(accesses, sort_loc, NULL);\n const char *prefix = pattern ? \"off\" : \"pc\";\n g_string_append_printf(report, \"%s @ 0x%\"PRIx64\"\\n\",\n rec->name, rec->base);\ndiff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c\nindex d87d6628e0..ca4e8883dd 100644\n--- a/tests/tcg/plugins/mem.c\n+++ b/tests/tcg/plugins/mem.c\n@@ -67,7 +67,7 @@ static enum qemu_plugin_mem_rw rw = QEMU_PLUGIN_MEM_RW;\n static GMutex lock;\n static GHashTable *regions;\n \n-static gint addr_order(gconstpointer a, gconstpointer b)\n+static gint addr_order(gconstpointer a, gconstpointer b, gpointer d)\n {\n RegionInfo *na = (RegionInfo *) a;\n RegionInfo *nb = (RegionInfo *) b;\n@@ -94,7 +94,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n if (do_region_summary) {\n GList *counts = g_hash_table_get_values(regions);\n \n- counts = g_list_sort(counts, addr_order);\n+ counts = g_list_sort_with_data(counts, addr_order, NULL);\n \n g_string_printf(out, \"Region Base, Reads, Writes, Seen all\\n\");\n \ndiff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c\nindex 47aad55fc1..42801f5c86 100644\n--- a/tests/tcg/plugins/syscall.c\n+++ b/tests/tcg/plugins/syscall.c\n@@ -180,7 +180,7 @@ static void print_entry(gpointer val, gpointer user_data)\n qemu_plugin_outs(out);\n }\n \n-static gint comp_func(gconstpointer ea, gconstpointer eb)\n+static gint comp_func(gconstpointer ea, gconstpointer eb, gpointer d)\n {\n SyscallStats *ent_a = (SyscallStats *) ea;\n SyscallStats *ent_b = (SyscallStats *) eb;\n@@ -197,7 +197,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)\n \n g_mutex_lock(&lock);\n GList *entries = g_hash_table_get_values(statistics);\n- entries = g_list_sort(entries, comp_func);\n+ entries = g_list_sort_with_data(entries, comp_func, NULL);\n qemu_plugin_outs(\"syscall no. calls errors\\n\");\n \n g_list_foreach(entries, print_entry, NULL);\n", "prefixes": [ "v2", "06/20" ] }