Update Tracy to eeffb6d2 (2022-08-02) (#9991)

diff --git a/build_tools/buildkite/cmake/android/arm64-v8a/benchmark2.yml b/build_tools/buildkite/cmake/android/arm64-v8a/benchmark2.yml
index 6fff100..1debddb 100644
--- a/build_tools/buildkite/cmake/android/arm64-v8a/benchmark2.yml
+++ b/build_tools/buildkite/cmake/android/arm64-v8a/benchmark2.yml
@@ -30,10 +30,10 @@
       - "git clean -fdx"
       - "buildkite-agent artifact download --step Build benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz ./"
       - "buildkite-agent artifact download --step Build iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz ./"
-      - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-80f6a93d.tgz"
+      - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-eeffb6d2.tgz"
       - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
       - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
-      - "tar -xzvf tracy-capture-80f6a93d.tgz"
+      - "tar -xzvf tracy-capture-eeffb6d2.tgz"
       - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --pin-gpu-freq --normal_benchmark_tool_dir=build-android/tools/ --traced_benchmark_tool_dir=build-android-trace/tools/ --trace_capture_tool=tracy-capture -o benchmark-results-pixel-4-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-pixel-4-${BUILDKITE_BUILD_NUMBER}.tgz --driver_filter_regex='(?!vulkan).*' --verbose build-host/"
     if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')"
     agents:
@@ -50,10 +50,10 @@
       - "git clean -fdx"
       - "buildkite-agent artifact download --step Build benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz ./"
       - "buildkite-agent artifact download --step Build iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz ./"
-      - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-80f6a93d.tgz"
+      - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-eeffb6d2.tgz"
       - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
       - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
-      - "tar -xzvf tracy-capture-80f6a93d.tgz"
+      - "tar -xzvf tracy-capture-eeffb6d2.tgz"
       - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --pin-gpu-freq --normal_benchmark_tool_dir=build-android/tools/ --traced_benchmark_tool_dir=build-android-trace/tools/ --trace_capture_tool=tracy-capture -o benchmark-results-pixel6-pro-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-pixel6-pro-${BUILDKITE_BUILD_NUMBER}.tgz --verbose build-host/"
     if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')"
     agents:
@@ -70,10 +70,10 @@
       - "git clean -fdx"
       - "buildkite-agent artifact download --step Build benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz ./"
       - "buildkite-agent artifact download --step Build iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz ./"
-      - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-80f6a93d.tgz"
+      - "wget https://storage.googleapis.com/iree-shared-files/tracy-capture-eeffb6d2.tgz"
       - "tar -xzvf benchmark-suites-${BUILDKITE_BUILD_NUMBER}.tgz"
       - "tar -xzvf iree-android-tools-${BUILDKITE_BUILD_NUMBER}.tgz"
-      - "tar -xzvf tracy-capture-80f6a93d.tgz"
+      - "tar -xzvf tracy-capture-eeffb6d2.tgz"
       - "python3 build_tools/benchmarks/run_benchmarks_on_android.py --pin-cpu-freq --pin-gpu-freq --normal_benchmark_tool_dir=build-android/tools/ --traced_benchmark_tool_dir=build-android-trace/tools/ --trace_capture_tool=tracy-capture -o benchmark-results-moto-edge-x30-${BUILDKITE_BUILD_NUMBER}.json --capture_tarball=trace-captures-moto-edge-x30-${BUILDKITE_BUILD_NUMBER}.tgz --driver_filter_regex='vulkan' --verbose build-host/"
     if: "build.pull_request.id == null || (build.pull_request.labels includes 'buildkite:benchmark')"
     agents:
diff --git a/build_tools/third_party/tracy/CMakeLists.txt b/build_tools/third_party/tracy/CMakeLists.txt
index 22700f1..fd9fbaa 100644
--- a/build_tools/third_party/tracy/CMakeLists.txt
+++ b/build_tools/third_party/tracy/CMakeLists.txt
@@ -115,7 +115,7 @@
 # Common library
 #-------------------------------------------------------------------------------
 
-file(GLOB COMMON_SRCS ${TRACY_SOURCE_DIR}/common/*.cpp)
+file(GLOB COMMON_SRCS ${TRACY_SOURCE_DIR}/public/common/*.cpp)
 add_library(IREETracyCommon
   ${COMMON_SRCS}
 )
@@ -139,11 +139,14 @@
 # IMGUI library
 #-------------------------------------------------------------------------------
 
-file(GLOB IMGUI_SOURCES ${TRACY_SOURCE_DIR}/imgui/*.cpp)
+file(GLOB IMGUI_SOURCES
+  ${TRACY_SOURCE_DIR}/imgui/*.cpp
+  ${TRACY_SOURCE_DIR}/profiler/src/imgui/*.cpp
+)
 add_library(IREETracyIMGUI
   ${IMGUI_SOURCES}
 )
-setup_cxx_options(IREETracyServer)
+setup_cxx_options(IREETracyIMGUI)
 
 #-------------------------------------------------------------------------------
 # Standalone capture server
diff --git a/runtime/src/iree/base/CMakeLists.txt b/runtime/src/iree/base/CMakeLists.txt
index 3a9d1ca..041312f 100644
--- a/runtime/src/iree/base/CMakeLists.txt
+++ b/runtime/src/iree/base/CMakeLists.txt
@@ -184,8 +184,8 @@
       tracing
     HDRS
       "tracing.h"
-      "${IREE_ROOT_DIR}/third_party/tracy/Tracy.hpp"
-      "${IREE_ROOT_DIR}/third_party/tracy/TracyC.h"
+      "${IREE_ROOT_DIR}/third_party/tracy/public/tracy/Tracy.hpp"
+      "${IREE_ROOT_DIR}/third_party/tracy/public/tracy/TracyC.h"
     SRCS
       "tracing.cc"
     DEPS
diff --git a/runtime/src/iree/base/tracing.cc b/runtime/src/iree/base/tracing.cc
index 2469f19..22ca956 100644
--- a/runtime/src/iree/base/tracing.cc
+++ b/runtime/src/iree/base/tracing.cc
@@ -12,7 +12,7 @@
 // We do this here instead of relying on an external build target so that we can
 // ensure our configuration specified in tracing.h is picked up.
 #if IREE_TRACING_FEATURES != 0
-#include "third_party/tracy/TracyClient.cpp"
+#include "third_party/tracy/public/TracyClient.cpp"
 #endif  // IREE_TRACING_FEATURES
 
 #ifdef __cplusplus
@@ -125,7 +125,8 @@
 void iree_tracing_set_plot_type_impl(const char* name_literal,
                                      uint8_t plot_type) {
   tracy::Profiler::ConfigurePlot(name_literal,
-                                 static_cast<tracy::PlotFormatType>(plot_type));
+                                 static_cast<tracy::PlotFormatType>(plot_type),
+                                 false, true, 0);
 }
 
 void iree_tracing_plot_value_i64_impl(const char* name_literal, int64_t value) {
@@ -192,7 +193,7 @@
 void iree_tracing_mutex_after_unlock(uint32_t lock_id) {
   auto item = tracy::Profiler::QueueSerial();
   tracy::MemWrite(&item->hdr.type, tracy::QueueType::LockRelease);
-  tracy::MemWrite(&item->lockRelease.thread, tracy::GetThreadHandle());
+  tracy::MemWrite(&item->lockReleaseShared.thread, tracy::GetThreadHandle());
   tracy::MemWrite(&item->lockRelease.id, lock_id);
   tracy::MemWrite(&item->lockRelease.time, tracy::Profiler::GetTime());
   tracy::Profiler::QueueSerialFinish();
diff --git a/runtime/src/iree/base/tracing.h b/runtime/src/iree/base/tracing.h
index 222df5b..60a396d 100644
--- a/runtime/src/iree/base/tracing.h
+++ b/runtime/src/iree/base/tracing.h
@@ -181,7 +181,7 @@
 // Flush the settings we have so far; settings after this point will be
 // overriding values set by Tracy itself.
 #if defined(TRACY_ENABLE)
-#include "third_party/tracy/TracyC.h"  // IWYU pragma: export
+#include "third_party/tracy/public/tracy/TracyC.h"  // IWYU pragma: export
 #endif
 
 // Disable callstack capture if our depth is 0; this allows us to avoid any
@@ -503,7 +503,7 @@
 #ifdef __cplusplus
 
 #if defined(TRACY_ENABLE)
-#include "third_party/tracy/Tracy.hpp"  // IWYU pragma: export
+#include "third_party/tracy/public/tracy/Tracy.hpp"  // IWYU pragma: export
 #endif
 
 #if IREE_TRACING_FEATURES & IREE_TRACING_FEATURE_INSTRUMENTATION
diff --git a/runtime/src/iree/hal/drivers/vulkan/tracing.cc b/runtime/src/iree/hal/drivers/vulkan/tracing.cc
index 4b63095..6e14a2b 100644
--- a/runtime/src/iree/hal/drivers/vulkan/tracing.cc
+++ b/runtime/src/iree/hal/drivers/vulkan/tracing.cc
@@ -10,9 +10,9 @@
 
 #include "iree/base/api.h"
 #include "iree/base/target_platform.h"
-#include "third_party/tracy/Tracy.hpp"
-#include "third_party/tracy/client/TracyProfiler.hpp"
-#include "third_party/tracy/common/TracyAlloc.hpp"
+#include "third_party/tracy/public/client/TracyProfiler.hpp"
+#include "third_party/tracy/public/common/TracyAlloc.hpp"
+#include "third_party/tracy/public/tracy/Tracy.hpp"
 
 // Total number of queries the per-queue query pool will contain. This
 // translates to the maximum number of outstanding queries before collection is
diff --git a/third_party/tracy b/third_party/tracy
index 80f6a93..eeffb6d 160000
--- a/third_party/tracy
+++ b/third_party/tracy
@@ -1 +1 @@
-Subproject commit 80f6a93da79af94fc4604e37439f5a75d5e7dfbd
+Subproject commit eeffb6d25cede3e4ffecc14ded7301315e710afe