[PATCH] D45436: [llvm-exegesis] Add a flag to disable libpfm even if present.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 9 04:53:31 PDT 2018
courbet created this revision.
courbet added reviewers: uabelho, gchatelet.
Herald added subscribers: tschuett, mgorny.
Fixes PR37053.
Repository:
rL LLVM
https://reviews.llvm.org/D45436
Files:
CMakeLists.txt
cmake/config-ix.cmake
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -90,13 +90,15 @@
endif()
# Check for libpfm.
-check_library_exists(pfm pfm_initialize "" HAVE_LIBPFM_INITIALIZE)
-if(HAVE_LIBPFM_INITIALIZE)
- check_include_file(perfmon/perf_event.h HAVE_PERFMON_PERF_EVENT_H)
- check_include_file(perfmon/pfmlib.h HAVE_PERFMON_PFMLIB_H)
- check_include_file(perfmon/pfmlib_perf_event.h HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
- if(HAVE_PERFMON_PERF_EVENT_H AND HAVE_PERFMON_PFMLIB_H AND HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
- set(HAVE_LIBPFM 1)
+if (LLVM_ENABLE_LIBPFM)
+ check_library_exists(pfm pfm_initialize "" HAVE_LIBPFM_INITIALIZE)
+ if(HAVE_LIBPFM_INITIALIZE)
+ check_include_file(perfmon/perf_event.h HAVE_PERFMON_PERF_EVENT_H)
+ check_include_file(perfmon/pfmlib.h HAVE_PERFMON_PFMLIB_H)
+ check_include_file(perfmon/pfmlib_perf_event.h HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
+ if(HAVE_PERFMON_PERF_EVENT_H AND HAVE_PERFMON_PFMLIB_H AND HAVE_PERFMON_PFMLIB_PERF_EVENT_H)
+ set(HAVE_LIBPFM 1)
+ endif()
endif()
endif()
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -366,6 +366,8 @@
option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)
+option(LLVM_ENABLE_LIBPFM "Use libpfm for performance counters if available." ON)
+
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45436.141619.patch
Type: text/x-patch
Size: 1582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180409/ee31326d/attachment.bin>
More information about the llvm-commits
mailing list