latest/source/lib/rocprof-sys-user/rocprofiler-systems/types.h File Reference

latest/source/lib/rocprof-sys-user/rocprofiler-systems/types.h File Reference#

rocprofiler-systems: latest/source/lib/rocprof-sys-user/rocprofiler-systems/types.h File Reference
types.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  rocprofsys_user_callbacks
 Struct containing the callbacks for the user API. More...
 

Macros

#define ROCPROFSYS_USER_CALLBACKS_INIT
 

Typedefs

typedef int(* rocprofsys_trace_func_t) (void)
 
typedef int(* rocprofsys_region_func_t) (const char *)
 
typedef int(* rocprofsys_annotated_region_func_t) (const char *, rocprofsys_annotation *, unsigned long)
 
typedef struct rocprofsys_user_callbacks rocprofsys_user_callbacks_t
 
typedef enum ROCPROFSYS_USER_CONFIGURE_MODE rocprofsys_user_configure_mode_t
 
typedef enum ROCPROFSYS_USER_ERROR rocprofsys_user_error_t
 

Enumerations

enum  ROCPROFSYS_USER_CONFIGURE_MODE {
  ROCPROFSYS_USER_UNION_CONFIG = 0 ,
  ROCPROFSYS_USER_REPLACE_CONFIG ,
  ROCPROFSYS_USER_INTERSECT_CONFIG ,
  ROCPROFSYS_USER_CONFIGURE_MODE_LAST
}
 Identifier for errors. More...
 
enum  ROCPROFSYS_USER_ERROR {
  ROCPROFSYS_USER_SUCCESS = 0 ,
  ROCPROFSYS_USER_ERROR_NO_BINDING ,
  ROCPROFSYS_USER_ERROR_BAD_VALUE ,
  ROCPROFSYS_USER_ERROR_INVALID_CATEGORY ,
  ROCPROFSYS_USER_ERROR_INTERNAL ,
  ROCPROFSYS_USER_ERROR_LAST
}
 Identifier for errors. More...
 

Class Documentation

◆ rocprofsys_user_callbacks

struct rocprofsys_user_callbacks

Struct containing the callbacks for the user API.

Definition at line 44 of file types.h.

Class Members
rocprofsys_annotated_region_func_t annotated_progress callback for marking an causal profiling event + annotations
rocprofsys_annotated_region_func_t pop_annotated_region callback for ending a trace region + annotations
rocprofsys_region_func_t pop_region callback for ending a trace region
rocprofsys_region_func_t progress callback for marking an causal profiling event
rocprofsys_annotated_region_func_t push_annotated_region callback for starting a trace region + annotations
rocprofsys_region_func_t push_region callback for starting a trace region
rocprofsys_trace_func_t start_thread_trace callback for enabling tracing on current thread
rocprofsys_trace_func_t start_trace callback for enabling tracing globally
rocprofsys_trace_func_t stop_thread_trace callback for disabling tracing on current thread
rocprofsys_trace_func_t stop_trace callback for disabling tracing globally

Macro Definition Documentation

◆ ROCPROFSYS_USER_CALLBACKS_INIT

#define ROCPROFSYS_USER_CALLBACKS_INIT
Value:
{ \
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL \
}

Definition at line 112 of file types.h.

Typedef Documentation

◆ rocprofsys_annotated_region_func_t

typedef int(* rocprofsys_annotated_region_func_t) (const char *, rocprofsys_annotation *, unsigned long)

Definition at line 37 of file types.h.

◆ rocprofsys_region_func_t

typedef int(* rocprofsys_region_func_t) (const char *)

Definition at line 36 of file types.h.

◆ rocprofsys_trace_func_t

typedef int(* rocprofsys_trace_func_t) (void)

Definition at line 35 of file types.h.

◆ rocprofsys_user_callbacks_t

◆ rocprofsys_user_configure_mode_t

◆ rocprofsys_user_error_t

Enumeration Type Documentation

◆ ROCPROFSYS_USER_CONFIGURE_MODE

Identifier for errors.

Enumerator
ROCPROFSYS_USER_UNION_CONFIG 

Replace the callbacks in the current config with the non-null callbacks in the provided config.

ROCPROFSYS_USER_REPLACE_CONFIG 

Replace the entire config even if the provided config has null callbacks.

ROCPROFSYS_USER_INTERSECT_CONFIG 

Produce a config which is the intersection of the current config and the provided config.

ROCPROFSYS_USER_CONFIGURE_MODE_LAST 

Definition at line 82 of file types.h.

83  {
84  // clang-format off
85  ROCPROFSYS_USER_UNION_CONFIG = 0, ///< Replace the callbacks in the current config with the non-null callbacks in the provided config
86  ROCPROFSYS_USER_REPLACE_CONFIG, ///< Replace the entire config even if the provided config has null callbacks
87  ROCPROFSYS_USER_INTERSECT_CONFIG, ///< Produce a config which is the intersection of the current config and the provided config
89  // clang-format on
enum ROCPROFSYS_USER_CONFIGURE_MODE rocprofsys_user_configure_mode_t
@ ROCPROFSYS_USER_REPLACE_CONFIG
Replace the entire config even if the provided config has null callbacks.
Definition: types.h:86
@ ROCPROFSYS_USER_CONFIGURE_MODE_LAST
Definition: types.h:88
@ ROCPROFSYS_USER_INTERSECT_CONFIG
Produce a config which is the intersection of the current config and the provided config.
Definition: types.h:87
@ ROCPROFSYS_USER_UNION_CONFIG
Replace the callbacks in the current config with the non-null callbacks in the provided config.
Definition: types.h:85

◆ ROCPROFSYS_USER_ERROR

Identifier for errors.

Enumerator
ROCPROFSYS_USER_SUCCESS 

No error.

ROCPROFSYS_USER_ERROR_NO_BINDING 

Function pointer was not assigned.

ROCPROFSYS_USER_ERROR_BAD_VALUE 

Provided value was invalid.

ROCPROFSYS_USER_ERROR_INVALID_CATEGORY 

Invalid user binding category.

ROCPROFSYS_USER_ERROR_INTERNAL 

Internal error occurred within librocprof-sys.

ROCPROFSYS_USER_ERROR_LAST 

Definition at line 96 of file types.h.

97  {
98  ROCPROFSYS_USER_SUCCESS = 0, ///< No error
99  ROCPROFSYS_USER_ERROR_NO_BINDING, ///< Function pointer was not assigned
100  ROCPROFSYS_USER_ERROR_BAD_VALUE, ///< Provided value was invalid
101  ROCPROFSYS_USER_ERROR_INVALID_CATEGORY, ///< Invalid user binding category
102  ROCPROFSYS_USER_ERROR_INTERNAL, ///< Internal error occurred within
103  ///< librocprof-sys
@ ROCPROFSYS_USER_ERROR_NO_BINDING
Function pointer was not assigned.
Definition: types.h:99
@ ROCPROFSYS_USER_ERROR_INVALID_CATEGORY
Invalid user binding category.
Definition: types.h:101
@ ROCPROFSYS_USER_ERROR_LAST
Definition: types.h:104
@ ROCPROFSYS_USER_SUCCESS
No error.
Definition: types.h:98
@ ROCPROFSYS_USER_ERROR_BAD_VALUE
Provided value was invalid.
Definition: types.h:100
@ ROCPROFSYS_USER_ERROR_INTERNAL
Internal error occurred within librocprof-sys.
Definition: types.h:102
enum ROCPROFSYS_USER_ERROR rocprofsys_user_error_t