From 94e7e233fe74317d4190e8869a26a0f585c6eb80 Mon Sep 17 00:00:00 2001 From: mariecwhite Date: Mon, 9 Oct 2023 22:53:16 +1100 Subject: [PATCH] Revert "Fixing TRACY_NO_EXIT on MacOS. (#15139)" (#15140) This reverts commit 198af342550b86ecfc3d341aaba38b1c29fb647b. This change is causing benchmarks to timeout: https://github.com/openxla/iree/actions/runs/6451186933 --- .../developing_iree/profiling_with_tracy.md | 2 +- runtime/src/iree/base/tracing/tracy.cc | 16 ---------------- runtime/src/iree/base/tracing/tracy.h | 7 ++----- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/docs/developers/developing_iree/profiling_with_tracy.md b/docs/developers/developing_iree/profiling_with_tracy.md index 59dc3f09fd83..8d42b1737824 100644 --- a/docs/developers/developing_iree/profiling_with_tracy.md +++ b/docs/developers/developing_iree/profiling_with_tracy.md @@ -99,7 +99,7 @@ brew install capstone Install other dependencies: ```shell -brew install pkg-config glfw freetype tbb +brew install glfw freetype ``` ## Build the Tracy tools diff --git a/runtime/src/iree/base/tracing/tracy.cc b/runtime/src/iree/base/tracing/tracy.cc index 2f9a1b3ebb86..d500a5ca9fd7 100644 --- a/runtime/src/iree/base/tracing/tracy.cc +++ b/runtime/src/iree/base/tracing/tracy.cc @@ -30,22 +30,6 @@ void IREEDbgHelpUnlock(void) { ReleaseMutex(iree_dbghelp_mutex); } #if IREE_TRACING_FEATURES != 0 -void iree_tracing_tracy_initialize() { - // No-op. -} - -void iree_tracing_tracy_deinitialize() { - // Synchronously shut down the profiler service. - // This is required on some platforms to support TRACY_NO_EXIT=1 such as - // MacOS and iOS. It should be harmless on other platforms as it returns - // quickly if TRACY_NO_EXIT=1 is not set. - // See: https://github.com/wolfpld/tracy/issues/8 - tracy::GetProfiler().RequestShutdown(); - while (!tracy::GetProfiler().HasShutdownFinished()) { - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - }; -} - iree_zone_id_t iree_tracing_zone_begin_impl( const iree_tracing_location_t* src_loc, const char* name, size_t name_length) { diff --git a/runtime/src/iree/base/tracing/tracy.h b/runtime/src/iree/base/tracing/tracy.h index fcc15854a5b7..ffe410c83fd8 100644 --- a/runtime/src/iree/base/tracing/tracy.h +++ b/runtime/src/iree/base/tracing/tracy.h @@ -104,9 +104,6 @@ typedef struct ___tracy_source_location_data iree_tracing_location_t; (TracyCZoneCtx) { zone_id, 1 } #endif // __cplusplus -void iree_tracing_tracy_initialize(); -void iree_tracing_tracy_deinitialize(); - IREE_MUST_USE_RESULT iree_zone_id_t iree_tracing_zone_begin_impl(const iree_tracing_location_t* src_loc, const char* name, size_t name_length); @@ -188,8 +185,8 @@ void* iree_tracing_obscure_ptr(void* ptr); #define IREE_TRACE(expr) expr -#define IREE_TRACE_APP_ENTER() iree_tracing_tracy_initialize() -#define IREE_TRACE_APP_EXIT(exit_code) iree_tracing_tracy_deinitialize() +#define IREE_TRACE_APP_ENTER() +#define IREE_TRACE_APP_EXIT(exit_code) #define IREE_TRACE_SET_APP_INFO(value, value_length) \ ___tracy_emit_message_appinfo(value, value_length) #define IREE_TRACE_SET_THREAD_NAME(name) ___tracy_set_thread_name(name)