From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA5E1C433EF for ; Tue, 17 May 2022 13:35:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343889AbiEQNfa (ORCPT ); Tue, 17 May 2022 09:35:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347899AbiEQNfT (ORCPT ); Tue, 17 May 2022 09:35:19 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE76B4C794; Tue, 17 May 2022 06:35:17 -0700 (PDT) Received: from fraeml742-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4L2cTc5Vlpz67VyR; Tue, 17 May 2022 21:31:32 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml742-chm.china.huawei.com (10.206.15.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 17 May 2022 15:35:15 +0200 Received: from [10.47.88.19] (10.47.88.19) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 17 May 2022 14:35:14 +0100 Message-ID: Date: Tue, 17 May 2022 14:35:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v2 4/7] perf jevents: Modify match field To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , "Namhyung Kim" , Kan Liang , Andi Kleen , Zhengjun Xing , "Felix Fietkau" , Qi Liu , Like Xu , , , Nick Forrington , Kajol Jain , James Clark , Andrew Kilroy , "Paul A . Clarke" , Will Deacon , Mathieu Poirier , , , , , Caleb Biggers , Perry Taylor , Kshipra Bopardikar CC: Stephane Eranian References: <20220511211526.1021908-1-irogers@google.com> <20220511211526.1021908-5-irogers@google.com> From: John Garry In-Reply-To: <20220511211526.1021908-5-irogers@google.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.88.19] X-ClientProxiedBy: lhreml743-chm.china.huawei.com (10.201.108.193) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/05/2022 22:15, Ian Rogers wrote: > The match_field function looks for json values to append to the event > string. As the C code processes these in order the output order matches > that in the json dictionary. Python json readers read the entire > dictionary and lose the ordering. To make the python and C output > comparable make the C code first read the extra fields then append them > to the event in an order not determined by their order in the file. > > Modify the pmu-events test so that test expectations match the new > order. > > Signed-off-by: Ian Rogers Reviewed-by: John Garry