Skip to content
Commit a6cc2682 authored by Max Krummenacher's avatar Max Krummenacher Committed by Anuj Mittal
Browse files

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: default avatarMax Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
(cherry picked from commit e1382583)
Signed-off-by: default avatarAnuj Mittal <anuj.mittal@intel.com>
parent 99c3034a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment