latest/source/lib/omnitrace-user/omnitrace/types.h File Reference

latest/source/lib/omnitrace-user/omnitrace/types.h File Reference#

omnitrace: latest/source/lib/omnitrace-user/omnitrace/types.h File Reference
types.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Classes

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

Macros

#define OMNITRACE_USER_CALLBACKS_INIT
 

Typedefs

typedef int(* omnitrace_trace_func_t) (void)
 
typedef int(* omnitrace_region_func_t) (const char *)
 
typedef int(* omnitrace_annotated_region_func_t) (const char *, omnitrace_annotation *, unsigned long)
 
typedef struct omnitrace_user_callbacks omnitrace_user_callbacks_t
 
typedef enum OMNITRACE_USER_CONFIGURE_MODE omnitrace_user_configure_mode_t
 
typedef enum OMNITRACE_USER_ERROR omnitrace_user_error_t
 

Enumerations

enum  OMNITRACE_USER_CONFIGURE_MODE {
  OMNITRACE_USER_UNION_CONFIG = 0 ,
  OMNITRACE_USER_REPLACE_CONFIG ,
  OMNITRACE_USER_INTERSECT_CONFIG ,
  OMNITRACE_USER_CONFIGURE_MODE_LAST
}
 Identifier for errors. More...
 
enum  OMNITRACE_USER_ERROR {
  OMNITRACE_USER_SUCCESS = 0 ,
  OMNITRACE_USER_ERROR_NO_BINDING ,
  OMNITRACE_USER_ERROR_BAD_VALUE ,
  OMNITRACE_USER_ERROR_INVALID_CATEGORY ,
  OMNITRACE_USER_ERROR_INTERNAL ,
  OMNITRACE_USER_ERROR_LAST
}
 Identifier for errors. More...
 

Class Documentation

◆ omnitrace_user_callbacks

struct omnitrace_user_callbacks

Struct containing the callbacks for the user API.

Definition at line 44 of file types.h.

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

Macro Definition Documentation

◆ OMNITRACE_USER_CALLBACKS_INIT

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

Definition at line 111 of file types.h.

Typedef Documentation

◆ omnitrace_annotated_region_func_t

typedef int(* omnitrace_annotated_region_func_t) (const char *, omnitrace_annotation *, unsigned long)

Definition at line 37 of file types.h.

◆ omnitrace_region_func_t

typedef int(* omnitrace_region_func_t) (const char *)

Definition at line 36 of file types.h.

◆ omnitrace_trace_func_t

typedef int(* omnitrace_trace_func_t) (void)

Definition at line 35 of file types.h.

◆ omnitrace_user_callbacks_t

◆ omnitrace_user_configure_mode_t

◆ omnitrace_user_error_t

Enumeration Type Documentation

◆ OMNITRACE_USER_CONFIGURE_MODE

Identifier for errors.

Enumerator
OMNITRACE_USER_UNION_CONFIG 

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

OMNITRACE_USER_REPLACE_CONFIG 

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

OMNITRACE_USER_INTERSECT_CONFIG 

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

OMNITRACE_USER_CONFIGURE_MODE_LAST 

Definition at line 82 of file types.h.

83  {
84  // clang-format off
85  OMNITRACE_USER_UNION_CONFIG = 0, ///< Replace the callbacks in the current config with the non-null callbacks in the provided config
86  OMNITRACE_USER_REPLACE_CONFIG, ///< Replace the entire config even if the provided config has null callbacks
87  OMNITRACE_USER_INTERSECT_CONFIG, ///< Produce a config which is the intersection of the current config and the provided config
89  // clang-format on
@ OMNITRACE_USER_CONFIGURE_MODE_LAST
Definition: types.h:88
@ OMNITRACE_USER_REPLACE_CONFIG
Replace the entire config even if the provided config has null callbacks.
Definition: types.h:86
@ OMNITRACE_USER_UNION_CONFIG
Replace the callbacks in the current config with the non-null callbacks in the provided config.
Definition: types.h:85
@ OMNITRACE_USER_INTERSECT_CONFIG
Produce a config which is the intersection of the current config and the provided config.
Definition: types.h:87
enum OMNITRACE_USER_CONFIGURE_MODE omnitrace_user_configure_mode_t

◆ OMNITRACE_USER_ERROR

Identifier for errors.

Enumerator
OMNITRACE_USER_SUCCESS 

No error.

OMNITRACE_USER_ERROR_NO_BINDING 

Function pointer was not assigned.

OMNITRACE_USER_ERROR_BAD_VALUE 

Provided value was invalid.

OMNITRACE_USER_ERROR_INVALID_CATEGORY 

Invalid user binding category.

OMNITRACE_USER_ERROR_INTERNAL 

Internal error occurred within libomnitrace.

OMNITRACE_USER_ERROR_LAST 

Definition at line 96 of file types.h.

97  {
98  OMNITRACE_USER_SUCCESS = 0, ///< No error
99  OMNITRACE_USER_ERROR_NO_BINDING, ///< Function pointer was not assigned
100  OMNITRACE_USER_ERROR_BAD_VALUE, ///< Provided value was invalid
101  OMNITRACE_USER_ERROR_INVALID_CATEGORY, ///< Invalid user binding category
102  OMNITRACE_USER_ERROR_INTERNAL, ///< Internal error occurred within libomnitrace
enum OMNITRACE_USER_ERROR omnitrace_user_error_t
@ OMNITRACE_USER_ERROR_LAST
Definition: types.h:103
@ OMNITRACE_USER_SUCCESS
No error.
Definition: types.h:98
@ OMNITRACE_USER_ERROR_INTERNAL
Internal error occurred within libomnitrace.
Definition: types.h:102
@ OMNITRACE_USER_ERROR_INVALID_CATEGORY
Invalid user binding category.
Definition: types.h:101
@ OMNITRACE_USER_ERROR_NO_BINDING
Function pointer was not assigned.
Definition: types.h:99
@ OMNITRACE_USER_ERROR_BAD_VALUE
Provided value was invalid.
Definition: types.h:100