Skip to content
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

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

benvanik
Copy link
Collaborator

@benvanik benvanik commented Jan 7, 2025

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.

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.
@benvanik benvanik added the runtime Relating to the IREE runtime library label Jan 7, 2025
@benvanik benvanik requested a review from ScottTodd January 7, 2025 17:43
@benvanik benvanik marked this pull request as ready for review January 7, 2025 19:49
@benvanik benvanik enabled auto-merge (squash) January 7, 2025 19:59
Comment on lines +338 to +339
// required when interoping with non-thread-based event sources (remote devices,
// virtualized processes, threads running in sandboxes, etc). Since support both
Copy link
Member

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.

@benvanik benvanik merged commit fb21dd6 into main Jan 8, 2025
36 checks passed
@benvanik benvanik deleted the users/benvanik/amdgpu-tracing branch January 8, 2025 16:40
// 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;
Copy link
Member

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...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix in #19653, verified with #19668.

ScottTodd added a commit that referenced this pull request Jan 13, 2025
This has been broken since #19625
and is now fixed with #19653.

ci-exactly: runtime_tracing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime Relating to the IREE runtime library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants