-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[Draft] Resolution of symbols by the server #1009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 25 commits
3853354
8a9e92a
286ebd2
7ef3fe3
e8e60d4
ce22a0e
1444ad3
2a74e0c
901e826
361618b
e51f755
595188e
8762675
49880f9
140a33d
43faca0
3f9e2a9
24bb230
b185d37
c6f8487
676ed7a
62f0f59
2992339
b0fb501
073df4e
c22db64
4135d4c
11cd637
adeff0a
3a53e18
ace2660
22e62a3
c29c45d
e0d0380
2b3c00d
c8b9d70
d2245a9
25a3d4f
9374713
2b6bb9f
b8f37d9
d4eabd9
6a707bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ namespace tracy | |
| double s_time = 0; | ||
|
|
||
| View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char* addr, uint16_t port, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config, AchievementsMgr* amgr ) | ||
| : m_worker( addr, port, config.memoryLimit == 0 ? -1 : ( config.memoryLimitPercent * tracy::GetPhysicalMemorySize() / 100 ) ) | ||
| : m_worker( addr, port, config.memoryLimit == 0 ? -1 : ( config.memoryLimitPercent * tracy::GetPhysicalMemorySize() / 100 ), Worker::SymbolResolutionConfig{ config.symbolsAttemptResolutionByServer, config.symbolsPreventResolutionByClient } ) | ||
|
||
| , m_staticView( false ) | ||
| , m_viewMode( ViewMode::LastFrames ) | ||
| , m_viewModeHeuristicTry( true ) | ||
|
|
@@ -66,10 +66,11 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char* | |
| { | ||
| InitTextEditor(); | ||
| SetupConfig( config ); | ||
|
|
||
| } | ||
|
|
||
| View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f, ImFont* fixedWidth, ImFont* smallFont, ImFont* bigFont, SetTitleCallback stcb, SetScaleCallback sscb, AttentionCallback acb, const Config& config, AchievementsMgr* amgr ) | ||
| : m_worker( f ) | ||
| : m_worker( f, { config.symbolsAttemptResolutionByServer, config.symbolsPreventResolutionByClient }, EventType::All, true, false ) | ||
| , m_filename( f.GetFilename() ) | ||
| , m_staticView( true ) | ||
| , m_viewMode( ViewMode::Paused ) | ||
|
|
@@ -912,6 +913,18 @@ bool View::DrawImpl() | |
| ImGui::SameLine(); | ||
| ToggleButton( ICON_FA_FINGERPRINT " Info", m_showInfo ); | ||
| ImGui::SameLine(); | ||
|
|
||
| if( m_filename.empty() ) // Can't modify when loading from file | ||
| { | ||
| ImGui::SameLine(); | ||
| if (ImGui::Button( ICON_FA_USER_SECRET " Resolve Symbols")) | ||
| { | ||
| // TODO: Make it async ? | ||
| m_worker.ResolveSymbolLocally(); | ||
| } | ||
|
|
||
| } | ||
|
|
||
| if( ImGui::Button( ICON_FA_SCREWDRIVER_WRENCH ) ) ImGui::OpenPopup( "ToolsPopup" ); | ||
| if( ImGui::BeginPopup( "ToolsPopup" ) ) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ | |
|
|
||
| #include "common/tracy_lz4.cpp" | ||
| #include "client/TracyProfiler.cpp" | ||
| #include "client/TracyCallstack.cpp" | ||
| #include "common/TracyCallstack.cpp" | ||
| #include "client/TracySysPower.cpp" | ||
| #include "client/TracySysTime.cpp" | ||
| #include "client/TracySysTrace.cpp" | ||
|
|
@@ -32,27 +32,8 @@ | |
| #include "client/TracyOverride.cpp" | ||
| #include "client/TracyKCore.cpp" | ||
|
|
||
| #if defined(TRACY_HAS_CALLSTACK) | ||
| # if TRACY_HAS_CALLSTACK == 2 || TRACY_HAS_CALLSTACK == 3 || TRACY_HAS_CALLSTACK == 4 || TRACY_HAS_CALLSTACK == 6 | ||
| # include "libbacktrace/alloc.cpp" | ||
| # include "libbacktrace/dwarf.cpp" | ||
| # include "libbacktrace/fileline.cpp" | ||
| # include "libbacktrace/mmapio.cpp" | ||
| # include "libbacktrace/posix.cpp" | ||
| # include "libbacktrace/sort.cpp" | ||
| # include "libbacktrace/state.cpp" | ||
| # if TRACY_HAS_CALLSTACK == 4 | ||
| # include "libbacktrace/macho.cpp" | ||
| # else | ||
| # include "libbacktrace/elf.cpp" | ||
| # endif | ||
| # include "common/TracyStackFrames.cpp" | ||
| # endif | ||
| #endif | ||
|
|
||
| #ifdef _MSC_VER | ||
| # pragma comment(lib, "ws2_32.lib") | ||
| # pragma comment(lib, "dbghelp.lib") | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How are all these removals handled now? They are still needed, aren't they?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, they are still handled. Since TracyCallstack.cpp is now shared between the client and server, the server also requires symbol-related dependencies. Therefore, all of those have been centralized in TracyCallstack.cpp. |
||
| # pragma comment(lib, "advapi32.lib") | ||
| # pragma comment(lib, "user32.lib") | ||
| # pragma warning(pop) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for setting this explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the capture tool, this is a kind of reminder to later add something to control this settings, most likely through a commandline option.
For the importers and the update tool, symbol resolution by the worker is not currently supported (but ultimately, it should be merged with offline resolution and supported), so we explicitely mark it disabled. (In case default settings are ever changed).