From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
Kajol Jain <kjain@linux.ibm.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
"Steinar H. Gunderson" <sesse@google.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
Hemant Kumar <hemant@linux.vnet.ibm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Yang Jihong <yangjihong@bytedance.com>,
leo.yan@arm.com
Subject: [PATCH v1 3/3] perf build: Fix !HAVE_DWARF_GETLOCATIONS_SUPPORT
Date: Mon, 23 Sep 2024 17:37:20 -0700 [thread overview]
Message-ID: <20240924003720.617258-4-irogers@google.com> (raw)
In-Reply-To: <20240924003720.617258-1-irogers@google.com>
Testing with a LIBDW_DIR showed some issues. In dwarf-aux.h if
HAVE_DWARF_GETLOCATIONS_SUPPORT isn't defined then the code uses an
undefined errno value, so add errno.h.
In Makefile.config the dwarf feature tests need the LIBDW_DIR setting
in the CFLAGS/LDFLAGS.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/Makefile.config | 6 ++++++
tools/perf/util/dwarf-aux.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 4dcf7a0fd235..5e26d3a91b36 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -159,8 +159,14 @@ ifeq ($(findstring -static,${LDFLAGS}),-static)
DWARFLIBS += -lebl
endif
endif
+FEATURE_CHECK_CFLAGS-dwarf := $(LIBDW_CFLAGS)
+FEATURE_CHECK_LDFLAGS-dwarf := $(LIBDW_LDFLAGS) $(DWARFLIBS)
FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS)
+FEATURE_CHECK_CFLAGS-dwarf_getlocations := $(LIBDW_CFLAGS)
+FEATURE_CHECK_LDFLAGS-dwarf_getlocations := $(LIBDW_LDFLAGS) $(DWARFLIBS)
+FEATURE_CHECK_CFLAGS-dwarf_getcfi := $(LIBDW_CFLAGS)
+FEATURE_CHECK_LDFLAGS-dwarf_getcfi := $(LIBDW_LDFLAGS) $(DWARFLIBS)
# for linking with debug library, run like:
# make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/
diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h
index 336a3a183a78..925a9bb9fb15 100644
--- a/tools/perf/util/dwarf-aux.h
+++ b/tools/perf/util/dwarf-aux.h
@@ -177,6 +177,7 @@ void die_collect_vars(Dwarf_Die *sc_die, struct die_var_type **var_types);
void die_collect_global_vars(Dwarf_Die *cu_die, struct die_var_type **var_types);
#else /* HAVE_DWARF_GETLOCATIONS_SUPPORT */
+#include <errno.h>
static inline int die_get_var_range(Dwarf_Die *sp_die __maybe_unused,
Dwarf_Die *vr_die __maybe_unused,
--
2.46.0.792.g87dc391469-goog
next prev parent reply other threads:[~2024-09-24 0:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 0:37 [PATCH v1 0/3] 2 memory fixes and a build fix Ian Rogers
2024-09-24 0:37 ` [PATCH v1 1/3] perf disasm: Fix capstone memory leak Ian Rogers
2024-09-24 18:38 ` Namhyung Kim
2024-09-24 19:51 ` Ian Rogers
2024-09-25 5:57 ` Namhyung Kim
2024-09-24 0:37 ` [PATCH v1 2/3] perf probe: Fix libdw " Ian Rogers
2024-09-24 9:17 ` James Clark
2024-09-24 18:39 ` Namhyung Kim
2024-09-24 19:47 ` Ian Rogers
2024-09-25 6:00 ` Namhyung Kim
2024-10-02 17:43 ` Namhyung Kim
2024-10-02 19:08 ` Ian Rogers
2024-10-02 21:53 ` Namhyung Kim
2024-09-24 0:37 ` Ian Rogers [this message]
2024-09-24 9:18 ` [PATCH v1 0/3] 2 memory fixes and a build fix James Clark
2024-09-24 18:25 ` Namhyung Kim
2024-10-01 5:11 ` Ian Rogers
2024-10-01 23:58 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240924003720.617258-4-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=hemant@linux.vnet.ibm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kjain@linux.ibm.com \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sesse@google.com \
--cc=yangjihong@bytedance.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®