-
Notifications
You must be signed in to change notification settings - Fork 645
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
Adding experimental Tracy API for TLS-less event recording. #19625
Conversation
This allows for events from remote threads (remove devices, sandboxes, other tracing APIs, etc) to be plumbed into Tracy during execution. It has a lot of rough edges and there's a list of TODOs required to make Tracy work better with this style of recording.
// required when interoping with non-thread-based event sources (remote devices, | ||
// virtualized processes, threads running in sandboxes, etc). Since support both |
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.
The PR description had a remove
vs remote
typo. I edited it.
This allows for events from remote threads (remove devices, sandboxes, other tracing APIs, etc) to be plumbed into Tracy during execution. It has a lot of rough edges and there's a list of TODOs required to make Tracy work better with this style of recording.
// HACK: tracy doesn't let us at this but we need it in order to create new | ||
// queue contexts. It's an implementation detail we have to take a dependency on | ||
// because tracy does not have an API for what we're doing (yet). | ||
extern tracy::moodycamel::ConcurrentQueue<tracy::QueueItem> tracy::s_queue; |
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.
macos runtime python bindings build failure last night with this: https://github.com/iree-org/iree/actions/runs/12683971137/job/35351915575#step:10:2228
[189/482] Building CXX object runtime/src/iree/base/tracing/CMakeFiles/iree_base_tracing_provider.objects.dir/tracy.cc.o
FAILED: runtime/src/iree/base/tracing/CMakeFiles/iree_base_tracing_provider.objects.dir/tracy.cc.o
/Applications/Xcode_15.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DIREE_TRACING_MODE=2 -DIREE_TRACING_PROVIDER_H=\"iree/base/tracing/tracy.h\" -DTRACY_ENABLE -I/Users/runner/work/iree/iree/c -I/Users/runner/work/iree/iree/c/runtime/build/b/t -I/Users/runner/work/iree/iree/c/runtime/src -I/Users/runner/work/iree/iree/c/runtime/build/b/t/runtime/src -isystem /Users/runner/work/iree/iree/c/third_party/tracy/public -O3 -DNDEBUG -std=gnu++17 -arch arm64 -isysroot /Applications/Xcode_15.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=13.0 -fPIC -fvisibility=hidden -fno-rtti -fno-exceptions -Werror -Wall -Wno-error=deprecated-declarations -Wno-ambiguous-member-template -Wno-char-subscripts -Wno-extern-c-compat -Wno-gnu-alignof-expression -Wno-gnu-variable-sized-type-not-at-end -Wno-ignored-optimization-argument -Wno-invalid-offsetof -Wno-invalid-source-encoding -Wno-mismatched-tags -Wno-pointer-sign -Wno-reserved-user-defined-literal -Wno-return-type-c-linkage -Wno-self-assign-overloaded -Wno-sign-compare -Wno-signed-unsigned-wchar -Wno-strict-overflow -Wno-trigraphs -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-unused-command-line-argument -Wno-unused-const-variable -Wno-unused-function -Wno-unused-local-typedef -Wno-unused-private-field -Wno-user-defined-warnings -Wno-missing-braces -Wctad-maybe-unsupported -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wfor-loop-analysis -Wformat-security -Wgnu-redeclared-enum -Wimplicit-fallthrough -Winfinite-recursion -Wliteral-conversion -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wself-assign -Wstring-conversion -Wtautological-overlap-compare -Wthread-safety -Wthread-safety-beta -Wunused-comparison -Wvla -fno-lax-vector-conversions -fmacro-prefix-map=/Users/runner/work/iree/iree/c=c -flto=full -MD -MT runtime/src/iree/base/tracing/CMakeFiles/iree_base_tracing_provider.objects.dir/tracy.cc.o -MF runtime/src/iree/base/tracing/CMakeFiles/iree_base_tracing_provider.objects.dir/tracy.cc.o.d -o runtime/src/iree/base/tracing/CMakeFiles/iree_base_tracing_provider.objects.dir/tracy.cc.o -c /Users/runner/work/iree/iree/c/runtime/src/iree/base/tracing/tracy.cc
/Users/runner/work/iree/iree/c/runtime/src/iree/base/tracing/tracy.cc:20:68: error: no member named 's_queue' in namespace 'tracy'
extern tracy::moodycamel::ConcurrentQueue<tracy::QueueItem> tracy::s_queue;
~~~~~~~^
presubmit doesn't enable tracing, release python packages do... hmm...
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 allows for events from remote threads (remote devices, sandboxes, other tracing APIs, etc) to be plumbed into Tracy during execution. It has a lot of rough edges and there's a list of TODOs required to make Tracy work better with this style of recording.