-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libpfm service ported directly from libpfm example
- Loading branch information
1 parent
0c6e7ea
commit 390119e
Showing
14 changed files
with
1,433 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# - Find libpfm | ||
# | ||
# LIBPFM_INCLUDE_DIR - Path to libpfm.h | ||
# LIBPFM_LIBRARY - List of libraries for using libpfm | ||
# LIBPFM_FOUND - True if libpfm was found | ||
|
||
set(LIBPFM_INSTALL "" CACHE PATH "libpfm install directory") | ||
|
||
if(LIBPFM_INSTALL) | ||
# install dir specified, only search them | ||
find_path(LIBPFM_INCLUDE_DIR "perfmon/pfmlib_perf_event.h" | ||
PATHS ${LIBPFM_INSTALL} ${LIBPFM_INSTALL}/include | ||
NO_DEFAULT_PATH) | ||
|
||
find_library(LIBPFM_LIBRARY pfm | ||
PATHS ${LIBPFM_INSTALL} ${LIBPFM_INSTALL}/lib | ||
NO_DEFAULT_PATH) | ||
else() | ||
# no install dir specified, look in default and PAPI | ||
find_path(LIBPFM_INCLUDE_DIR "perfmon/pfmlib_perf_event.h" | ||
HINTS ${PAPI_INCLUDE_DIRS} ${PAPI_INCLUDE_DIRS}/libpfm4/include) | ||
|
||
find_library(LIBPFM_LIBRARY pfm | ||
HINTS ${PAPI_LIBRARIES} ${PAPI_LIBRARIES}/libpfm4/include) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Libpfm DEFAULT_MSG LIBPFM_LIBRARY LIBPFM_INCLUDE_DIR) | ||
|
||
mark_as_advanced(LIBPFM_LIBRARY LIBPFM_INCLUDE_DIR) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include_directories(${LIBPFM_INCLUDE_DIR}) | ||
|
||
set(CALIPER_LIBPFM_SOURCES | ||
Libpfm.cpp | ||
perf_util.c) | ||
|
||
add_library(caliper-libpfm OBJECT ${CALIPER_LIBPFM_SOURCES}) | ||
|
||
add_service_objlib("caliper-libpfm") | ||
add_caliper_service("libpfm CALIPER_HAVE_LIBPFM") |
Oops, something went wrong.