-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new tracy telemetry header and hxcpp zone macro
- Loading branch information
Showing
3 changed files
with
54 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#ifndef HX_TELEMETRY_TRACY_H | ||
#define HX_TELEMETRY_TRACY_H | ||
|
||
#ifndef HXCPP_TRACY | ||
#error "Error: HXCPP_TRACY must be defined." | ||
#endif | ||
|
||
#define TRACY_ENABLE | ||
#include <hxcpp.h> | ||
#include "../../project/thirdparty/tracy-0.11.1/tracy/TracyC.h" | ||
#include "../../project/thirdparty/tracy-0.11.1/tracy/Tracy.hpp" | ||
|
||
#ifdef HXCPP_TRACY_MEMORY | ||
#ifdef HXCPP_GC_MOVING | ||
#error "Error: HXCPP_TRACY_MEMORY is not supported when HXCPP_GC_MOVING is active." | ||
#endif | ||
#ifdef HXCPP_GC_GENERATIONAL | ||
#error "Error: HXCPP_TRACY_MEMORY is not supported when HXCPP_GC_GENERATIONAL is active." | ||
#endif | ||
#endif | ||
|
||
#define HXCPP_TRACY_ZONE(name) \ | ||
::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \ | ||
int TracyConcat(_hx_tracy_str_length, TracyLine); \ | ||
::tracy::ScopedZone ___tracy_scoped_zone(_hx_stackframe.lineNumber, _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), _hx_stackframe.position->functionName, strlen(_hx_stackframe.position->functionName), name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), &TracyConcat(_hx_tracy_str_length, TracyLine)), TracyConcat(_hx_tracy_str_length, TracyLine)); | ||
|
||
void __hxcpp_tracy_framemark(); | ||
void __hxcpp_tracy_plot(::String name, float val); | ||
void __hxcpp_tracy_plot_config(::String name, uint8_t format, bool step, bool fill, int color); | ||
void __hxcpp_tracy_message(::String msg, int color); | ||
void __hxcpp_tracy_message_app_info(::String info); | ||
void __hxcpp_tracy_set_thread_name_and_group(String name, int groupHint); | ||
void __hxcpp_tracy_test_zone(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters