PC sampling bringup

Change-Id: I0d041c4c8c3778f2c328cde38432bc72223706a3

pc sampling integration fix

Change-Id: Ia66ff876d2d99ec4d561daf8320b65d75f5cd2fe
Tento commit je obsažen v:
Evgeny
2020-01-23 20:56:42 -06:00
rodič 4c921407ac
revize 9df9fddcfb
9 změnil soubory, kde provedl 251 přidání a 30 odebrání
+13 -1
Zobrazit soubor
@@ -25,6 +25,8 @@ THE SOFTWARE.
#include <hsa.h>
#include <hsa_api_trace.h>
#include <string.h>
#include <sstream>
#include <vector>
#include "core/context.h"
@@ -169,7 +171,9 @@ enum {
uint32_t LoadTool() {
uint32_t intercept_mode = 0;
const char* tool_lib = getenv("ROCP_TOOL_LIB");
ONLOAD_TRACE("load tool library(" << tool_lib << ")");
std::ostringstream oss;
if (tool_lib) oss << "load tool library(" << tool_lib << ")";
ONLOAD_TRACE(oss.str());
if (tool_lib) {
intercept_mode = DISPATCH_INTERCEPT_MODE;
@@ -555,6 +559,14 @@ PUBLIC_API hsa_status_t rocprofiler_reset(rocprofiler_t* handle, uint32_t group_
API_METHOD_SUFFIX
}
// Return context agent
PUBLIC_API hsa_status_t rocprofiler_get_agent(rocprofiler_t* handle, hsa_agent_t* agent) {
API_METHOD_PREFIX
rocprofiler::Context* context = reinterpret_cast<rocprofiler::Context*>(handle);
*agent = context->GetAgent();
API_METHOD_SUFFIX
}
// Get profiling group count
PUBLIC_API hsa_status_t rocprofiler_group_count(const rocprofiler_t* handle,
uint32_t* group_count) {