Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.0
0.6.0
2 changes: 1 addition & 1 deletion cmake/rocprofiler_register_config_install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ configure_package_config_file(
write_basic_package_version_file(
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${PROJECT_NAME}-config-version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY SameMinorVersion)
COMPATIBILITY AnyNewerVersion)

install(
FILES
Expand Down
4 changes: 4 additions & 0 deletions cmake/rocprofiler_register_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ rocprofiler_register_add_option(ROCPROFILER_REGISTER_BUILD_FMT "Build FMT" ON)
rocprofiler_register_add_option(
ROCPROFILER_REGISTER_DEP_ROCMCORE "DEB and RPM package depend on rocm-core package"
${ROCM_DEP_ROCMCORE})
rocprofiler_register_add_option(
ROCPROFILER_REGISTER_BUILD_DEFAULT_ATTACHMENT
"Enable attachment by default, instead of requiring an environment variable when the application starts"
OFF)

# In the future, we will do this even with clang-tidy enabled
if(ROCPROFILER_REGISTER_BUILD_CI
Expand Down
9 changes: 9 additions & 0 deletions source/include/rocprofiler-register/rocprofiler-register.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ typedef struct
/// @var ROCP_REG_EXCESS_API_INSTANCES
/// @brief The same API has been registered too many times
///
/// @var ROCP_REG_INVALID_ARGUMENT
/// @brief Rocprofiler-register API function was provided an invalid argument
///
/// @var ROCP_REG_ATTACHMENT_NOT_AVAILABLE
/// @brief Rocprofiler-register attach or detach was invoked, but the attachment
/// library was not loaded at app startup.
///
typedef enum rocprofiler_register_error_code_t // NOLINT(performance-enum-size)
{
ROCP_REG_SUCCESS = 0,
Expand All @@ -72,6 +79,8 @@ typedef enum rocprofiler_register_error_code_t // NOLINT(performance-enum-size)
ROCP_REG_INVALID_API_ADDRESS,
ROCP_REG_ROCPROFILER_ERROR,
ROCP_REG_EXCESS_API_INSTANCES,
ROCP_REG_INVALID_ARGUMENT,
ROCP_REG_ATTACHMENT_NOT_AVAILABLE,
ROCP_REG_ERROR_CODE_END,
} rocprofiler_register_error_code_t;

Expand Down
4 changes: 4 additions & 0 deletions source/lib/rocprofiler-register/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ set_target_properties(
SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION})

if(ROCPROFILER_REGISTER_BUILD_DEFAULT_ATTACHMENT)
target_compile_definitions(rocprofiler-register PRIVATE ROCP_REG_DEFAULT_ATTACHMENT=1)
endif()

install(
TARGETS rocprofiler-register
DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
Loading