• Ian Rogers's avatar
    perf jevents: Modify match field · 1634b5a1
    Ian Rogers authored
    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.
    Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ananth Narayan <ananth.narayan@amd.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Andrew Kilroy <andrew.kilroy@arm.com>
    Cc: Caleb Biggers <caleb.biggers@intel.com>
    Cc: Felix Fietkau <nbd@nbd.name>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kajol Jain <kjain@linux.ibm.com>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
    Cc: Like Xu <likexu@tencent.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Nick Forrington <nick.forrington@arm.com>
    Cc: Paul Clarke <pc@us.ibm.com>
    Cc: Perry Taylor <perry.taylor@intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Qi Liu <liuqi115@huawei.com>
    Cc: Ravi Bangoria <ravi.bangoria@amd.com>
    Cc: Sandipan Das <sandipan.das@amd.com>
    Cc: Santosh Shukla <santosh.shukla@amd.com>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
    Link: https://lore.kernel.org/r/20220511211526.1021908-5-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    1634b5a1
pmu-events.c 27.6 KB