]> code.ossystems Code Review - openembedded-core.git/commit
perf: sort-pmuevents: don't drop elements
authorMax Krummenacher <max.oss.09@gmail.com>
Mon, 22 Nov 2021 16:34:58 +0000 (17:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Nov 2021 16:58:55 +0000 (16:58 +0000)
commite1382583cd5060be301afaa9998ccf250cc8bca3
tree968750297a6a31c71b9a4d556491259e8af903db
parentc12a91827e88230b4ec702a88534d4c51c1aabe3
perf: sort-pmuevents: don't drop elements

If a struct element neither has an element cpuid or name it gets silenty
dropped.
Kernel 5.15 for some ARCHs have at least one array of structs matching
this.
e.g. for arm pmu-events.c:

|#include "pmu-events/pmu-events.h"
struct pmu_events_map pmu_events_map[] = {
{
.cpuid = 0,
.version = 0,
.type = 0,
.table = 0,
},
};

struct pmu_sys_events pmu_sys_event_tables[] = {
{
.table = 0
},
};

Before this patch the second struct is translated to an empty array::

struct pmu_sys_events pmu_sys_event_tables[] = {
};

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
meta/recipes-kernel/perf/perf/sort-pmuevents.py