Sync with rocprofiler updates (#26)
- Update rocprofiler_configure prototype - add compile_commands.json to .gitignore
Tento commit je obsažen v:
@@ -22,20 +22,33 @@
|
||||
|
||||
#include <rocprofiler-register/version.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int (*rocprofiler_configure_callback_t)(void*);
|
||||
typedef struct
|
||||
{
|
||||
const char* name; ///< clients should set this value for debugging
|
||||
const uint32_t handle; ///< internal handle
|
||||
} rocprofiler_client_id_t;
|
||||
|
||||
typedef void (*rocprofiler_client_finalize_t)(rocprofiler_client_id_t);
|
||||
|
||||
typedef int (*rocprofiler_tool_initialize_t)(rocprofiler_client_finalize_t finalize_func,
|
||||
void* tool_data);
|
||||
|
||||
typedef void (*rocprofiler_tool_finalize_t)(void* tool_data);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
rocprofiler_configure_callback_t initialize;
|
||||
rocprofiler_configure_callback_t finalize;
|
||||
void* user_data;
|
||||
} rocprofiler_configure_result_t;
|
||||
size_t size; ///< in case of future extensions
|
||||
rocprofiler_tool_initialize_t initialize; ///< context creation
|
||||
rocprofiler_tool_finalize_t finalize; ///< cleanup
|
||||
void* tool_data; ///< data to provide to init and fini callbacks
|
||||
} rocprofiler_tool_configure_result_t;
|
||||
|
||||
typedef uint32_t (*rocprofiler_register_import_func_t)(void);
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ extern "C" {
|
||||
#pragma weak rocprofiler_register_import_roctx
|
||||
#pragma weak rocprofiler_register_import_roctx_static
|
||||
|
||||
extern rocprofiler_configure_result_t*
|
||||
rocprofiler_configure(uint32_t, const char*, uint32_t, uint32_t);
|
||||
extern rocprofiler_tool_configure_result_t*
|
||||
rocprofiler_configure(uint32_t, const char*, uint32_t, rocprofiler_client_id_t*);
|
||||
|
||||
extern int
|
||||
rocprofiler_set_api_table(const char*, uint64_t, uint64_t, void**, uint64_t);
|
||||
@@ -226,12 +226,13 @@ rocp_reg_scan_for_tools()
|
||||
LOG(INFO) << "loaded " << _rocp_reg_lib_path_fname.string() << " library at "
|
||||
<< _rocp_reg_lib_path.string();
|
||||
|
||||
LOG_IF(FATAL, !rocprofiler_lib_handle) << _rocp_reg_lib << " failed to load\n";
|
||||
LOG_IF(FATAL, rocprofiler_lib_handle == nullptr)
|
||||
<< _rocp_reg_lib << " failed to load\n";
|
||||
|
||||
*(void**) (&rocprofiler_lib_config_fn) =
|
||||
dlsym(rocprofiler_lib_handle, rocprofiler_lib_register_entrypoint);
|
||||
|
||||
LOG_IF(FATAL, !rocprofiler_lib_config_fn)
|
||||
LOG_IF(FATAL, rocprofiler_lib_config_fn == nullptr)
|
||||
<< _rocp_reg_lib << " did not contain '"
|
||||
<< rocprofiler_lib_register_entrypoint << "' symbol\n";
|
||||
}
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele