-
Notifications
You must be signed in to change notification settings - Fork 283
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
build: tracy integration #3253
build: tracy integration #3253
Conversation
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.
I tried to follow the instructions, and it didn't work
git clone https://github.com/wolfpld/tracy.git
cd tracy
make -j 10 -C profiler/build/unix LEGACY=1 release
<...> Some arcane errors related to freetype
After some digging through tracy docs, it turned out I needed to install additional libraries first, and freetype had nothing to do with the issue.
Now that it compiled, I run tracy executable, click "connect", run the game and... nothing happens? Or am i supposed to do something else?
Also, doesn't it need source code modifications to work, or is there some way to collect samples without it (maybe at the cost of precision)?
CMakeLists.txt
Outdated
FetchContent_Declare( | ||
tracy | ||
GIT_REPOSITORY https://github.com/wolfpld/tracy.git | ||
GIT_TAG master |
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.
This needs to be a fixed release, e.g. https://github.com/wolfpld/tracy/releases/tag/v0.10
- According to their docs, it's best to use same version on both client and server, and you wouldn't want to recompile the server each time CMake re-fetches the dependencies
- There are no precompiled Windows binaries for master branch, and master is incompatible with latest 0.10 release
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.
there's an issue in linux; release build on v0.10 tend to fail with weird LTO errors and debug build is very slow. while it can be patched it's not ergonomic.
lto-wrapper: warning: using serial compilation of 79 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
mold: error: undefined symbol: tracy::IsaList
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans9.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))
mold: error: undefined symbol: tracy::MicroArchitectureNum
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans16.ltrans.o:(tracy::View::DrawImpl())>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans16.ltrans.o:(tracy::View::DrawImpl())>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans8.ltrans.o:(tracy::SourceView::RenderSymbolAsmView(tracy::SourceView::AddrStatData const&, tracy::Worker&, tracy::View&))>>> referenced 1 more times
mold: error: undefined symbol: tracy::MicroArchitectureData
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans9.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))
mold: error: undefined symbol: tracy::PortList
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans9.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))
mold: error: undefined symbol: tracy::MicroArchitectureList
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans16.ltrans.o:(tracy::View::DrawImpl())>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans16.ltrans.o:(tracy::View::DrawImpl())>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans8.ltrans.o:(tracy::SourceView::RenderSymbolAsmView(tracy::SourceView::AddrStatData const&, tracy::Worker&, tracy::View&))>>> referenced 1 more times
mold: error: undefined symbol: tracy::OpsList
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans7.ltrans.o:(tracy::SourceView::SourceView())
mold: error: undefined symbol: tracy::OpDescList
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans9.ltrans.o:(tracy::SourceView::RenderAsmLine(tracy::SourceView::AsmLine&, tracy::SourceView::AddrStat const&, tracy::SourceView::AddrStatData const&, tracy::Worker&, unsigned long&, int, int, tracy::View&))
mold: error: undefined symbol: tracy::OpsNum
>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans7.ltrans.o:(tracy::SourceView::SourceView())>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans7.ltrans.o:(tracy::SourceView::SourceView())>>> referenced by <artificial>
>>> /tmp/ccc7pN6R.ltrans7.ltrans.o:(tracy::SourceView::SourceView())
collect2: error: ld returned 1 exit status
make[1]: *** [../../../common/unix.mk:74: Tracy-release] 오류 1
make[1]: 디렉터리 '/home/scarf/opt/tracy/profiler/build/unix' 나감make: *** [Makefile:11: release] 오류 2
make: 디렉터리 '/home/scarf/opt/tracy/profiler/build/unix' 나감
also this error wolfpld/tracy#765 is only fixed in very recent master. maybe we should conditionally link against v0.10
for windows and recent master commit for linux?
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.
workaround applied in 97517da
(#3253).
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.
Oof.
maybe we should conditionally link against v0.10 for windows and recent master commit for linux?
Yeah, sounds reasonable. Maybe note it in documentation somewhere, in case people would like to check out exact same version when they build tracy server from source on linux.
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.
updated docs with relevant info in ac291f1
(#3253).
Co-authored-by: Olanti <olanti-p@yandex.ru>
Co-authored-by: Olanti <olanti-p@yandex.ru>
Co-authored-by: Olanti <olanti-p@yandex.ru>
see: https://github.com/cataclysmbnteam/Cataclysm-BN/pull/3253/files?w=1#r1545267113 Co-authored-by: olanti-p <olanti-p@yandex.ru>
Summary
SUMMARY: Build "CMake integration for tracy"
Purpose of change
add an easy way to sample and profile BN executable by using tracy
Describe the solution
Describe alternatives you've considered
using other profilers, but they all seem to be either
must have to alter source code to insert symbolsAdditional context