-
-
Notifications
You must be signed in to change notification settings - Fork 907
[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?
[Draft] 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 |
profiler/src/profiler/TracyView.cpp
Outdated
|
|
||
| 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.
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.
static inline const Worker::SymbolResolutionConfig SymbolResolutionConfigFromConfig( const Config& config ) { return { config.symbolsAttemptResolutionByServer, config.symbolsPreventResolutionByClient }; }
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 ), SymbolResolutionConfigFromConfig(config))To parse Config in the Tracy view, we add a function in Traview.hpp to avoid including Config in the worker files.
use of 2 SPSCQueue one for Woker->WorkerSymbolRes and another for WorkerSymbolRes->Worker, To Do use some fix amout of CallstackEntry array raither to give each CallstackEntryData an array of CallstackEntry (like frame in flight with vulkan).
This reverts commit e0d0380.
…lution # Conflicts: # .gitignore # profiler/src/main.cpp # profiler/src/profiler/TracyConfig.hpp # profiler/src/profiler/TracySourceView.cpp # profiler/src/profiler/TracyView.cpp # public/client/TracyCallstack.cpp # public/common/TracyProtocol.hpp # public/common/TracyVersion.hpp
…mbol-resolution # Conflicts: # server/TracyWorker.cpp
… when we have Pdb files)
# Conflicts: # public/TracyClient.cpp # public/common/TracyQueue.hpp # public/common/TracyVersion.hpp
|
Is there a plan to support caching of source files from symbols that contain source-control information? In the latest version of Tracy, I see source files cached from symbols that I've generated locally, but not from those that come from a symbol store. So, I have to rely on source location substitutions for these files, which may not always be an accurate representation of the source control version.
|
Yes, the plan is to be able to offload as much work as possible for offline resolution (as in, we would still keep current behavior for those who need it, but also allow further offline processing. And for those who want full offline resolution, they could). But I'd like to finish the symbols part before tackling source/binaries. Once we have the debug symbols information we can then query not only symbols but also source files or even binaries themselves. |
…size to be able to resolve symbols offline
|
@wolfpld would you like us to split this PR into smaller chunks? It could me reviewing easier |
|
It would probably be helpful. |
|
I'm turning this PR into a draft as I will be submitting smaller PRs that split the review work |
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
commonfolder).Areas of improvements/TODO list
updateprogram) 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.