From 877841db2411a8cfb98e17087c57ac9fec5d1280 Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Thu, 7 Aug 2025 15:41:31 +0200 Subject: [PATCH] Add high-level API --- rvprof.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 rvprof.h diff --git a/rvprof.h b/rvprof.h new file mode 100644 index 0000000..f926c01 --- /dev/null +++ b/rvprof.h @@ -0,0 +1,28 @@ +#ifndef RVPROF_H +#define RVPROF_H + +#include +#ifdef __cplusplus +extern "C"{ +#endif + +// not called by instrumented code directly anymore +void rvprof_init(const char* output_file); + +// not called by instrumented code directly anymore +void rvprof_set_program_name(const char* name); + +// begin profiling a named region +void rvprof_region_begin(const char* name); + +// end profiling of a named region +void rvprof_region_end(const char* name); + +// not called by instrumented code direclty anymore +void rvprof_finalize(); + +#ifdef __cplusplus +extern } +#endif + +#endif \ No newline at end of file