Commit 1055dd5b authored by Marina Ciocea's avatar Marina Ciocea Committed by Commit Bot

Revert "Temporary check global histogram allocator in audio service output controller."

This reverts commit 9624dedb.

Reason for revert: breaking webrtc tests: https://ci.chromium.org/buildbot/chromium.webrtc/Linux%20Tester/42679

Original change's description:
> Temporary check global histogram allocator in audio service output controller.
> 
> Add a temporary check to investigate audio service experiment output controller
> histograms count mismatch. If histogram persistent memory is not setup before
> output controller metrics are reported, the check will fail
> (see https://crbug.com/867827#c40). This CL will be reverted in a couple of days
> after gathering data from canary.
> 
> Bug: 867827
> Change-Id: I1f18c12c2aa2741a27c0bf82f383de70e273fd24
> Reviewed-on: https://chromium-review.googlesource.com/1205606
> Reviewed-by: Olga Sharonova <olka@chromium.org>
> Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#589117}

TBR=olka@chromium.org,marinaciocea@chromium.org

Change-Id: I238d02410407268ca30f06666d346181158624a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 867827
Reviewed-on: https://chromium-review.googlesource.com/1209542Reviewed-by: default avatarMarina Ciocea <marinaciocea@chromium.org>
Commit-Queue: Marina Ciocea <marinaciocea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589132}
parent 31c85339
......@@ -11,7 +11,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/numerics/safe_conversions.h"
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
......@@ -43,8 +42,6 @@ enum StreamCreationResult {
void LogStreamCreationResult(bool for_device_change,
StreamCreationResult result) {
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
if (for_device_change) {
UMA_HISTOGRAM_ENUMERATION(
"Media.AudioOutputController.ProxyStreamCreationResultForDeviceChange",
......@@ -68,8 +65,6 @@ OutputController::ErrorStatisticsTracker::ErrorStatisticsTracker()
}
OutputController::ErrorStatisticsTracker::~ErrorStatisticsTracker() {
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
UMA_HISTOGRAM_LONG_TIMES("Media.OutputStreamDuration",
base::TimeTicks::Now() - start_time_);
UMA_HISTOGRAM_BOOLEAN("Media.AudioOutputController.CallbackError",
......@@ -136,9 +131,6 @@ OutputController::~OutputController() {
bool OutputController::Create(bool is_for_device_change) {
DCHECK(task_runner_->BelongsToCurrentThread());
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.CreateTime");
TRACE_EVENT0("audio", "OutputController::Create");
handler_->OnLog(is_for_device_change
......@@ -209,9 +201,6 @@ bool OutputController::Create(bool is_for_device_change) {
void OutputController::Play() {
DCHECK(task_runner_->BelongsToCurrentThread());
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.PlayTime");
TRACE_EVENT0("audio", "OutputController::Play");
handler_->OnLog("OutputController::Play");
......@@ -257,9 +246,6 @@ void OutputController::StopStream() {
void OutputController::Pause() {
DCHECK(task_runner_->BelongsToCurrentThread());
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.PauseTime");
TRACE_EVENT0("audio", "OutputController::Pause");
handler_->OnLog("OutputController::Pause");
......@@ -279,9 +265,6 @@ void OutputController::Pause() {
void OutputController::Close() {
DCHECK(task_runner_->BelongsToCurrentThread());
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.CloseTime");
TRACE_EVENT0("audio", "OutputController::Close");
handler_->OnLog("OutputController::Close");
......@@ -530,9 +513,6 @@ void OutputController::OnMemberLeftGroup(StreamMonitor* monitor) {
void OutputController::OnDeviceChange() {
DCHECK(task_runner_->BelongsToCurrentThread());
// TODO(https://crbug.com/867827) remove histogram allocator check.
CHECK(base::GlobalHistogramAllocator::Get());
SCOPED_UMA_HISTOGRAM_TIMER("Media.AudioOutputController.DeviceChangeTime");
TRACE_EVENT0("audio", "OutputController::OnDeviceChange");
......
......@@ -18,7 +18,6 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/optional.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
......@@ -331,14 +330,6 @@ class OutputControllerTest : public ::testing::Test {
std::string(), &mock_sync_reader_,
&stream_monitor_coordinator_, processing_id_);
controller_->SetVolume(kTestVolume);
// TODO(https://crbug.com/867827) remove histogram allocator creation when
// removing output controller checks.
if (!base::GlobalHistogramAllocator::Get()) {
const int32_t kAllocatorMemorySize = 8 << 20;
base::GlobalHistogramAllocator::CreateWithLocalMemory(
kAllocatorMemorySize, 0, "HistogramAllocatorTest");
}
}
void TearDown() override { controller_ = base::nullopt; }
......
......@@ -6,7 +6,6 @@
#include <utility>
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_task_environment.h"
#include "base/unguessable_token.h"
......@@ -117,14 +116,6 @@ class TestEnvironment {
stream_factory_binding_(&stream_factory_,
mojo::MakeRequest(&stream_factory_ptr_)) {
mojo::core::SetDefaultProcessErrorCallback(bad_message_callback_.Get());
// TODO(https://crbug.com/867827) remove histogram allocator creation when
// removing output controller checks.
if (!base::GlobalHistogramAllocator::Get()) {
const int32_t kAllocatorMemorySize = 8 << 20;
base::GlobalHistogramAllocator::CreateWithLocalMemory(
kAllocatorMemorySize, 0, "HistogramAllocatorTest");
}
}
~TestEnvironment() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment