Reland "Remove WEBRTC_TRACE."

This is a reland of 2209b90449473e1df3e0797b6271c7624b41907d
Original change's description:
> Remove WEBRTC_TRACE.
> 
> Bug: webrtc:5118
> Change-Id: I0af0f8845ee016fa61d7cecc526e2a672ec8732d
> Reviewed-on: https://webrtc-review.googlesource.com/5382
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20114}

Bug: webrtc:5118
Change-Id: I2d93fd40fcaa251c363bdcfb1c04b834a3a7f0e9
Reviewed-on: https://webrtc-review.googlesource.com/6000
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20132}
This commit is contained in:
Fredrik Solenberg
2017-10-04 09:53:35 +02:00
committed by Commit Bot
parent 98ea2dac8a
commit 68007e97ec
36 changed files with 15 additions and 1589 deletions

View File

@ -12,32 +12,10 @@
#include "rtc_base/logging.h"
#include "sdk/android/src/jni/jni_helpers.h"
#include "system_wrappers/include/logcat_trace_context.h"
#include "system_wrappers/include/trace.h"
namespace webrtc {
namespace jni {
JNI_FUNCTION_DECLARATION(void,
Logging_nativeEnableTracing,
JNIEnv* jni,
jclass,
jstring j_path,
jint nativeLevels) {
std::string path = JavaToStdString(jni, j_path);
if (nativeLevels != kTraceNone) {
Trace::set_level_filter(nativeLevels);
if (path != "logcat:") {
RTC_CHECK_EQ(0, Trace::SetTraceFile(path.c_str(), false))
<< "SetTraceFile failed";
} else {
// Intentionally leak this to avoid needing to reason about its lifecycle.
// It keeps no state and functions only as a dispatch point.
static LogcatTraceContext* g_trace_callback = new LogcatTraceContext();
}
}
}
JNI_FUNCTION_DECLARATION(void,
Logging_nativeEnableLogToDebugOutput,
JNIEnv* jni,

View File

@ -30,7 +30,6 @@
// We don't want to depend on 'system_wrappers:field_trial_default' because
// clients should be able to provide their own implementation.
#include "system_wrappers/include/field_trial_default.h" // nogncheck
#include "system_wrappers/include/trace.h"
namespace webrtc {
namespace jni {
@ -147,7 +146,6 @@ JNI_FUNCTION_DECLARATION(
// webrtc/rtc_base/ are convoluted, we simply wrap here to avoid having to
// think about ramifications of auto-wrapping there.
rtc::ThreadManager::Instance()->WrapCurrentThread();
Trace::CreateTrace();
std::unique_ptr<rtc::Thread> network_thread =
rtc::Thread::CreateWithSocketServer();
@ -225,7 +223,6 @@ JNI_FUNCTION_DECLARATION(void,
delete field_trials_init_string;
field_trials_init_string = NULL;
}
Trace::ReturnTrace();
}
JNI_FUNCTION_DECLARATION(void,