Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp380637rdh; Sat, 23 Sep 2023 15:02:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEAt+l5O8/4Igi9t3uGtT7gtzIMKFOtDejFx47Z6KYdl5NWoDKFSycocbNckRRetaHWv33i X-Received: by 2002:a05:6a20:3248:b0:15d:bd4b:c9e5 with SMTP id hm8-20020a056a20324800b0015dbd4bc9e5mr2093139pzc.61.1695506545584; Sat, 23 Sep 2023 15:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695506545; cv=none; d=google.com; s=arc-20160816; b=xs3wFvNWxtQWad44CmEyHXxnoDIz2+rDeSttOgyoJDKads2DdoOCKUKiI33zt1pquh jtjdCxbAwwmyrFw3GFm1pEaSJ/jE1FJfZTjgxWf5h4C9ryX9C5+EotW+NPU7lFx4ZlcN hM3xdt6273Cjhtsh+oSyOF0ZQZ2XqwN8X3DYpQWL159t12yC0UyL8BalPeH+aSrNWWK+ 4PZq9p691gaZxZm/82W9WHDIOvuUF4k/p8wY+yKoygg0o6l0qhP04eOC414tn7d9LVOp VBauoxf2BK05Z2GHj9cIyrnneS1V/1/CGd19fOxr4Gyxw6jNptnXJS7imS79RZTqNbww vc9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=Sj6/NNUjZTKqDNZk1SrzqO39OG4waux/cevEfWDj9So=; fh=wFFPmy5oZx9gf1iTxJ8OPAx6+fLFvzTVx6T3ogPJNVM=; b=IYcT0SJrOVM4g8oXc/Kos+co2g0SnWAOY7Y74DxjQ4S4pYQphlaaO7jMHaov6IU+sX Ek2B+sumLirJ91r9AoqoTqahoeoYX3z/lRej+ClQJr8ZNRK5be9XW3KMs0HiWL1XGrWj gc2AErPlpZ8+gk4UK4YTbc+rAENjnuNHKk/HVc3lMN52bGMTzRJsDijOPmfyfmP/oO9U IdmT5e2kXdO/Ml1szV0S3ZqBL7A8/JWkk7Wr0khpxdK6oxqu70Rofv+oDW0jzJgu8EBA ySSGhL3g3nCTKs7XbuuHYmcLeYH5M792Wj5ASwMobHkrJobpqF9HsjmsVYhefDvt7oJ0 1VuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wSpeEJoS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id km7-20020a17090327c700b001c4640de545si6172491plb.48.2023.09.23.15.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 15:02:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=wSpeEJoS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F3EBA87182A7; Fri, 22 Sep 2023 22:36:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbjIWFfx (ORCPT + 99 others); Sat, 23 Sep 2023 01:35:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjIWFfs (ORCPT ); Sat, 23 Sep 2023 01:35:48 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C9419E for ; Fri, 22 Sep 2023 22:35:42 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-59eea906b40so54359047b3.0 for ; Fri, 22 Sep 2023 22:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695447341; x=1696052141; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Sj6/NNUjZTKqDNZk1SrzqO39OG4waux/cevEfWDj9So=; b=wSpeEJoSnHeeMN/OFwKHmaYyMl0EnOFrXzlHb3EexqQjsrgk+ntB6zqLJVyy1P6y1t xUIo1eypAU0SCGR4oR3lV8pR+amWiDzQVtKOR2zXLhzK06beWvQWINcss6NmycJl9QLB EK00okbOTreMXq6AYeyTksE0I2Z+69ReD6+OInI56nzueVgl5LgYw32UjRIVLFoQwxk8 scCN9+En+dqVgu3sFy+8kFoLHmkS45hWZvic4XDzC43T0oFAE6rAIX8StsT+MEayVW9V Ka+uEUDci2p/Fcuyv5qF+KWugxNc4K9Q7k+5nc8wzoD/ra+UMQyxidwvT4OMXh0AUkYj I9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695447341; x=1696052141; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Sj6/NNUjZTKqDNZk1SrzqO39OG4waux/cevEfWDj9So=; b=YR2norMGdTEjT9Qwbrj/b3nsblh6QT3P8Ax01pwFXwBBmyr96SQQCccyUvoX0DT7xy cxk6pCGIRbPI9JvY0v+qXtVXmu63B+EUo78gkvCP6A+YI+YHGyEhVgEg/l+eNDuUZowW o2sneQo/A4430a1FFk1fT1u0JKobJlmRg+lObCb7oGUYQdUukj3Kl0xblVKO0CZMyh+9 1HwRHsBPNHxOYR1+ULxwPvt/inrdTa3d39MvcoduiBqJdNxCP5hmUhS8rSWSfY3NtkHO W6Bof4VB3ALCXHB3CdQBiLCfLZ0IB/hb9DBJCfsiS/eBELt6csoNOLT6yY0gOGwOwfOX KN9w== X-Gm-Message-State: AOJu0YxDOKjYrqrCCwc0dde7BQJE65OZ3VTbt9uMVzstHMaixqLQPtLE 1R9/4DHjdcmCKtxLEbEj4OtNH9hfHbVN X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:a376:2908:1c75:ff78]) (user=irogers job=sendgmr) by 2002:a81:eb0d:0:b0:59b:ec33:ec6d with SMTP id n13-20020a81eb0d000000b0059bec33ec6dmr21490ywm.5.1695447341257; Fri, 22 Sep 2023 22:35:41 -0700 (PDT) Date: Fri, 22 Sep 2023 22:34:59 -0700 In-Reply-To: <20230923053515.535607-1-irogers@google.com> Message-Id: <20230923053515.535607-3-irogers@google.com> Mime-Version: 1.0 References: <20230923053515.535607-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.515.g380fc7ccd1-goog Subject: [PATCH v1 02/18] gen_compile_commands: Sort output compile commands by file name From: Ian Rogers To: Nathan Chancellor , Nick Desaulniers , Tom Rix , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Yicong Yang , Jonathan Cameron , Yang Jihong , Kan Liang , Ming Wang , Huacai Chen , Sean Christopherson , K Prateek Nayak , Yanteng Si , Yuan Can , Ravi Bangoria , James Clark , Paolo Bonzini , llvm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 22:36:01 -0700 (PDT) Make the output more stable and deterministic. Signed-off-by: Ian Rogers --- scripts/clang-tools/gen_compile_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/clang-tools/gen_compile_commands.py b/scripts/clang-tools/gen_compile_commands.py index b43f9149893c..180952fb91c1 100755 --- a/scripts/clang-tools/gen_compile_commands.py +++ b/scripts/clang-tools/gen_compile_commands.py @@ -221,7 +221,7 @@ def main(): cmdfile, err) with open(output, 'wt') as f: - json.dump(compile_commands, f, indent=2, sort_keys=True) + json.dump(sorted(compile_commands, key=lambda x: x["file"]), f, indent=2, sort_keys=True) if __name__ == '__main__': -- 2.42.0.515.g380fc7ccd1-goog