docs-6.2.0/source/lib/omnitrace-user/omnitrace/categories.h File Reference#
categories.h File Reference
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | omnitrace_annotation |
A struct containing annotation data to be included in the perfetto trace. More... | |
Typedefs | |
typedef enum OMNITRACE_CATEGORIES | omnitrace_category_t |
Identifier for categories. More... | |
typedef enum OMNITRACE_ANNOTATION_TYPE | omnitrace_annotation_type_t |
typedef struct omnitrace_annotation | omnitrace_annotation_t |
Class Documentation
◆ omnitrace_annotation
struct omnitrace_annotation |
A struct containing annotation data to be included in the perfetto trace.
#include <cstddef>
#include <cstdint>
double
compute_residual(size_t n, double* data);
double
compute(size_t n, double* data, size_t nitr, double tolerance)
{
omnitrace_annotation_t _annotations[] = {
{ "data", OMNITRACE_VALUE_PTR, data },
{ "size", OMNITRACE_VALUE_SIZE_T, &n },
{ "tolerance", OMNITRACE_VALUE_FLOAT64, &tolerance },
nullptr
};
double residual = tolerance;
for(size_t i = 0; i < nitr; ++i)
{
omnitrace_user_push_annotated_region("compute", &_annotations);
residual = compute_residual(n, data);
_annotations[0].value = &i;
_annotations[1].value = &residual;
omnitrace_user_pop_annotated_region("compute", &_annotations);
}
return residual;
}
A struct containing annotation data to be included in the perfetto trace.
Definition: categories.h:178
int omnitrace_user_push_annotated_region(const char *, omnitrace_annotation_t *, unsigned long)
int omnitrace_user_pop_annotated_region(const char *, omnitrace_annotation_t *, unsigned long)
Definition at line 177 of file categories.h.
Class Members | ||
---|---|---|
const char * | name | label for annotation |
unsigned long | type | omnitrace_annotation_type_t |
void * | value | data to annotate |
Typedef Documentation
◆ omnitrace_annotation_t
◆ omnitrace_annotation_type_t
◆ omnitrace_category_t
Identifier for categories.
Enumeration Type Documentation
◆ OMNITRACE_ANNOTATION_TYPE
Identifier for the data type of the annotation. if the data type is not a pointer, pass the address of data.
Definition at line 96 of file categories.h.
enum OMNITRACE_ANNOTATION_TYPE omnitrace_annotation_type_t
◆ OMNITRACE_CATEGORIES
enum OMNITRACE_CATEGORIES |
Definition at line 37 of file categories.h.
@ OMNITRACE_CATEGORY_PROCESS_CONTEXT_SWITCH
Definition: categories.h:71
@ OMNITRACE_CATEGORY_PROCESS_PAGE_FAULT
Definition: categories.h:72
@ OMNITRACE_CATEGORY_PROCESS_KERNEL_MODE_TIME
Definition: categories.h:74
@ OMNITRACE_CATEGORY_THREAD_PAGE_FAULT
Definition: categories.h:77
@ OMNITRACE_CATEGORY_ROCM_SMI_MEMORY_USAGE
Definition: categories.h:55
@ OMNITRACE_CATEGORY_KERNEL_HARDWARE_COUNTER
Definition: categories.h:81
@ OMNITRACE_CATEGORY_THREAD_PEAK_MEMORY
Definition: categories.h:78
@ OMNITRACE_CATEGORY_THREAD_HARDWARE_COUNTER
Definition: categories.h:80
@ OMNITRACE_CATEGORY_THREAD_CONTEXT_SWITCH
Definition: categories.h:79
@ OMNITRACE_CATEGORY_PROCESS_USER_MODE_TIME
Definition: categories.h:73
@ OMNITRACE_CATEGORY_OVERFLOW_SAMPLING
Definition: categories.h:84