diff --git a/.gitignore b/.gitignore index 7e6ad04b..64c29920 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,8 @@ manual/t*.bbl manual/t*.blg profiler/build/win32/packages profiler/build/win32/Tracy.aps - # include the vcpkg install script but not the files it produces vcpkg/* !vcpkg/install_vcpkg_dependencies.bat +.deps/ +.dirstamp diff --git a/Tracy.hpp b/Tracy.hpp index 7d3d1f10..7636578e 100644 --- a/Tracy.hpp +++ b/Tracy.hpp @@ -17,8 +17,11 @@ #define ZoneScopedNC(x,y) #define ZoneText(x,y) +#define ZoneTextV(x,y,z) #define ZoneName(x,y) +#define ZoneNameV(x,y,z) #define ZoneValue(x) +#define ZoneValueV(x,y) #define FrameMark #define FrameMarkNamed(x) @@ -93,8 +96,11 @@ #define ZoneScopedNC( name, color ) ZoneNamedNC( ___tracy_scoped_zone, name, color, true ) #define ZoneText( txt, size ) ___tracy_scoped_zone.Text( txt, size ); +#define ZoneTextV( varname, txt, size ) varname.Text( txt, size ); #define ZoneName( txt, size ) ___tracy_scoped_zone.Name( txt, size ); +#define ZoneNameV( varname, txt, size ) varname.Name( txt, size ); #define ZoneValue( value ) ___tracy_scoped_zone.Value( value ); +#define ZoneValueV( varname, value ) varname.Value( value ); #define FrameMark tracy::Profiler::SendFrameMark( nullptr ); #define FrameMarkNamed( name ) tracy::Profiler::SendFrameMark( name ); diff --git a/manual/tracy.tex b/manual/tracy.tex index c395f23e..67fd577b 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -939,7 +939,7 @@ If you want to set zone name on a per-call basis, you may do so using the \textt Using the \texttt{ZoneScoped} family of macros creates a stack variable named \texttt{\_\_\_tracy\_scoped\_zone}. If you want to measure more than one zone in the same scope, you will need to use the \texttt{ZoneNamed} macros, which require that you provide a name for the created variable. For example, instead of \texttt{ZoneScopedN("Zone name")}, you would use \texttt{ZoneNamedN(variableName, "Zone name", true)}\footnote{The last parameter is explained in section~\ref{filteringzones}.}. -The \texttt{ZoneText}, \texttt{ZoneValue} and \texttt{ZoneName} macros work only for the zones created using the \texttt{ZoneScoped} macros. For the \texttt{ZoneNamed} macros, you will need to invoke the methods \texttt{Text}, \texttt{Value} or \texttt{Name} of the variable you have created. +The \texttt{ZoneText}, \texttt{ZoneValue} and \texttt{ZoneName} macros apply to the zones created using the \texttt{ZoneScoped} macros. For zones created using the \texttt{ZoneNamed} macros, you can use the \texttt{ZoneTextV(variableName, text, size)}, \texttt{ZoneValueV(variableName, uint64\_t)}, or \texttt{ZoneNameV(variableName, text, size)} macros, or invoke the methods \texttt{Text}, \texttt{Value} or \texttt{Name} directly on the variable you have created. \begin{bclogo}[ noborder=true,