blob: db086b6f7589caca5f4e6f1b25078848e9a38df8 [file] [log] [blame]
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "init_webrtc.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "base/trace_event/trace_event.h"
#include "third_party/webrtc/rtc_base/event_tracer.h"
#include "third_party/webrtc/system_wrappers/include/cpu_info.h"
#include "third_party/webrtc_overrides/rtc_base/logging.h"
const unsigned char* GetCategoryGroupEnabled(const char* category_group) {
void AddTraceEvent(char phase,
const unsigned char* category_group_enabled,
const char* name,
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) {
base::trace_event::TraceArguments args(num_args, arg_names, arg_types,
TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_group_enabled, name,
trace_event_internal::kGlobalScope, id, &args,
bool InitializeWebRtcModule() {
// Workaround for
// On Linux, we can't fetch the number of cores after the sandbox has been
// initialized, so we call DetectNumberOfCores() here, to cache the value.
webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent);
return true;