[Concurrency] Add tracing for major operations in the concurrency runtime.

Each trace point is declared as a function in the new `Tracing.h` header. These functions are called from the appropriate places in the concurrency runtime.

On Darwin, an implementation of these functions is provided which uses the `os/signpost.h` API to emit signpost events/intervals.

When the signpost API is not available, no-op stub implementations are provided. Implementations for other OSes can be provided by providing implementations of the trace functions for that OS.

rdar://81858487
This commit is contained in:
Mike Ash
2021-10-21 17:07:59 -04:00
parent 127528a3d0
commit 0977920217
13 changed files with 608 additions and 16 deletions

View File

@@ -124,6 +124,9 @@ public:
/// Is this executor the main executor?
bool isMainExecutor() const;
/// Get the raw value of the Implementation field, for tracing.
uintptr_t getRawImplementation() { return Implementation; }
bool operator==(ExecutorRef other) const {
return Identity == other.Identity;
}