- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Resolution of symbols by the server #1009
base: master
Are you sure you want to change the base?
Resolution of symbols by the server #1009
Conversation
How does the server-side symbol resolution work? Let's say I'm running the server on Linux and the client is a Windows application. |
For now it will simply fallback to querying the client for the symbols. The idea for the first step is to only allow to resolve symbols on the server when the client has a similar executable format (ELF, Macho, PE with pdb). Which means mostly windows ciuld resolve windows, Linux can resolve Linux+Android+... And Macos could resolve macos/ios. In the future however, I'd like to make it possible to resolve GNU binaries (first elf, macho, perhaps later PE files with mingw) using a windows server too. (The other way is harder since it would require something to replace DbgHelp) |
I also just saw that the CI build is failing, seemingly due to the enum using an underlying type. (weirdly we didn't get this while building on our private CI, probably missed some executable that does not enable c++11) I'll fix this tomorrow at work, but would like to check with you what the minimal supported version of C++ we should be using (ie: should we not use such enums or should we fix the projects to target c++11?) Edit: actually after reading the error log again, it could just be that were missing the |
@@ -1157,7 +1157,8 @@ void SourceView::RenderSymbolView( Worker& worker, View& view ) | |||
|
|||
const auto shortenName = view.GetShortenName(); | |||
auto sym = worker.GetSymbolData( m_symAddr ); | |||
assert( sym ); | |||
if( sym == nullptr ) return; // Might no have received symbol info yet |
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.
User should be informed why there is nothing displayed.
@@ -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 } ) |
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.
It feels that the data structure being created here should just accept the config and extract what it needs on its own.
tracy::Worker worker( address, port, memoryLimit ); | ||
|
||
tracy::Worker::SymbolResolutionConfig symConfig{}; | ||
symConfig.m_attemptResolutionByWorker = false; |
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?
@@ -13,7 +13,7 @@ | |||
#endif | |||
|
|||
#ifndef TracyLine | |||
# define TracyLine __LINE__ | |||
# define TracyLine TracyConcat(__LINE__,U) // MSVC Edit and continue __LINE__ is non-constant. See https://developercommunity.visualstudio.com/t/-line-cannot-be-used-as-an-argument-for-constexpr/195665 |
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 does this do?
#ifdef _MSC_VER | ||
# pragma comment(lib, "ws2_32.lib") | ||
# pragma comment(lib, "dbghelp.lib") |
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.
How are all these removals handled now? They are still needed, aren't they?
The main features in this pull request is to make the server be able to locally resolve the symbol and serialize them in trace file.
For this the client sends his image data to the server.
Why this can be a improvement
Implementation details
common
folder).Areas of improvements/TODO list
update
program) should use the same mechanism.The main idea for this feature is to make Tracy more flexible, especially when you can't or don't want the application make the symbol resolution job.