Merge "Added roctxRangeStart and roctxRangeEnd" into amd-master
Этот коммит содержится в:
Коммит
d3406bdb7b
5 files changed
+62
-5
No files matched your search
@@ -32,12 +32,15 @@ THE SOFTWARE.
|
||||
|
||||
#ifndef INC_ROCTRACER_ROCTX_H_
|
||||
#define INC_ROCTRACER_ROCTX_H_
|
||||
#include <roctx.h>
|
||||
|
||||
// ROC-TX API ID enumeration
|
||||
enum roctx_api_id_t {
|
||||
ROCTX_API_ID_roctxMarkA = 0,
|
||||
ROCTX_API_ID_roctxRangePushA = 1,
|
||||
ROCTX_API_ID_roctxRangePop = 2,
|
||||
ROCTX_API_ID_roctxRangeStartA = 3,
|
||||
ROCTX_API_ID_roctxRangeStop = 4,
|
||||
|
||||
ROCTX_API_ID_NUMBER,
|
||||
};
|
||||
@@ -45,7 +48,10 @@ enum roctx_api_id_t {
|
||||
// ROCTX callbacks data type
|
||||
typedef struct roctx_api_data_s {
|
||||
union {
|
||||
const char* message;
|
||||
struct {
|
||||
const char* message;
|
||||
roctx_range_id_t id;
|
||||
};
|
||||
struct {
|
||||
const char* message;
|
||||
} roctxMarkA;
|
||||
@@ -55,6 +61,14 @@ typedef struct roctx_api_data_s {
|
||||
struct {
|
||||
const char* message;
|
||||
} roctxRangePop;
|
||||
struct {
|
||||
const char* message;
|
||||
roctx_range_id_t id;
|
||||
} roctxRangeStartA;
|
||||
struct {
|
||||
const char* message;
|
||||
roctx_range_id_t id;
|
||||
} roctxRangeStop;
|
||||
} args;
|
||||
} roctx_api_data_t;
|
||||
|
||||
|
||||
@@ -70,6 +70,16 @@ int roctxRangePushA(const char* message);
|
||||
// A negative value is returned on the error.
|
||||
int roctxRangePop();
|
||||
|
||||
// ROCTX range id type
|
||||
typedef uint64_t roctx_range_id_t;
|
||||
|
||||
// Starts a process range
|
||||
roctx_range_id_t roctxRangeStartA(const char* message);
|
||||
#define roctxRangeStart(message) roctxRangeStartA(message)
|
||||
|
||||
// Stop a process range
|
||||
void roctxRangeStop(roctx_range_id_t id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C" block
|
||||
#endif // __cplusplus
|
||||
|
||||
Reference in new issue
Block a user