Skip to content

Commit

Permalink
Revert "Fixing TRACY_NO_EXIT on MacOS. (iree-org#15139)" (iree-org#15140
Browse files Browse the repository at this point in the history
)

This reverts commit 198af34.

This change is causing benchmarks to timeout:
https://github.com/openxla/iree/actions/runs/6451186933
  • Loading branch information
mariecwhite authored Oct 9, 2023
1 parent 198af34 commit 94e7e23
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docs/developers/developing_iree/profiling_with_tracy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions runtime/src/iree/base/tracing/tracy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 2 additions & 5 deletions runtime/src/iree/base/tracing/tracy.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 94e7e23

Please sign in to comment.