From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-trace-devel@vger.kernel.org,
Tzvetomir Stoyanov <tz.stoyanov@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Cc: eranian@google.com, Ian Rogers <irogers@google.com>
Subject: [PATCH v3 3/4] perf: Add define for libtracefs version
Date: Wed, 22 Sep 2021 17:10:23 -0700 [thread overview]
Message-ID: <20210923001024.550263-3-irogers@google.com> (raw)
In-Reply-To: <20210923001024.550263-1-irogers@google.com>
This will allow version specific support of libtracefs.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/Makefile.config | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 2001c315f0db..0ae2e3d8b832 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1108,6 +1108,12 @@ ifdef LIBTRACEFS_DYNAMIC
$(call feature_check,libtracefs)
ifeq ($(feature-libtracefs), 1)
EXTLIBS += -ltracefs
+ LIBTRACEFS_VERSION := $(shell $(PKG_CONFIG) --modversion libtracefs)
+ LIBTRACEFS_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEFS_VERSION)))
+ LIBTRACEFS_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEFS_VERSION)))
+ LIBTRACEFS_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEFS_VERSION)))
+ LIBTRACEFS_VERSION_CPP := $(shell expr $(LIBTRACEFS_VERSION_1) \* 255 \* 255 + $(LIBTRACEFS_VERSION_2) \* 255 + $(LIBTRACEFS_VERSION_3))
+ CFLAGS += -DLIBTRACEFS_VERSION=$(LIBTRACEFS_VERSION_CPP)
else
dummy := $(error Error: No libtracefs devel library found, please install libtracefs-dev);
endif
--
2.33.0.464.g1972c5931b-goog
next prev parent reply other threads:[~2021-09-23 0:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 0:10 [PATCH v3 1/4] perf: Enable libtracefs dynamic linking Ian Rogers
2021-09-23 0:10 ` [PATCH v3 2/4] perf: Add define for libtraceevent version Ian Rogers
2021-09-23 0:10 ` Ian Rogers [this message]
2021-09-23 0:10 ` [PATCH v3 4/4] libtraceevent: Increase libtraceevent logging when verbose Ian Rogers
2021-12-16 8:07 ` Jiri Slaby
2022-01-03 8:25 ` [was: libtraceevent: Increase libtraceevent logging when verbose] Jiri Slaby
2022-01-03 15:04 ` Arnaldo Carvalho de Melo
2022-01-03 15:07 ` Steven Rostedt
2022-01-03 15:15 ` Arnaldo Carvalho de Melo
2022-01-04 6:17 ` Jiri Slaby
2022-01-06 7:01 ` Ian Rogers
2021-09-28 19:01 ` [PATCH v3 1/4] perf: Enable libtracefs dynamic linking Arnaldo Carvalho de Melo
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=20210923001024.550263-3-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tz.stoyanov@gmail.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;
as well as URLs for NNTP newsgroup(s).