mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Make C API symbols visible across dlls.
This commit is contained in:
parent
eba64b30a3
commit
9e1935f070
38
TracyC.h
38
TracyC.h
@ -66,11 +66,11 @@ struct ___tracy_c_zone_context
|
|||||||
// This struct, as visible to user, is immutable, so treat it as if const was declared here.
|
// This struct, as visible to user, is immutable, so treat it as if const was declared here.
|
||||||
typedef /*const*/ struct ___tracy_c_zone_context TracyCZoneCtx;
|
typedef /*const*/ struct ___tracy_c_zone_context TracyCZoneCtx;
|
||||||
|
|
||||||
TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_source_location_data* srcloc, int active );
|
TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_source_location_data* srcloc, int active );
|
||||||
TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___tracy_source_location_data* srcloc, int depth, int active );
|
TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___tracy_source_location_data* srcloc, int depth, int active );
|
||||||
void ___tracy_emit_zone_end( TracyCZoneCtx ctx );
|
TRACY_API void ___tracy_emit_zone_end( TracyCZoneCtx ctx );
|
||||||
void ___tracy_emit_zone_text( TracyCZoneCtx ctx, const char* txt, size_t size );
|
TRACY_API void ___tracy_emit_zone_text( TracyCZoneCtx ctx, const char* txt, size_t size );
|
||||||
void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size_t size );
|
TRACY_API void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size_t size );
|
||||||
|
|
||||||
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
||||||
# define TracyCZone( ctx, active ) static const struct ___tracy_source_location_data TracyConcat(__tracy_source_location,__LINE__) = { NULL, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; TracyCZoneCtx ctx = ___tracy_emit_zone_begin_callstack( &TracyConcat(__tracy_source_location,__LINE__), TRACY_CALLSTACK, active );
|
# define TracyCZone( ctx, active ) static const struct ___tracy_source_location_data TracyConcat(__tracy_source_location,__LINE__) = { NULL, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 }; TracyCZoneCtx ctx = ___tracy_emit_zone_begin_callstack( &TracyConcat(__tracy_source_location,__LINE__), TRACY_CALLSTACK, active );
|
||||||
@ -90,10 +90,10 @@ void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size_t size );
|
|||||||
#define TracyCZoneName( ctx, txt, size ) ___tracy_emit_zone_name( ctx, txt, size );
|
#define TracyCZoneName( ctx, txt, size ) ___tracy_emit_zone_name( ctx, txt, size );
|
||||||
|
|
||||||
|
|
||||||
void ___tracy_emit_memory_alloc( const void* ptr, size_t size );
|
TRACY_API void ___tracy_emit_memory_alloc( const void* ptr, size_t size );
|
||||||
void ___tracy_emit_memory_alloc_callstack( const void* ptr, size_t size, int depth );
|
TRACY_API void ___tracy_emit_memory_alloc_callstack( const void* ptr, size_t size, int depth );
|
||||||
void ___tracy_emit_memory_free( const void* ptr );
|
TRACY_API void ___tracy_emit_memory_free( const void* ptr );
|
||||||
void ___tracy_emit_memory_free_callstack( const void* ptr, int depth );
|
TRACY_API void ___tracy_emit_memory_free_callstack( const void* ptr, int depth );
|
||||||
|
|
||||||
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
#if defined TRACY_HAS_CALLSTACK && defined TRACY_CALLSTACK
|
||||||
# define TracyCAlloc( ptr, size ) ___tracy_emit_memory_alloc_callstack( ptr, size, TRACY_CALLSTACK )
|
# define TracyCAlloc( ptr, size ) ___tracy_emit_memory_alloc_callstack( ptr, size, TRACY_CALLSTACK )
|
||||||
@ -104,10 +104,10 @@ void ___tracy_emit_memory_free_callstack( const void* ptr, int depth );
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void ___tracy_emit_frame_mark( const char* name );
|
TRACY_API void ___tracy_emit_frame_mark( const char* name );
|
||||||
void ___tracy_emit_frame_mark_start( const char* name );
|
TRACY_API void ___tracy_emit_frame_mark_start( const char* name );
|
||||||
void ___tracy_emit_frame_mark_end( const char* name );
|
TRACY_API void ___tracy_emit_frame_mark_end( const char* name );
|
||||||
void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8_t offset, int flip );
|
TRACY_API void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8_t offset, int flip );
|
||||||
|
|
||||||
#define TracyCFrameMark ___tracy_emit_frame_mark( 0 );
|
#define TracyCFrameMark ___tracy_emit_frame_mark( 0 );
|
||||||
#define TracyCFrameMarkNamed( name ) ___tracy_emit_frame_mark( name );
|
#define TracyCFrameMarkNamed( name ) ___tracy_emit_frame_mark( name );
|
||||||
@ -116,12 +116,12 @@ void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8
|
|||||||
#define TracyCFrameImage( image, width, height, offset, flip ) ___tracy_emit_frame_image( image, width, height, offset, flip );
|
#define TracyCFrameImage( image, width, height, offset, flip ) ___tracy_emit_frame_image( image, width, height, offset, flip );
|
||||||
|
|
||||||
|
|
||||||
void ___tracy_emit_plot( const char* name, double val );
|
TRACY_API void ___tracy_emit_plot( const char* name, double val );
|
||||||
void ___tracy_emit_message( const char* txt, size_t size );
|
TRACY_API void ___tracy_emit_message( const char* txt, size_t size );
|
||||||
void ___tracy_emit_messageL( const char* txt );
|
TRACY_API void ___tracy_emit_messageL( const char* txt );
|
||||||
void ___tracy_emit_messageC( const char* txt, size_t size, uint32_t color );
|
TRACY_API void ___tracy_emit_messageC( const char* txt, size_t size, uint32_t color );
|
||||||
void ___tracy_emit_messageLC( const char* txt, uint32_t color );
|
TRACY_API void ___tracy_emit_messageLC( const char* txt, uint32_t color );
|
||||||
void ___tracy_emit_message_appinfo( const char* txt, size_t size );
|
TRACY_API void ___tracy_emit_message_appinfo( const char* txt, size_t size );
|
||||||
|
|
||||||
#define TracyCPlot( name, val ) ___tracy_emit_plot( name, val );
|
#define TracyCPlot( name, val ) ___tracy_emit_plot( name, val );
|
||||||
#define TracyCMessage( txt, size ) ___tracy_emit_message( txt, size );
|
#define TracyCMessage( txt, size ) ___tracy_emit_message( txt, size );
|
||||||
|
@ -2362,7 +2362,7 @@ void Profiler::ProcessSysTime()
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_source_location_data* srcloc, int active )
|
TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_source_location_data* srcloc, int active )
|
||||||
{
|
{
|
||||||
___tracy_c_zone_context ctx;
|
___tracy_c_zone_context ctx;
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
@ -2398,7 +2398,7 @@ TracyCZoneCtx ___tracy_emit_zone_begin( const struct ___tracy_source_location_da
|
|||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___tracy_source_location_data* srcloc, int depth, int active )
|
TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___tracy_source_location_data* srcloc, int depth, int active )
|
||||||
{
|
{
|
||||||
___tracy_c_zone_context ctx;
|
___tracy_c_zone_context ctx;
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
@ -2436,7 +2436,7 @@ TracyCZoneCtx ___tracy_emit_zone_begin_callstack( const struct ___tracy_source_l
|
|||||||
return ctx;
|
return ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ___tracy_emit_zone_end( TracyCZoneCtx ctx )
|
TRACY_API void ___tracy_emit_zone_end( TracyCZoneCtx ctx )
|
||||||
{
|
{
|
||||||
if( !ctx.active ) return;
|
if( !ctx.active ) return;
|
||||||
#ifndef TRACY_NO_VERIFY
|
#ifndef TRACY_NO_VERIFY
|
||||||
@ -2461,7 +2461,7 @@ void ___tracy_emit_zone_end( TracyCZoneCtx ctx )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ___tracy_emit_zone_text( TracyCZoneCtx ctx, const char* txt, size_t size )
|
TRACY_API void ___tracy_emit_zone_text( TracyCZoneCtx ctx, const char* txt, size_t size )
|
||||||
{
|
{
|
||||||
if( !ctx.active ) return;
|
if( !ctx.active ) return;
|
||||||
auto ptr = (char*)tracy::tracy_malloc( size+1 );
|
auto ptr = (char*)tracy::tracy_malloc( size+1 );
|
||||||
@ -2489,7 +2489,7 @@ void ___tracy_emit_zone_text( TracyCZoneCtx ctx, const char* txt, size_t size )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size_t size )
|
TRACY_API void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size_t size )
|
||||||
{
|
{
|
||||||
if( !ctx.active ) return;
|
if( !ctx.active ) return;
|
||||||
auto ptr = (char*)tracy::tracy_malloc( size+1 );
|
auto ptr = (char*)tracy::tracy_malloc( size+1 );
|
||||||
@ -2517,20 +2517,20 @@ void ___tracy_emit_zone_name( TracyCZoneCtx ctx, const char* txt, size_t size )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ___tracy_emit_memory_alloc( const void* ptr, size_t size ) { tracy::Profiler::MemAlloc( ptr, size ); }
|
TRACY_API void ___tracy_emit_memory_alloc( const void* ptr, size_t size ) { tracy::Profiler::MemAlloc( ptr, size ); }
|
||||||
void ___tracy_emit_memory_alloc_callstack( const void* ptr, size_t size, int depth ) { tracy::Profiler::MemAllocCallstack( ptr, size, depth ); }
|
TRACY_API void ___tracy_emit_memory_alloc_callstack( const void* ptr, size_t size, int depth ) { tracy::Profiler::MemAllocCallstack( ptr, size, depth ); }
|
||||||
void ___tracy_emit_memory_free( const void* ptr ) { tracy::Profiler::MemFree( ptr ); }
|
TRACY_API void ___tracy_emit_memory_free( const void* ptr ) { tracy::Profiler::MemFree( ptr ); }
|
||||||
void ___tracy_emit_memory_free_callstack( const void* ptr, int depth ) { tracy::Profiler::MemFreeCallstack( ptr, depth ); }
|
TRACY_API void ___tracy_emit_memory_free_callstack( const void* ptr, int depth ) { tracy::Profiler::MemFreeCallstack( ptr, depth ); }
|
||||||
void ___tracy_emit_frame_mark( const char* name ) { tracy::Profiler::SendFrameMark( name ); }
|
TRACY_API void ___tracy_emit_frame_mark( const char* name ) { tracy::Profiler::SendFrameMark( name ); }
|
||||||
void ___tracy_emit_frame_mark_start( const char* name ) { tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgStart ); }
|
TRACY_API void ___tracy_emit_frame_mark_start( const char* name ) { tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgStart ); }
|
||||||
void ___tracy_emit_frame_mark_end( const char* name ) { tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgEnd ); }
|
TRACY_API void ___tracy_emit_frame_mark_end( const char* name ) { tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgEnd ); }
|
||||||
void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8_t offset, int flip ) { tracy::Profiler::SendFrameImage( image, w, h, offset, flip ); }
|
TRACY_API void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8_t offset, int flip ) { tracy::Profiler::SendFrameImage( image, w, h, offset, flip ); }
|
||||||
void ___tracy_emit_plot( const char* name, double val ) { tracy::Profiler::PlotData( name, val ); }
|
TRACY_API void ___tracy_emit_plot( const char* name, double val ) { tracy::Profiler::PlotData( name, val ); }
|
||||||
void ___tracy_emit_message( const char* txt, size_t size ) { tracy::Profiler::Message( txt, size ); }
|
TRACY_API void ___tracy_emit_message( const char* txt, size_t size ) { tracy::Profiler::Message( txt, size ); }
|
||||||
void ___tracy_emit_messageL( const char* txt ) { tracy::Profiler::Message( txt ); }
|
TRACY_API void ___tracy_emit_messageL( const char* txt ) { tracy::Profiler::Message( txt ); }
|
||||||
void ___tracy_emit_messageC( const char* txt, size_t size, uint32_t color ) { tracy::Profiler::MessageColor( txt, size, color ); }
|
TRACY_API void ___tracy_emit_messageC( const char* txt, size_t size, uint32_t color ) { tracy::Profiler::MessageColor( txt, size, color ); }
|
||||||
void ___tracy_emit_messageLC( const char* txt, uint32_t color ) { tracy::Profiler::MessageColor( txt, color ); }
|
TRACY_API void ___tracy_emit_messageLC( const char* txt, uint32_t color ) { tracy::Profiler::MessageColor( txt, color ); }
|
||||||
void ___tracy_emit_message_appinfo( const char* txt, size_t size ) { tracy::Profiler::MessageAppInfo( txt, size ); }
|
TRACY_API void ___tracy_emit_message_appinfo( const char* txt, size_t size ) { tracy::Profiler::MessageAppInfo( txt, size ); }
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user