From patchwork Fri Feb 3 15:47:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 18980 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B44A7C61DA4 for ; Fri, 3 Feb 2023 15:47:40 +0000 (UTC) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web10.14058.1675439250705100141 for ; Fri, 03 Feb 2023 07:47:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=Qd8dKkDs; spf=pass (domain: linuxfoundation.org, ip: 209.85.221.53, mailfrom: richard.purdie@linuxfoundation.org) Received: by mail-wr1-f53.google.com with SMTP id h16so5003379wrz.12 for ; Fri, 03 Feb 2023 07:47:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MLQ1orUlK9Ik+JIK+Egl4a0k2ptqA1iT8MMMzJuPVKc=; b=Qd8dKkDsbMhcJBEyMXObpVRL2WUQ94kavTG8oc/z0pFqB7r1WJhhbcNMFSgBDPpox/ 4K3GxY0wuGNQFhcDj7sefyt1cGN0mGoCYE2kjgN0yvKdtwidLieqlm+jAfazM7FYrBtk 6DYczhxUbFdm/+UnhOvHD0hG7oxEP+c2MdFJc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=MLQ1orUlK9Ik+JIK+Egl4a0k2ptqA1iT8MMMzJuPVKc=; b=7yBDOhl8P1EfN3OR+9lURwgB4dlgROYkcawYSFKFy0+BCYURerB9DyqAeSmGCVB1dD Wca7IV5ZXdOmt6Ek53vKiHXBP6d0Ri8bP1TciyrbKo+8NrzcCb59mfX0jMaCwIhvy8Ko rTwIpAnrhbAvKQPCrHRNN2suIu1DEQGCpyrB1pgGEXaRNZiIE3HT4x11dOck59cySvNl o8XMsI6FptC4zoryeTbdF7pW6/GJBzKmjxo2wf5c+qdzPdlhaaWaMWyWJ5MFOxdoq/HR Z1Y7PCqeawRPzPxE/cjLTDZ703TiBV3ghRG/vY6zg6lM5HIWGU2O5OxzR3dpIZn3nBRv ITsA== X-Gm-Message-State: AO0yUKX3q0tYAMcdx3DnJIUneYSvzVisn0uV0WNrhNKlMJbOF/q/7pM/ mqFynj21goP7czQXdNHxGBWALH4RZpNFKdrx X-Google-Smtp-Source: AK7set/LpiwJM7igjf2Qrj65SZgQFtJeYlCS8uPhkjPOowckjjWcQNEGJghSSD2pbsLn1+lrKFngDw== X-Received: by 2002:a05:6000:16c4:b0:2bf:be35:2303 with SMTP id h4-20020a05600016c400b002bfbe352303mr10678550wrf.34.1675439248645; Fri, 03 Feb 2023 07:47:28 -0800 (PST) Received: from max.int.rpsys.net ([2001:8b0:aba:5f3c:a52f:3f73:91fb:2c5a]) by smtp.gmail.com with ESMTPSA id y16-20020a056000109000b002423edd7e50sm2217767wrw.32.2023.02.03.07.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 07:47:28 -0800 (PST) From: Richard Purdie To: openembedded-core@lists.openembedded.org Cc: Bruce Ashfield Subject: [PATCH] perf: Fix 6.1 kernel reproducibility issue Date: Fri, 3 Feb 2023 15:47:27 +0000 Message-Id: <20230203154727.1142151-1-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 03 Feb 2023 15:47:40 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/176722 The pmu-events.c file is generated by a python script making os.scandir() calls. The return value is "order on disk" which can cary between machines. Add in a sed to fix the perf source to sort this data which makes the pmu-events.c file deterministic. We should try and upstream this change but we'll need to sed for varying kernel versions. We should also try and get the perf source being added to the perf-devsrc package so when failures like this occur, diffoscope is much more helpful! Signed-off-by: Richard Purdie --- meta/recipes-kernel/perf/perf.bb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index c1b0bd22d82..1dff39a17e4 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -276,6 +276,10 @@ do_configure:prepend () { sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \ "${S}/tools/perf/pmu-events/Build" fi + if [ -e "${S}/tools/perf/pmu-events/jevents.py" ]; then + sed -i -e "s#os.scandir(path)#sorted(os.scandir(path), key=lambda e: e.name)#g" \ + "${S}/tools/perf/pmu-events/jevents.py" + fi # end reproducibility substitutions # We need to ensure the --sysroot option in CC is preserved