Let threads opt in to having their stack traces printed
The video decoder thread is the pilot user. For now this is an Android-only feature, since that's the only platform we can print stack traces on. Bug: webrtc:9987 Change-Id: Ie638c619673b5f159d91a32683fd787baf46479a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126222 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27127}
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
// The user may pass in a nullptr.
|
||||
#include "modules/audio_processing/include/audio_processing.h" // nogncheck
|
||||
#include "rtc_base/event_tracer.h"
|
||||
#include "rtc_base/system/thread_registry.h"
|
||||
#include "rtc_base/thread.h"
|
||||
#include "sdk/android/generated_peerconnection_jni/jni/PeerConnectionFactory_jni.h"
|
||||
#include "sdk/android/native_api/jni/java_types.h"
|
||||
@ -520,5 +521,10 @@ static void JNI_PeerConnectionFactory_PrintStackTrace(JNIEnv* env, jint tid) {
|
||||
RTC_LOG(LS_WARNING) << StackTraceToString(GetStackTrace(tid));
|
||||
}
|
||||
|
||||
static void JNI_PeerConnectionFactory_PrintStackTracesOfRegisteredThreads(
|
||||
JNIEnv* env) {
|
||||
PrintStackTracesOfRegisteredThreads();
|
||||
}
|
||||
|
||||
} // namespace jni
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user