diff options
Diffstat (limited to 'absl/synchronization')
-rw-r--r-- | absl/synchronization/BUILD.bazel | 1 | ||||
-rw-r--r-- | absl/synchronization/CMakeLists.txt | 3 | ||||
-rw-r--r-- | absl/synchronization/mutex.cc | 4 | ||||
-rw-r--r-- | absl/synchronization/mutex.h | 6 |
4 files changed, 12 insertions, 2 deletions
diff --git a/absl/synchronization/BUILD.bazel b/absl/synchronization/BUILD.bazel index 69f9c81f6f6a..05376903fe01 100644 --- a/absl/synchronization/BUILD.bazel +++ b/absl/synchronization/BUILD.bazel @@ -77,6 +77,7 @@ cc_library( "//absl/base:dynamic_annotations", "//absl/base:malloc_internal", "//absl/debugging:stacktrace", + "//absl/debugging:symbolize", "//absl/time", ], ) diff --git a/absl/synchronization/CMakeLists.txt b/absl/synchronization/CMakeLists.txt index c8f84faf8b5a..6886c1ca6117 100644 --- a/absl/synchronization/CMakeLists.txt +++ b/absl/synchronization/CMakeLists.txt @@ -44,7 +44,8 @@ list(APPEND SYNCHRONIZATION_SRC "notification.cc" "mutex.cc" ) -set(SYNCHRONIZATION_PUBLIC_LIBRARIES absl::base absl::time) + +set(SYNCHRONIZATION_PUBLIC_LIBRARIES absl::base absl::stacktrace absl::symbolize absl::time) absl_library( TARGET diff --git a/absl/synchronization/mutex.cc b/absl/synchronization/mutex.cc index 33f92d8fabba..bd54a4dc2157 100644 --- a/absl/synchronization/mutex.cc +++ b/absl/synchronization/mutex.cc @@ -50,6 +50,7 @@ #include "absl/base/internal/thread_identity.h" #include "absl/base/port.h" #include "absl/debugging/stacktrace.h" +#include "absl/debugging/symbolize.h" #include "absl/synchronization/internal/graphcycles.h" #include "absl/synchronization/internal/per_thread_sem.h" #include "absl/time/time.h" @@ -111,7 +112,8 @@ ABSL_CONST_INIT absl::base_internal::AtomicHook< ABSL_CONST_INIT absl::base_internal::AtomicHook< void (*)(const char *msg, const void *cv)> cond_var_tracer; ABSL_CONST_INIT absl::base_internal::AtomicHook< - bool (*)(const void *pc, char *out, int out_size)> symbolizer; + bool (*)(const void *pc, char *out, int out_size)> + symbolizer(absl::Symbolize); } // namespace diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h index c4e026f9b936..368684bf2e27 100644 --- a/absl/synchronization/mutex.h +++ b/absl/synchronization/mutex.h @@ -979,6 +979,12 @@ void RegisterCondVarTracer(void (*fn)(const char *msg, const void *cv)); // to 'out.' // // This has the same memory ordering concerns as RegisterMutexProfiler() above. +// +// DEPRECATED: The default symbolizer function is absl::Symbolize() and the +// ability to register a different hook for symbolizing stack traces will be +// removed on or after 2023-05-01. +ABSL_DEPRECATED("absl::RegisterSymbolizer() is deprecated and will be removed " + "on or after 2023-05-01") void RegisterSymbolizer(bool (*fn)(const void *pc, char *out, int out_size)); // EnableMutexInvariantDebugging() |