compiling for CentOS support

Change-Id: I0c01b4f34ac3701b5cea324e2e2a34835163aee0


[ROCm/rocprofiler commit: 2cccdb566e]
This commit is contained in:
Evgeny
2018-07-27 15:06:26 -05:00
parent b29a2616b0
commit f35caeda00
5 changed files with 20 additions and 17 deletions
+7 -7
View File
@@ -32,27 +32,27 @@ SOFTWARE.
#include <string>
#define EXC_ABORT(error, stream) \
{ \
do { \
std::ostringstream oss; \
oss << __FUNCTION__ << "(), " << stream; \
std::cout << oss.str() << std::endl; \
std::cout << "error(" << error << ") \"" << oss.str() << "\"" << std::endl; \
abort(); \
}
} while (0)
#define EXC_RAISING(error, stream) \
{ \
do { \
std::ostringstream oss; \
oss << __FUNCTION__ << "(), " << stream; \
throw rocprofiler::util::exception(error, oss.str()); \
}
} while (0)
#define AQL_EXC_RAISING(error, stream) \
{ \
do { \
const char* error_string = NULL; \
const rocprofiler::pfn_t* api = rocprofiler::util::HsaRsrcFactory::Instance().AqlProfileApi(); \
api->hsa_ven_amd_aqlprofile_error_string(&error_string); \
EXC_RAISING(error, stream << ", " << error_string); \
}
} while (0)
namespace rocprofiler {
namespace util {
@@ -45,21 +45,23 @@ SOFTWARE.
#define HSA_QUEUE_ALIGN_BYTES 64
#define HSA_PACKET_ALIGN_BYTES 64
#define CHECK_STATUS(msg, status) \
if (status != HSA_STATUS_SUCCESS) { \
#define CHECK_STATUS(msg, status) do { \
if ((status) != HSA_STATUS_SUCCESS) { \
const char* emsg = 0; \
hsa_status_string(status, &emsg); \
printf("%s: %s\n", msg, emsg ? emsg : "<unknown error>"); \
exit(1); \
}
} \
} while (0)
#define CHECK_ITER_STATUS(msg, status) \
if (status != HSA_STATUS_INFO_BREAK) { \
#define CHECK_ITER_STATUS(msg, status) do { \
if ((status) != HSA_STATUS_INFO_BREAK) { \
const char* emsg = 0; \
hsa_status_string(status, &emsg); \
printf("%s: %s\n", msg, emsg ? emsg : "<unknown error>"); \
exit(1); \
}
} \
} while (0)
namespace rocprofiler {
namespace util {