Age | Commit message (Collapse) | Author |
|
Python 3 interprets string literals as Unicode strings, and therefore
\s is treated as an escaped Unicode character which is not correct.
Declaring the RegEx pattern as a raw string instead of unicode is
required for Python 3.
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Commit e1382583cd50 ("perf: sort-pmuevents: don't drop elements") tried
to fix a case where the array terminator elements were dropped from the
sorted list breaking the build, but it only worked for the case where
the terminator is the only element of the array. When the array has other
elements the terminator will still be silently dropped, causing invalid
memory accesses at runtime when the perf utility iterates over the array.
Fix this by treating any unmatched entry as an array terminator and also
add a comment to make it a little more clear how things are ending up at
the right position in the sorted list.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
With kernel 5.16 some structs in pmu-events do get a const qualifier, some
a static const storage class and qualifier.
The current sort-pmuevents cannot cope with that and drops all struct
arrays with such additional elements. This then leads to compiler errors.
Allow '^struct', '^const struct', '^static struct', '^static const struct'.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
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>
|
|
perf generates pmu-events.c as part of the build process. The
code that generates the events is doing tree walks and potentially
other non-determinstic things.
We'd rather not mess with that implementation, so we add a script
that knows how to read the pmu-events.c, sort the entries and then
copy it over the generated one.
With this, we should always have events in the same order, improving
reproducibility.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|