* [PATCH] perf tools riscv: Fix perf tool build error on riscv
@ 2022-12-31 5:27 Eric Lin
2023-01-02 14:50 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Eric Lin @ 2022-12-31 5:27 UTC (permalink / raw)
To: peterz, acme, alexander.shishkin, jolsa, namhyung, palmer,
linux-perf-users, linux-kernel, linux-riscv
Cc: paul.walmsley, greentime.hu, vincent.chen, Eric Lin
Since the definition of 'struct perf_sample' has been moved to sample.h,
we need to include this header file to fix the build error as follows:
arch/riscv/util/unwind-libdw.c: In function 'libdw__arch_set_initial_registers':
arch/riscv/util/unwind-libdw.c:12:50: error: invalid use of undefined type 'struct perf_sample'
12 | struct regs_dump *user_regs = &ui->sample->user_regs;
| ^~
Fixes: 9823147da6c8 ("perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers")
Signed-off-by: Eric Lin <eric.lin@sifive.com>
---
tools/perf/arch/riscv/util/unwind-libdw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/riscv/util/unwind-libdw.c b/tools/perf/arch/riscv/util/unwind-libdw.c
index 19536e172850..54a198714eb8 100644
--- a/tools/perf/arch/riscv/util/unwind-libdw.c
+++ b/tools/perf/arch/riscv/util/unwind-libdw.c
@@ -4,7 +4,7 @@
#include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"
-#include "../../util/event.h"
+#include "../../util/sample.h"
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
{
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf tools riscv: Fix perf tool build error on riscv
2022-12-31 5:27 [PATCH] perf tools riscv: Fix perf tool build error on riscv Eric Lin
@ 2023-01-02 14:50 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-02 14:50 UTC (permalink / raw)
To: Eric Lin
Cc: peterz, alexander.shishkin, jolsa, namhyung, palmer,
linux-perf-users, linux-kernel, linux-riscv, paul.walmsley,
greentime.hu, vincent.chen
Em Sat, Dec 31, 2022 at 05:27:31AM +0000, Eric Lin escreveu:
> Since the definition of 'struct perf_sample' has been moved to sample.h,
> we need to include this header file to fix the build error as follows:
>
> arch/riscv/util/unwind-libdw.c: In function 'libdw__arch_set_initial_registers':
> arch/riscv/util/unwind-libdw.c:12:50: error: invalid use of undefined type 'struct perf_sample'
> 12 | struct regs_dump *user_regs = &ui->sample->user_regs;
> | ^~
Thanks, applied.
- Arnaldo
> Fixes: 9823147da6c8 ("perf tools: Move 'struct perf_sample' to a separate header file to disentangle headers")
> Signed-off-by: Eric Lin <eric.lin@sifive.com>
> ---
> tools/perf/arch/riscv/util/unwind-libdw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/arch/riscv/util/unwind-libdw.c b/tools/perf/arch/riscv/util/unwind-libdw.c
> index 19536e172850..54a198714eb8 100644
> --- a/tools/perf/arch/riscv/util/unwind-libdw.c
> +++ b/tools/perf/arch/riscv/util/unwind-libdw.c
> @@ -4,7 +4,7 @@
> #include <elfutils/libdwfl.h>
> #include "../../util/unwind-libdw.h"
> #include "../../util/perf_regs.h"
> -#include "../../util/event.h"
> +#include "../../util/sample.h"
>
> bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
> {
> --
> 2.17.1
--
- Arnaldo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-02 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-31 5:27 [PATCH] perf tools riscv: Fix perf tool build error on riscv Eric Lin
2023-01-02 14:50 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).