Skip to content

Commit 87e2baf

Browse files
authored
update to Tracy 0.12.0 (#1231)
1 parent 8268ef2 commit 87e2baf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2970
-703
lines changed

include/hx/TelemetryTracy.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#define TRACY_ENABLE
99
#include <hxcpp.h>
10-
#include "../../project/thirdparty/tracy-0.11.1/tracy/TracyC.h"
11-
#include "../../project/thirdparty/tracy-0.11.1/tracy/Tracy.hpp"
10+
#include "../../project/thirdparty/tracy-0.12.0/tracy/TracyC.h"
11+
#include "../../project/thirdparty/tracy-0.12.0/tracy/Tracy.hpp"
1212

1313
#ifdef HXCPP_TRACY_MEMORY
1414
#ifdef HXCPP_GC_MOVING
@@ -30,7 +30,7 @@
3030
::hx::strbuf TracyConcat(_hx_tracy_str_buffer, TracyLine); \
3131
int TracyConcat(_hx_tracy_str_length, TracyLine); \
3232
const char *TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine) = name.utf8_str(&TracyConcat(_hx_tracy_str_buffer, TracyLine), false, &TracyConcat(_hx_tracy_str_length, TracyLine)); \
33-
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine), TracyConcat(_hx_tracy_str_length, TracyLine));
33+
::tracy::ScopedZone TracyConcat(_hx_tracy_scoped_zone,TracyLine)(_hx_stackframe.lineNumber, _hx_stackframe.position->fileName, strlen(_hx_stackframe.position->fileName), _hx_stackframe.position->fullName, strlen(_hx_stackframe.position->fullName), TracyConcat(_hx_tracy_str_buffer_ptr, TracyLine), TracyConcat(_hx_tracy_str_length, TracyLine), -1);
3434
#endif
3535

3636
void __hxcpp_tracy_framemark();

project/thirdparty/tracy-0.11.1/tracy/Tracy.hpp

Lines changed: 0 additions & 300 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

project/thirdparty/tracy-0.11.1/client/TracyArmCpuTable.hpp renamed to project/thirdparty/tracy-0.12.0/client/TracyArmCpuTable.hpp

File renamed without changes.

project/thirdparty/tracy-0.11.1/client/TracyCallstack.cpp renamed to project/thirdparty/tracy-0.12.0/client/TracyCallstack.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,12 @@ extern "C"
282282
t_SymFromInlineContext _SymFromInlineContext = 0;
283283
t_SymGetLineFromInlineContext _SymGetLineFromInlineContext = 0;
284284

285-
TRACY_API ___tracy_t_RtlWalkFrameChain ___tracy_RtlWalkFrameChain = 0;
285+
typedef unsigned long (__stdcall *___tracy_t_RtlWalkFrameChain)( void**, unsigned long, unsigned long );
286+
___tracy_t_RtlWalkFrameChain ___tracy_RtlWalkFrameChainPtr = nullptr;
287+
TRACY_API unsigned long ___tracy_RtlWalkFrameChain( void** callers, unsigned long count, unsigned long flags)
288+
{
289+
return ___tracy_RtlWalkFrameChainPtr(callers, count, flags);
290+
}
286291
}
287292

288293
struct ModuleCache
@@ -307,7 +312,7 @@ size_t s_krnlCacheCnt;
307312

308313
void InitCallstackCritical()
309314
{
310-
___tracy_RtlWalkFrameChain = (___tracy_t_RtlWalkFrameChain)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlWalkFrameChain" );
315+
___tracy_RtlWalkFrameChainPtr = (___tracy_t_RtlWalkFrameChain)GetProcAddress( GetModuleHandleA( "ntdll.dll" ), "RtlWalkFrameChain" );
311316
}
312317

313318
void DbgHelpInit()

project/thirdparty/tracy-0.11.1/client/TracyCallstack.h renamed to project/thirdparty/tracy-0.12.0/client/TracyCallstack.h

File renamed without changes.

project/thirdparty/tracy-0.11.1/client/TracyCallstack.hpp renamed to project/thirdparty/tracy-0.12.0/client/TracyCallstack.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
namespace tracy
1111
{
12-
static tracy_force_inline void* Callstack( int /*depth*/ ) { return nullptr; }
12+
static constexpr bool has_callstack() { return false; }
13+
static tracy_force_inline void* Callstack( int32_t /*depth*/ ) { return nullptr; }
1314
}
1415

1516
#else
@@ -38,6 +39,8 @@ static tracy_force_inline void* Callstack( int /*depth*/ ) { return nullptr; }
3839
namespace tracy
3940
{
4041

42+
static constexpr bool has_callstack() { return true; }
43+
4144
struct CallstackSymbolData
4245
{
4346
const char* file;
@@ -79,11 +82,10 @@ debuginfod_client* GetDebuginfodClient();
7982

8083
extern "C"
8184
{
82-
typedef unsigned long (__stdcall *___tracy_t_RtlWalkFrameChain)( void**, unsigned long, unsigned long );
83-
TRACY_API extern ___tracy_t_RtlWalkFrameChain ___tracy_RtlWalkFrameChain;
85+
TRACY_API unsigned long ___tracy_RtlWalkFrameChain( void**, unsigned long, unsigned long );
8486
}
8587

86-
static tracy_force_inline void* Callstack( int depth )
88+
static tracy_force_inline void* Callstack( int32_t depth )
8789
{
8890
assert( depth >= 1 && depth < 63 );
8991
auto trace = (uintptr_t*)tracy_malloc( ( 1 + depth ) * sizeof( uintptr_t ) );
@@ -112,7 +114,7 @@ static _Unwind_Reason_Code tracy_unwind_callback( struct _Unwind_Context* ctx, v
112114
return _URC_NO_REASON;
113115
}
114116

115-
static tracy_force_inline void* Callstack( int depth )
117+
static tracy_force_inline void* Callstack( int32_t depth )
116118
{
117119
assert( depth >= 1 && depth < 63 );
118120

@@ -127,7 +129,7 @@ static tracy_force_inline void* Callstack( int depth )
127129

128130
#elif TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6
129131

130-
static tracy_force_inline void* Callstack( int depth )
132+
static tracy_force_inline void* Callstack( int32_t depth )
131133
{
132134
assert( depth >= 1 );
133135

File renamed without changes.

0 commit comments

Comments
 (0)