develop/projects/rocprofiler-systems/source/lib/rocprof-sys-causal-api/rocprofiler-systems/causal_api.h File Reference

develop/projects/rocprofiler-systems/source/lib/rocprof-sys-causal-api/rocprofiler-systems/causal_api.h File Reference#

rocprofiler-systems: develop/projects/rocprofiler-systems/source/lib/rocprof-sys-causal-api/rocprofiler-systems/causal_api.h File Reference
causal_api.h File Reference
#include "rocprofiler-systems/annotation.h"
#include <stddef.h>

Go to the source code of this file.

Classes

struct  rocprofsys_causal_callbacks
 Callbacks invoked by the causal API functions below. Registered by librocprof-sys-dl when it is preloaded; left null (no-op) otherwise. More...
 

Macros

#define ROCPROFSYS_CAUSAL_PUBLIC_API
 

Typedefs

typedef int(* rocprofsys_causal_region_func_t) (const char *)
 
typedef int(* rocprofsys_causal_annotated_func_t) (const char *, rocprofsys_annotation_t *, unsigned long)
 
typedef struct rocprofsys_causal_callbacks rocprofsys_causal_callbacks_t
 

Functions

int rocprofsys_causal_begin (const char *)
 Starts a latency progress point (region of interest) with the given label. More...
 
int rocprofsys_causal_end (const char *)
 Ends the latency progress point for the matching label. More...
 
int rocprofsys_causal_progress (const char *)
 Adds a throughput progress point with the given label. More...
 
int rocprofsys_causal_annotated_progress (const char *, rocprofsys_annotation_t *, unsigned long)
 Adds a throughput progress point with the given label and annotations. More...
 
void rocprofsys_causal_register_callbacks (rocprofsys_causal_callbacks_t)
 Registers the callbacks invoked by the functions above. Called by librocprof-sys-dl once it dlopen's this library; not intended for direct use. More...
 

Detailed Description

Minimal, near-zero-overhead library backing the ROCPROFSYS_CAUSAL_* macros (see causal.h). An application links this tiny library directly; every function is a no-op until librocprof-sys-dl.so is separately preloaded and registers the real callbacks via rocprofsys_causal_register_callbacks(). This lets causal progress points ship in production code without pulling in the full profiler backend.

There is no general-purpose instrumentation API here (that role is now served by rocprofiler-sdk-roctx) – only what causal profiling needs.

Definition in file causal_api.h.


Class Documentation

◆ rocprofsys_causal_callbacks

struct rocprofsys_causal_callbacks

Callbacks invoked by the causal API functions below. Registered by librocprof-sys-dl when it is preloaded; left null (no-op) otherwise.

Definition at line 51 of file causal_api.h.

Class Members
rocprofsys_causal_annotated_func_t annotated_progress
rocprofsys_causal_region_func_t begin
rocprofsys_causal_region_func_t end
rocprofsys_causal_region_func_t progress

Macro Definition Documentation

◆ ROCPROFSYS_CAUSAL_PUBLIC_API

#define ROCPROFSYS_CAUSAL_PUBLIC_API

Definition at line 26 of file causal_api.h.

Typedef Documentation

◆ rocprofsys_causal_annotated_func_t

typedef int(* rocprofsys_causal_annotated_func_t) (const char *, rocprofsys_annotation_t *, unsigned long)

Definition at line 42 of file causal_api.h.

◆ rocprofsys_causal_callbacks_t

◆ rocprofsys_causal_region_func_t

typedef int(* rocprofsys_causal_region_func_t) (const char *)

Definition at line 40 of file causal_api.h.

Function Documentation

◆ rocprofsys_causal_annotated_progress()

int rocprofsys_causal_annotated_progress ( const char *  ,
rocprofsys_annotation_t ,
unsigned long   
)

Adds a throughput progress point with the given label and annotations.

◆ rocprofsys_causal_begin()

int rocprofsys_causal_begin ( const char *  )

Starts a latency progress point (region of interest) with the given label.

◆ rocprofsys_causal_end()

int rocprofsys_causal_end ( const char *  )

Ends the latency progress point for the matching label.

◆ rocprofsys_causal_progress()

int rocprofsys_causal_progress ( const char *  )

Adds a throughput progress point with the given label.

◆ rocprofsys_causal_register_callbacks()

void rocprofsys_causal_register_callbacks ( rocprofsys_causal_callbacks_t  )

Registers the callbacks invoked by the functions above. Called by librocprof-sys-dl once it dlopen's this library; not intended for direct use.