diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2018-01-17 12:52:10 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-01-25 04:37:23 -0500 |
commit | aa6292f4845e7921fca60b146403ea6682b8f65d (patch) | |
tree | 8705de03697729fa8b99372b87cfd717b590daeb /tools/build | |
parent | 5b50758c4b5e2b122309ee307bd2ebd7fcd8871f (diff) |
perf tools: Integrating the CoreSight decoding library
The Open CoreSight Decoding Library (openCSD) is a free and open library
to decode traces collected by the CoreSight hardware infrastructure.
This patch adds the required mechanic to recognise the presence of the
openCSD library on a system and set up miscellaneous flags to be used in
the compilation of the trace decoding feature.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Mike Leach <mike.leach@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Link: http://lkml.kernel.org/r/1516211539-5166-2-git-send-email-mathieu.poirier@linaro.org
Link: http://lkml.kernel.org/r/1516635644-24819-1-git-send-email-mathieu.poirier@linaro.org
[ Merged missing test-libopencsd.c file, provided later by Mathieu ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
-rw-r--r-- | tools/build/Makefile.feature | 3 | ||||
-rw-r--r-- | tools/build/feature/Makefile | 7 | ||||
-rw-r--r-- | tools/build/feature/test-all.c | 5 | ||||
-rw-r--r-- | tools/build/feature/test-libopencsd.c | 8 |
4 files changed, 21 insertions, 2 deletions
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index e52fcefee379..c378f003b007 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature | |||
@@ -66,7 +66,8 @@ FEATURE_TESTS_BASIC := \ | |||
66 | bpf \ | 66 | bpf \ |
67 | sched_getcpu \ | 67 | sched_getcpu \ |
68 | sdt \ | 68 | sdt \ |
69 | setns | 69 | setns \ |
70 | libopencsd | ||
70 | 71 | ||
71 | # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list | 72 | # FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list |
72 | # of all feature tests | 73 | # of all feature tests |
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index cff38f342283..59585fe20221 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile | |||
@@ -52,7 +52,8 @@ FILES= \ | |||
52 | test-cxx.bin \ | 52 | test-cxx.bin \ |
53 | test-jvmti.bin \ | 53 | test-jvmti.bin \ |
54 | test-sched_getcpu.bin \ | 54 | test-sched_getcpu.bin \ |
55 | test-setns.bin | 55 | test-setns.bin \ |
56 | test-libopencsd.bin | ||
56 | 57 | ||
57 | FILES := $(addprefix $(OUTPUT),$(FILES)) | 58 | FILES := $(addprefix $(OUTPUT),$(FILES)) |
58 | 59 | ||
@@ -104,6 +105,10 @@ $(OUTPUT)test-sched_getcpu.bin: | |||
104 | $(OUTPUT)test-setns.bin: | 105 | $(OUTPUT)test-setns.bin: |
105 | $(BUILD) | 106 | $(BUILD) |
106 | 107 | ||
108 | $(OUTPUT)test-libopencsd.bin: | ||
109 | $(BUILD) # -lopencsd_c_api -lopencsd provided by | ||
110 | # $(FEATURE_CHECK_LDFLAGS-libopencsd) | ||
111 | |||
107 | DWARFLIBS := -ldw | 112 | DWARFLIBS := -ldw |
108 | ifeq ($(findstring -static,${LDFLAGS}),-static) | 113 | ifeq ($(findstring -static,${LDFLAGS}),-static) |
109 | DWARFLIBS += -lelf -lebl -lz -llzma -lbz2 | 114 | DWARFLIBS += -lelf -lebl -lz -llzma -lbz2 |
diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 6fdf83263ab7..8dc20a61341f 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c | |||
@@ -162,6 +162,10 @@ | |||
162 | # include "test-setns.c" | 162 | # include "test-setns.c" |
163 | #undef main | 163 | #undef main |
164 | 164 | ||
165 | #define main main_test_libopencsd | ||
166 | # include "test-libopencsd.c" | ||
167 | #undef main | ||
168 | |||
165 | int main(int argc, char *argv[]) | 169 | int main(int argc, char *argv[]) |
166 | { | 170 | { |
167 | main_test_libpython(); | 171 | main_test_libpython(); |
@@ -199,6 +203,7 @@ int main(int argc, char *argv[]) | |||
199 | main_test_sched_getcpu(); | 203 | main_test_sched_getcpu(); |
200 | main_test_sdt(); | 204 | main_test_sdt(); |
201 | main_test_setns(); | 205 | main_test_setns(); |
206 | main_test_libopencsd(); | ||
202 | 207 | ||
203 | return 0; | 208 | return 0; |
204 | } | 209 | } |
diff --git a/tools/build/feature/test-libopencsd.c b/tools/build/feature/test-libopencsd.c new file mode 100644 index 000000000000..5ff1246e6194 --- /dev/null +++ b/tools/build/feature/test-libopencsd.c | |||
@@ -0,0 +1,8 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
2 | #include <opencsd/c_api/opencsd_c_api.h> | ||
3 | |||
4 | int main(void) | ||
5 | { | ||
6 | (void)ocsd_get_version(); | ||
7 | return 0; | ||
8 | } | ||