* [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
@ 2024-10-01 12:36 James Clark
2024-10-01 13:47 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: James Clark @ 2024-10-01 12:36 UTC (permalink / raw)
To: linux-perf-users, acme, namhyung
Cc: James Clark, Peter Zijlstra, Ingo Molnar, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
Liang, Kan, Masami Hiramatsu, Athira Rajeev, Kajol Jain,
linux-kernel
The linked fixes commit added an #include "dwarf-aux.h" to disasm.h
which gets picked up in a lot of places. Without
HAVE_DWARF_GETLOCATIONS_SUPPORT the stubs return an errno, so include
errno.h to fix the following build error:
In file included from util/disasm.h:8,
from util/annotate.h:16,
from builtin-top.c:23:
util/dwarf-aux.h: In function 'die_get_var_range':
util/dwarf-aux.h:183:10: error: 'ENOTSUP' undeclared (first use in this function)
183 | return -ENOTSUP;
| ^~~~~~~
Fixes: 782959ac248a ("perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking")
Signed-off-by: James Clark <james.clark@linaro.org>
---
tools/perf/util/dwarf-aux.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
index 336a3a183a78..bd7505812569 100644
--- a/tools/perf/util/dwarf-aux.h
+++ b/tools/perf/util/dwarf-aux.h
@@ -9,6 +9,7 @@
#include <elfutils/libdw.h>
#include <elfutils/libdwfl.h>
#include <elfutils/version.h>
+#include <errno.h>
struct strbuf;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
2024-10-01 12:36 [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT James Clark
@ 2024-10-01 13:47 ` Arnaldo Carvalho de Melo
2024-10-01 13:51 ` Ian Rogers
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-10-01 13:47 UTC (permalink / raw)
To: James Clark
Cc: linux-perf-users, namhyung, Peter Zijlstra, Ingo Molnar,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
Adrian Hunter, Liang, Kan, Masami Hiramatsu, Athira Rajeev,
Kajol Jain, linux-kernel
On Tue, Oct 01, 2024 at 01:36:25PM +0100, James Clark wrote:
> The linked fixes commit added an #include "dwarf-aux.h" to disasm.h
> which gets picked up in a lot of places. Without
> HAVE_DWARF_GETLOCATIONS_SUPPORT the stubs return an errno, so include
> errno.h to fix the following build error:
>
> In file included from util/disasm.h:8,
> from util/annotate.h:16,
> from builtin-top.c:23:
> util/dwarf-aux.h: In function 'die_get_var_range':
> util/dwarf-aux.h:183:10: error: 'ENOTSUP' undeclared (first use in this function)
> 183 | return -ENOTSUP;
> | ^~~~~~~
>
> Fixes: 782959ac248a ("perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking")
> Signed-off-by: James Clark <james.clark@linaro.org>
> ---
> tools/perf/util/dwarf-aux.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
> index 336a3a183a78..bd7505812569 100644
> --- a/tools/perf/util/dwarf-aux.h
> +++ b/tools/perf/util/dwarf-aux.h
> @@ -9,6 +9,7 @@
> #include <elfutils/libdw.h>
> #include <elfutils/libdwfl.h>
> #include <elfutils/version.h>
> +#include <errno.h>
Simple enough, thanks, applied to perf-tools/perf-tools.
- Arnaldo
> struct strbuf;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
2024-10-01 13:47 ` Arnaldo Carvalho de Melo
@ 2024-10-01 13:51 ` Ian Rogers
2024-10-01 13:57 ` James Clark
0 siblings, 1 reply; 4+ messages in thread
From: Ian Rogers @ 2024-10-01 13:51 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: James Clark, linux-perf-users, namhyung, Peter Zijlstra,
Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Adrian Hunter, Liang, Kan, Masami Hiramatsu, Athira Rajeev,
Kajol Jain, linux-kernel
On Tue, Oct 1, 2024 at 6:47 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> On Tue, Oct 01, 2024 at 01:36:25PM +0100, James Clark wrote:
> > The linked fixes commit added an #include "dwarf-aux.h" to disasm.h
> > which gets picked up in a lot of places. Without
> > HAVE_DWARF_GETLOCATIONS_SUPPORT the stubs return an errno, so include
> > errno.h to fix the following build error:
> >
> > In file included from util/disasm.h:8,
> > from util/annotate.h:16,
> > from builtin-top.c:23:
> > util/dwarf-aux.h: In function 'die_get_var_range':
> > util/dwarf-aux.h:183:10: error: 'ENOTSUP' undeclared (first use in this function)
> > 183 | return -ENOTSUP;
> > | ^~~~~~~
> >
> > Fixes: 782959ac248a ("perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking")
> > Signed-off-by: James Clark <james.clark@linaro.org>
There are a few variants of this same patch flying around:
https://lore.kernel.org/lkml/20240919013513.118527-4-yangjihong@bytedance.com/
https://lore.kernel.org/lkml/20240924003720.617258-4-irogers@google.com/
Just a heads up that we only need to apply 1.
Thanks,
Ian
> > ---
> > tools/perf/util/dwarf-aux.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
> > index 336a3a183a78..bd7505812569 100644
> > --- a/tools/perf/util/dwarf-aux.h
> > +++ b/tools/perf/util/dwarf-aux.h
> > @@ -9,6 +9,7 @@
> > #include <elfutils/libdw.h>
> > #include <elfutils/libdwfl.h>
> > #include <elfutils/version.h>
> > +#include <errno.h>
>
> Simple enough, thanks, applied to perf-tools/perf-tools.
>
> - Arnaldo
>
> > struct strbuf;
> >
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
2024-10-01 13:51 ` Ian Rogers
@ 2024-10-01 13:57 ` James Clark
0 siblings, 0 replies; 4+ messages in thread
From: James Clark @ 2024-10-01 13:57 UTC (permalink / raw)
To: Ian Rogers, Arnaldo Carvalho de Melo
Cc: linux-perf-users, namhyung, Peter Zijlstra, Ingo Molnar,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
Liang, Kan, Masami Hiramatsu, Athira Rajeev, Kajol Jain,
linux-kernel
On 01/10/2024 2:51 pm, Ian Rogers wrote:
> On Tue, Oct 1, 2024 at 6:47 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>>
>> On Tue, Oct 01, 2024 at 01:36:25PM +0100, James Clark wrote:
>>> The linked fixes commit added an #include "dwarf-aux.h" to disasm.h
>>> which gets picked up in a lot of places. Without
>>> HAVE_DWARF_GETLOCATIONS_SUPPORT the stubs return an errno, so include
>>> errno.h to fix the following build error:
>>>
>>> In file included from util/disasm.h:8,
>>> from util/annotate.h:16,
>>> from builtin-top.c:23:
>>> util/dwarf-aux.h: In function 'die_get_var_range':
>>> util/dwarf-aux.h:183:10: error: 'ENOTSUP' undeclared (first use in this function)
>>> 183 | return -ENOTSUP;
>>> | ^~~~~~~
>>>
>>> Fixes: 782959ac248a ("perf annotate: Add "update_insn_state" callback function to handle arch specific instruction tracking")
>>> Signed-off-by: James Clark <james.clark@linaro.org>
>
> There are a few variants of this same patch flying around:
> https://lore.kernel.org/lkml/20240919013513.118527-4-yangjihong@bytedance.com/
> https://lore.kernel.org/lkml/20240924003720.617258-4-irogers@google.com/
> Just a heads up that we only need to apply 1.
>
> Thanks,
> Ian
>
Oops thanks for the heads up. Usually I check if it was already posted
but this time it was so small I didn't do it. I'll check next time...
I don't think the fixes commit on
https://lore.kernel.org/lkml/20240919013513.118527-4-yangjihong@bytedance.com/
is quite right though, so maybe this one is slightly better.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-01 13:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 12:36 [PATCH] perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT James Clark
2024-10-01 13:47 ` Arnaldo Carvalho de Melo
2024-10-01 13:51 ` Ian Rogers
2024-10-01 13:57 ` James Clark
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).