Bump to WebRTC M131 release

Ongoing fixes and improvements, transient suppressor is gone. Also,
dropping isac because it doesn't seem to be useful, and is just build
system deadweight now.

Upstream references:

  Version: 131.0.6778.200
  WebRTC: 79aff54b0fa9238ce3518dd9eaf9610cd6f22e82
  Chromium: 2a19506ad24af755f2a215a4c61f775393e0db42
This commit is contained in:
Arun Raghavan
2024-12-24 19:32:07 -05:00
parent 8bdb53d91c
commit b5c48b97f6
263 changed files with 4628 additions and 20416 deletions

View File

@ -7,11 +7,19 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "rtc_base/event_tracer.h"
#include <stdio.h>
#include "rtc_base/trace_event.h"
#if defined(RTC_USE_PERFETTO)
#include "rtc_base/trace_categories.h"
#include "third_party/perfetto/include/perfetto/tracing/tracing.h"
#else
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <atomic>
@ -28,21 +36,27 @@
#include "rtc_base/synchronization/mutex.h"
#include "rtc_base/thread_annotations.h"
#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
// This is a guesstimate that should be enough in most cases.
static const size_t kEventLoggerArgsStrBufferInitialSize = 256;
static const size_t kTraceArgBufferLength = 32;
#endif
namespace webrtc {
namespace {
#if !defined(RTC_USE_PERFETTO)
GetCategoryEnabledPtr g_get_category_enabled_ptr = nullptr;
AddTraceEventPtr g_add_trace_event_ptr = nullptr;
#endif
} // namespace
#if defined(RTC_USE_PERFETTO)
void RegisterPerfettoTrackEvents() {
if (perfetto::Tracing::IsInitialized()) {
webrtc::TrackEvent::Register();
}
}
#else
void SetupEventTracer(GetCategoryEnabledPtr get_category_enabled_ptr,
AddTraceEventPtr add_trace_event_ptr) {
g_get_category_enabled_ptr = get_category_enabled_ptr;
@ -73,9 +87,28 @@ void EventTracer::AddTraceEvent(char phase,
arg_names, arg_types, arg_values, flags);
}
}
#endif
} // namespace webrtc
#if defined(RTC_USE_PERFETTO)
// TODO(bugs.webrtc.org/15917): Implement for perfetto.
namespace rtc::tracing {
void SetupInternalTracer(bool enable_all_categories) {}
bool StartInternalCapture(absl::string_view filename) {
return false;
}
void StartInternalCaptureToFile(FILE* file) {}
void StopInternalCapture() {}
void ShutdownInternalTracer() {}
} // namespace rtc::tracing
#else
// This is a guesstimate that should be enough in most cases.
static const size_t kEventLoggerArgsStrBufferInitialSize = 256;
static const size_t kTraceArgBufferLength = 32;
namespace rtc {
namespace tracing {
namespace {
@ -96,7 +129,7 @@ class EventLogger final {
const unsigned char* arg_types,
const unsigned long long* arg_values,
uint64_t timestamp,
int pid,
int /* pid */,
rtc::PlatformThreadId thread_id) {
std::vector<TraceArg> args(num_args);
for (int i = 0; i < num_args; ++i) {
@ -206,12 +239,14 @@ class EventLogger final {
// Finally start, everything should be set up now.
logging_thread_ =
PlatformThread::SpawnJoinable([this] { Log(); }, "EventTracingThread");
TRACE_EVENT_INSTANT0("webrtc", "EventLogger::Start");
TRACE_EVENT_INSTANT0("webrtc", "EventLogger::Start",
TRACE_EVENT_SCOPE_GLOBAL);
}
void Stop() {
RTC_DCHECK(thread_checker_.IsCurrent());
TRACE_EVENT_INSTANT0("webrtc", "EventLogger::Stop");
TRACE_EVENT_INSTANT0("webrtc", "EventLogger::Stop",
TRACE_EVENT_SCOPE_GLOBAL);
// Try to stop. Abort if we're not currently logging.
int one = 1;
if (g_event_logging_active.compare_exchange_strong(one, 0))
@ -344,12 +379,12 @@ const unsigned char* InternalEnableAllCategories(const char* name) {
void InternalAddTraceEvent(char phase,
const unsigned char* category_enabled,
const char* name,
unsigned long long id,
unsigned long long /* id */,
int num_args,
const char** arg_names,
const unsigned char* arg_types,
const unsigned long long* arg_values,
unsigned char flags) {
unsigned char /* flags */) {
// Fast path for when event tracing is inactive.
if (g_event_logging_active.load() == 0)
return;
@ -410,3 +445,5 @@ void ShutdownInternalTracer() {
} // namespace tracing
} // namespace rtc
#endif // defined(RTC_USE_PERFETTO)