Move list of Tracy stack frames to a separate file.

This commit is contained in:
Bartosz Taudul 2020-10-06 14:37:39 +02:00
parent 3b84324259
commit c9b64ef5c5
5 changed files with 44 additions and 18 deletions

View File

@ -122,6 +122,7 @@
<ClCompile Include="..\..\..\server\TracyMouse.cpp" /> <ClCompile Include="..\..\..\server\TracyMouse.cpp" />
<ClCompile Include="..\..\..\server\TracyPrint.cpp" /> <ClCompile Include="..\..\..\server\TracyPrint.cpp" />
<ClCompile Include="..\..\..\server\TracySourceView.cpp" /> <ClCompile Include="..\..\..\server\TracySourceView.cpp" />
<ClCompile Include="..\..\..\server\TracyStackFrames.cpp" />
<ClCompile Include="..\..\..\server\TracyStorage.cpp" /> <ClCompile Include="..\..\..\server\TracyStorage.cpp" />
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp" /> <ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp" />
<ClCompile Include="..\..\..\server\TracyTexture.cpp" /> <ClCompile Include="..\..\..\server\TracyTexture.cpp" />
@ -210,6 +211,7 @@
<ClInclude Include="..\..\..\server\TracySlab.hpp" /> <ClInclude Include="..\..\..\server\TracySlab.hpp" />
<ClInclude Include="..\..\..\server\TracySort.hpp" /> <ClInclude Include="..\..\..\server\TracySort.hpp" />
<ClInclude Include="..\..\..\server\TracySourceView.hpp" /> <ClInclude Include="..\..\..\server\TracySourceView.hpp" />
<ClInclude Include="..\..\..\server\TracyStackFrames.hpp" />
<ClInclude Include="..\..\..\server\TracyStorage.hpp" /> <ClInclude Include="..\..\..\server\TracyStorage.hpp" />
<ClInclude Include="..\..\..\server\TracyStringDiscovery.hpp" /> <ClInclude Include="..\..\..\server\TracyStringDiscovery.hpp" />
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp" /> <ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp" />

View File

@ -210,6 +210,9 @@
<ClCompile Include="..\..\src\HttpRequest.cpp"> <ClCompile Include="..\..\src\HttpRequest.cpp">
<Filter>src</Filter> <Filter>src</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\..\server\TracyStackFrames.cpp">
<Filter>server</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\..\..\common\tracy_lz4.hpp"> <ClInclude Include="..\..\..\common\tracy_lz4.hpp">
@ -509,6 +512,9 @@
<ClInclude Include="..\..\src\HttpRequest.hpp"> <ClInclude Include="..\..\src\HttpRequest.hpp">
<Filter>src</Filter> <Filter>src</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\..\..\server\TracyStackFrames.hpp">
<Filter>server</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Natvis Include="DebugVis.natvis" /> <Natvis Include="DebugVis.natvis" />

View File

@ -0,0 +1,24 @@
#include "TracyStackFrames.hpp"
namespace tracy
{
const char* s_tracyStackFrames[] = {
"tracy::Callstack",
"tracy::Callstack(int)",
"tracy::GpuCtxScope::{ctor}",
"tracy::Profiler::SendCallstack",
"tracy::Profiler::SendCallstack(int)",
"tracy::Profiler::SendCallstack(int, unsigned long)",
"tracy::Profiler::MemAllocCallstack",
"tracy::Profiler::MemAllocCallstack(void const*, unsigned long, int)",
"tracy::Profiler::MemFreeCallstack",
"tracy::Profiler::MemFreeCallstack(void const*, int)",
"tracy::ScopedZone::{ctor}",
"tracy::ScopedZone::ScopedZone(tracy::SourceLocationData const*, int, bool)",
"tracy::CallTrace",
"tracy::Profiler::Message",
nullptr
};
}

View File

@ -0,0 +1,11 @@
#ifndef __TRACYSTACKFRAMES_HPP__
#define __TRACYSTACKFRAMES_HPP__
namespace tracy
{
const char* s_tracyStackFrames[];
}
#endif

View File

@ -36,6 +36,7 @@
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracySort.hpp" #include "TracySort.hpp"
#include "TracySourceView.hpp" #include "TracySourceView.hpp"
#include "TracyStackFrames.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
#include "../imgui/imgui_internal.h" #include "../imgui/imgui_internal.h"
@ -55,24 +56,6 @@ namespace tracy
static double s_time = 0; static double s_time = 0;
constexpr const char* s_tracyStackFrames[] = {
"tracy::Callstack",
"tracy::Callstack(int)",
"tracy::GpuCtxScope::{ctor}",
"tracy::Profiler::SendCallstack",
"tracy::Profiler::SendCallstack(int)",
"tracy::Profiler::SendCallstack(int, unsigned long)",
"tracy::Profiler::MemAllocCallstack",
"tracy::Profiler::MemAllocCallstack(void const*, unsigned long, int)",
"tracy::Profiler::MemFreeCallstack",
"tracy::Profiler::MemFreeCallstack(void const*, int)",
"tracy::ScopedZone::{ctor}",
"tracy::ScopedZone::ScopedZone(tracy::SourceLocationData const*, int, bool)",
"tracy::CallTrace",
"tracy::Profiler::Message",
nullptr
};
constexpr const char* GpuContextNames[] = { constexpr const char* GpuContextNames[] = {
"Invalid", "Invalid",
"OpenGL", "OpenGL",