mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Reduce the amount of macros, add docs
This commit is contained in:
parent
076e83635b
commit
dab0b34303
31
Tracy.hpp
31
Tracy.hpp
@ -40,10 +40,10 @@
|
|||||||
#define TracyAlloc(x,y)
|
#define TracyAlloc(x,y)
|
||||||
#define TracyFree(x)
|
#define TracyFree(x)
|
||||||
|
|
||||||
#define ZoneNamedS(x,y)
|
#define ZoneNamedS(x,y,z)
|
||||||
#define ZoneNamedNS(x,y,z)
|
#define ZoneNamedNS(x,y,z,w)
|
||||||
#define ZoneNamedCS(x,y,z)
|
#define ZoneNamedCS(x,y,z,w)
|
||||||
#define ZoneNamedNCS(x,y,z,w)
|
#define ZoneNamedNCS(x,y,z,w,a)
|
||||||
|
|
||||||
#define ZoneScopedS(x)
|
#define ZoneScopedS(x)
|
||||||
#define ZoneScopedNS(x,y)
|
#define ZoneScopedNS(x,y)
|
||||||
@ -69,11 +69,6 @@
|
|||||||
#define ZoneScopedC( color ) ZoneNamedC( ___tracy_scoped_zone, color, true )
|
#define ZoneScopedC( color ) ZoneNamedC( ___tracy_scoped_zone, color, true )
|
||||||
#define ZoneScopedNC( name, color ) ZoneNamedNC( ___tracy_scoped_zone, name, color, true )
|
#define ZoneScopedNC( name, color ) ZoneNamedNC( ___tracy_scoped_zone, name, color, true )
|
||||||
|
|
||||||
#define ZoneScopedA( active ) ZoneNamed( ___tracy_scoped_zone, active )
|
|
||||||
#define ZoneScopedNA( name, active ) ZoneNamedN( ___tracy_scoped_zone, name, active )
|
|
||||||
#define ZoneScopedCA( color, active ) ZoneNamedC( ___tracy_scoped_zone, color, active )
|
|
||||||
#define ZoneScopedNCA( name, color, active ) ZoneNamedNC( ___tracy_scoped_zone, name, color, active )
|
|
||||||
|
|
||||||
#define ZoneText( txt, size ) ___tracy_scoped_zone.Text( txt, size );
|
#define ZoneText( txt, size ) ___tracy_scoped_zone.Text( txt, size );
|
||||||
#define ZoneName( txt, size ) ___tracy_scoped_zone.Name( txt, size );
|
#define ZoneName( txt, size ) ___tracy_scoped_zone.Name( txt, size );
|
||||||
|
|
||||||
@ -109,11 +104,6 @@
|
|||||||
# define ZoneScopedCS( color, depth ) ZoneNamedCS( ___tracy_scoped_zone, color, depth, true )
|
# define ZoneScopedCS( color, depth ) ZoneNamedCS( ___tracy_scoped_zone, color, depth, true )
|
||||||
# define ZoneScopedNCS( name, color, depth ) ZoneNamedNCS( ___tracy_scoped_zone, name, color depth, true )
|
# define ZoneScopedNCS( name, color, depth ) ZoneNamedNCS( ___tracy_scoped_zone, name, color depth, true )
|
||||||
|
|
||||||
# define ZoneScopedSA( depth, active ) ZoneNamedS( ___tracy_scoped_zone, depth, active )
|
|
||||||
# define ZoneScopedNSA( name, depth, active ) ZoneNamedNS( ___tracy_scoped_zone, name, depth, active )
|
|
||||||
# define ZoneScopedCSA( color, depth, active ) ZoneNamedCS( ___tracy_scoped_zone, color, depth, active )
|
|
||||||
# define ZoneScopedNCSA( name, color, depth, active ) ZoneNamedNCS( ___tracy_scoped_zone, name, color depth, active )
|
|
||||||
|
|
||||||
# define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth );
|
# define TracyAllocS( ptr, size, depth ) tracy::Profiler::MemAllocCallstack( ptr, size, depth );
|
||||||
# define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth );
|
# define TracyFreeS( ptr, depth ) tracy::Profiler::MemFreeCallstack( ptr, depth );
|
||||||
#else
|
#else
|
||||||
@ -122,15 +112,10 @@
|
|||||||
# define ZoneNamedCS( varname, color, depth, active ) ZoneNamedC( varname, color, active )
|
# define ZoneNamedCS( varname, color, depth, active ) ZoneNamedC( varname, color, active )
|
||||||
# define ZoneNamedNCS( varname, name, color, depth, active ) ZoneNamedNC( varname, name, color, active )
|
# define ZoneNamedNCS( varname, name, color, depth, active ) ZoneNamedNC( varname, name, color, active )
|
||||||
|
|
||||||
# define ZoneScopedS( depth ) ZoneScoped( depth, true )
|
# define ZoneScopedS( depth ) ZoneScoped
|
||||||
# define ZoneScopedNS( name, depth ) ZoneScopedN( name, true )
|
# define ZoneScopedNS( name, depth ) ZoneScopedN( name )
|
||||||
# define ZoneScopedCS( color, depth ) ZoneScopedC( color, true )
|
# define ZoneScopedCS( color, depth ) ZoneScopedC( color )
|
||||||
# define ZoneScopedNCS( name, color, depth ) ZoneScopedNC( name, color, true )
|
# define ZoneScopedNCS( name, color, depth ) ZoneScopedNC( name, color )
|
||||||
|
|
||||||
# define ZoneScopedSA( depth, active ) ZoneScoped( depth, active )
|
|
||||||
# define ZoneScopedNSA( name, depth, active ) ZoneScopedN( name, active )
|
|
||||||
# define ZoneScopedCSA( color, depth, active ) ZoneScopedC( color, active )
|
|
||||||
# define ZoneScopedNCSA( name, color, depth, active ) ZoneScopedNC( name, color, active )
|
|
||||||
|
|
||||||
# define TracyAllocS( ptr, size, depth ) TracyAlloc( ptr, size )
|
# define TracyAllocS( ptr, size, depth ) TracyAlloc( ptr, size )
|
||||||
# define TracyFreeS( ptr, depth ) TracyFree( ptr )
|
# define TracyFreeS( ptr, depth ) TracyFree( ptr )
|
||||||
|
@ -299,6 +299,10 @@ Tracy is able to capture and draw numeric value changes over time. You may use i
|
|||||||
|
|
||||||
Fast navigation in large data sets and correlation of zones with what was happening in application may be difficult. To ease these issues Tracy provides a message log functionality. You can send messages (for example, your typical debug output) using the \texttt{TracyMessage(text, size)} macro. Alternatively, use \texttt{TracyMessageL(text)} for string literal messages.
|
Fast navigation in large data sets and correlation of zones with what was happening in application may be difficult. To ease these issues Tracy provides a message log functionality. You can send messages (for example, your typical debug output) using the \texttt{TracyMessage(text, size)} macro. Alternatively, use \texttt{TracyMessageL(text)} for string literal messages.
|
||||||
|
|
||||||
|
\subsection{Zone filtering}
|
||||||
|
|
||||||
|
Zone logging can be disabled on a per zone basis, by making use of the \texttt{ZoneNamed} macros. Each of the macros takes an \texttt{active} argument, which will determine whether the zone should be logged.
|
||||||
|
|
||||||
\subsection{Memory profiling}
|
\subsection{Memory profiling}
|
||||||
|
|
||||||
Tracy can monitor memory usage of your application. Knowledge about each performed memory allocation enables the following:
|
Tracy can monitor memory usage of your application. Knowledge about each performed memory allocation enables the following:
|
||||||
|
Loading…
Reference in New Issue
Block a user