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:
Ian Rogers
2026-03-02 15:58:21 -08:00
committed by Namhyung Kim
parent 895306e3c8
commit 6910944bf0
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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,
};