mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 11:21:26 -04:00
perf test type profiling: Remote typedef on struct
The typedef creates an issue where the struct or the typedef may
appear in the output and cause the "perf data type profiling tests" to
fail. Let's remove the typedef to keep the test passing.
Fixes: 335047109d ("perf tests: Test annotate with data type profiling and C")
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -8,7 +8,7 @@ set -e
|
||||
# data type profiling manifestation
|
||||
|
||||
# Values in testtypes and testprogs should match
|
||||
testtypes=("# data-type: struct Buf" "# data-type: struct _buf")
|
||||
testtypes=("# data-type: struct Buf" "# data-type: struct buf")
|
||||
testprogs=("perf test -w code_with_type" "perf test -w datasym")
|
||||
|
||||
err=0
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
#include <linux/compiler.h>
|
||||
#include "../tests.h"
|
||||
|
||||
typedef struct _buf {
|
||||
struct buf {
|
||||
char data1;
|
||||
char reserved[55];
|
||||
char data2;
|
||||
} buf __attribute__((aligned(64)));
|
||||
} __attribute__((aligned(64)));
|
||||
|
||||
/* volatile to try to avoid the compiler seeing reserved as unused. */
|
||||
static volatile buf workload_datasym_buf1 = {
|
||||
static volatile struct buf workload_datasym_buf1 = {
|
||||
/* to have this in the data section */
|
||||
.reserved[0] = 1,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user