V1/V2 API Library Separation

V1 library will be supported as librocprofiler64.so and V2 will be supported as librocprofiler64v2.so and headers will be rocprofiler.h for V1 and v2/rocprofiler.h for v2

Change-Id: Ibe5bdbf2f79f0175342c648e917ae77918186604


[ROCm/rocprofiler commit: 9e62e066fe]
This commit is contained in:
Ammar ELWazir
2023-04-20 22:04:46 +00:00
committed by Ammar Elwazir
parent 6b53186f13
commit 7647f6988f
62 changed files with 2220 additions and 737 deletions
+3 -7
View File
@@ -18,15 +18,12 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. */
#define ROCPROFILER_V2
#include <dirent.h>
#include <dlfcn.h>
#include <fcntl.h>
#include <hsa/hsa.h>
#include <hsa/hsa_api_trace.h>
#include <rocprofiler.h>
#include <rocprofiler_plugin.h>
#include "rocprofiler.h"
#include "rocprofiler_plugin.h"
#include <sys/syscall.h>
#include <unistd.h>
#include <sys/ipc.h>
@@ -54,7 +51,6 @@
#include <thread>
#include <chrono>
#include "rocprofiler.h"
#include "utils/helper.h"
namespace fs = std::experimental::filesystem;
@@ -415,7 +411,7 @@ ROCPROFILER_EXPORT extern const uint32_t HSA_AMD_TOOL_PRIORITY = 1025;
The function updates the core api table function pointers to point to the
interceptor functions in this file.
*/
ROCPROFILER_EXPORT bool OnLoad(HsaApiTable* table, uint64_t runtime_version,
ROCPROFILER_EXPORT bool OnLoad(void* table, uint64_t runtime_version,
uint64_t failed_tool_count, const char* const* failed_tool_names) {
if (rocprofiler_version_major() != ROCPROFILER_VERSION_MAJOR ||
rocprofiler_version_minor() < ROCPROFILER_VERSION_MINOR) {