From patchwork Sat Jun 10 17:19:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 691165 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp1361743wru; Sat, 10 Jun 2023 10:20:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5nAijeyfOMdeavqb1Pj87/Mz9vmiQnWhJS4Az2CZNhLNc1uqyQgESQdQcLuqYvHCXu8sn5 X-Received: by 2002:a37:80e:0:b0:75b:23a1:8e75 with SMTP id 14-20020a37080e000000b0075b23a18e75mr3962920qki.70.1686417659126; Sat, 10 Jun 2023 10:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686417659; cv=none; d=google.com; s=arc-20160816; b=Bv8fT0wLpZaiSGtQ1N1C44rrOkYv7X0kL80qdn6HQiWemvTnEpzVtrUv3jgfYamGyA tm2JxYO9iZ+Y7gUuQLkueZrdXSLqo2LF0gDUTqmHcjurwOpk222ICQelwSvyr3MS2vN0 N2i7vjB+RrWr66VvuZNNB+cNeZpwMntQNCGGVOHeV6viY5tNZIhIMpUm5JEwzWiaDEDT qlY1Sa9N48ofZbdWLaeOkpa3go1DLNuOmSgbMFrU9vt38aRolPCRptL7gaTPz+P1/0YM PDhi790VfXCMdMtlAVRdR/ln8D/g6hfuLdeYtzKWG9iqXVn32EKWAWSUR5TQlJkHjojf VYFg== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=F4cELDLpHFxYYLs5XWsNulO6w5RqS+fMH20vt5E6+A4=; b=u23krdraZgVaRorNmF3hB5SGaHs8ozErKwt8tqWYN3FiVEBonWewfxNgOCt725524H tenA/D7l5Mm9OfaofsqAv3NDDQ1weL+owQrGsgyX5w1HcwUvuxsiks+7ZuLl+WAwUq1s 6NU0ayF3NfdTRRvmzUJJQ1xRDYEsKaHY1X3NBOSXBivhy4vyYIGMa0BskFlsxcpWZWvY +hclMvnBcRZzCSVge9KDtOwqUNxA0iRtdywya8nlQr9q5ng8/uuKQ3UcD8PL2Nqb4xEZ PKE8VOe5GrZS8zHkQBFIC3OQvPCyDvRiiyBYXh+I6mtc4M/l6jcPGkFutKPiOvy8WnZX IbGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M9RlsXuM; 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 w14-20020a05620a128e00b007513ace4757si3764157qki.148.2023.06.10.10.20.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Jun 2023 10:20:59 -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=M9RlsXuM; 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 1q82Fy-0002BO-JP; Sat, 10 Jun 2023 13:20:06 -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 1q82Fx-0002BB-0s for qemu-devel@nongnu.org; Sat, 10 Jun 2023 13:20:05 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q82Fv-0007nh-72 for qemu-devel@nongnu.org; Sat, 10 Jun 2023 13:20:04 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b39d67ea37so6362205ad.1 for ; Sat, 10 Jun 2023 10:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686417601; x=1689009601; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=F4cELDLpHFxYYLs5XWsNulO6w5RqS+fMH20vt5E6+A4=; b=M9RlsXuMYqV+XR9GjBKTWVun3Ml3IqDtvIVvz9ymPv4yeQZN4NSSE+z4FB7NP/cLIx e2Pj/OpHl5KCpzUPILydyhWpPKpBYm0zQ441D5UKV0TYl9L/VBgMwFylfD9oSqXQ4jdR ESZncsOjphjfhcz269ectfvy2Og5B+KsL/7lHrMngax/llmadY7aIciMI0xLAihbL36/ 5FdE5BRtxAgAGATeeK5vQcEEmo+UPzzPIZq68pT+GEzNKRJpQbEJP4h3++Vq/mImcTFI aEbWZ7FUQ0/mAsoQ4kpGVYPRMQ71mU//mSXezgENu13gpxPL9ezpMIVuhn92tpsbPYxl GeNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686417601; x=1689009601; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F4cELDLpHFxYYLs5XWsNulO6w5RqS+fMH20vt5E6+A4=; b=Rigs5BZ1vVo2fjrjmTYpTviYyCEWoZzq6PXSsbk0C+pxAfbgH0F/tCKnfteIYu6hRe hg6mfCiy6hlH+6bbx+JmGcgQoEWK7dRNmd60TMUZ2b9RSZOfMk7vS8HfGIR59zc9ufNH RJHU3qTNFcBhitWa0ffKdsGdNhvKZS0FaAaaoS0TfVPg/UNdfYtYPuf6JP5LqgaafpmH 50F6lZxRIveDJh7zb77q3aqqan5WiDi2Ndkhxu45GF//+nrnFrrfgwFABQLD3mezzfYa 4RHplU7TfpK84LgDHEF+sGU5I3JM+wskvrI5umITznxYAWzPOEpQZ5NHyimg4nv5R7UF H0sw== X-Gm-Message-State: AC+VfDz9lyWiUlXM8LlSJ/3fhywshB6pJOrZvw43ggJ7JE57Lhd3k+Nh aYxk0LsCPG4Eu+kfNsaKjr+a70HKPEvgATSlBOk= X-Received: by 2002:a17:902:a584:b0:1b2:2c8e:5435 with SMTP id az4-20020a170902a58400b001b22c8e5435mr2297703plb.4.1686417601124; Sat, 10 Jun 2023 10:20:01 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:2db6:3c02:bd87:f559]) by smtp.gmail.com with ESMTPSA id d5-20020a170902b70500b001aad714400asm5234927pls.229.2023.06.10.10.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jun 2023 10:20:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org Subject: [PATCH] tests/plugin: Remove duplicate insn log from libinsn.so Date: Sat, 10 Jun 2023 10:19:59 -0700 Message-Id: <20230610171959.928544-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is a perfectly natural occurrence for x86 "rep movb", where the "rep" prefix forms a counted loop of the one insn. During the tests/tcg/multiarch/memory test, this logging is triggered over 350000 times. Within the context of cross-i386-tci build, which is already slow by nature, the logging is sufficient to push the test into timeout. Signed-off-by: Richard Henderson --- Irritatingly, it doesn't timeout locally, so I used staging to double-check: Fail: https://gitlab.com/qemu-project/qemu/-/jobs/4450754282#L5062 Pass: https://gitlab.com/qemu-project/qemu/-/jobs/4450927108 --- tests/plugin/insn.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index cd5ea5d4ae..9bd6e44f73 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -19,7 +19,6 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; #define MAX_CPUS 8 /* lets not go nuts */ typedef struct { - uint64_t last_pc; uint64_t insn_count; } InstructionCount; @@ -51,13 +50,7 @@ static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata) { unsigned int i = cpu_index % MAX_CPUS; InstructionCount *c = &counts[i]; - uint64_t this_pc = GPOINTER_TO_UINT(udata); - if (this_pc == c->last_pc) { - g_autofree gchar *out = g_strdup_printf("detected repeat execution @ 0x%" - PRIx64 "\n", this_pc); - qemu_plugin_outs(out); - } - c->last_pc = this_pc; + c->insn_count++; }