Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: base/trace_event/memory_dump_manager_unittest.cc

Issue 1479003003: Revert of Fix regression in memory-infra bots due to change in dump order (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/trace_event/memory_dump_manager.h" 5 #include "base/trace_event/memory_dump_manager.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 EnableTracingWithTraceConfig( 711 EnableTracingWithTraceConfig(
712 TraceConfigMemoryTestUtil::GetTraceConfig_PeriodicTriggers( 712 TraceConfigMemoryTestUtil::GetTraceConfig_PeriodicTriggers(
713 kLightDumpPeriodMs, kHeavyDumpPeriodMs)); 713 kLightDumpPeriodMs, kHeavyDumpPeriodMs));
714 run_loop.Run(); 714 run_loop.Run();
715 DisableTracing(); 715 DisableTracing();
716 } 716 }
717 717
718 // Tests against race conditions that might arise when disabling tracing in the 718 // Tests against race conditions that might arise when disabling tracing in the
719 // middle of a global memory dump. 719 // middle of a global memory dump.
720 // TODO(ssid): Enable this test once crbug.com/555584 is fixed. 720 TEST_F(MemoryDumpManagerTest, DisableTracingWhileDumping) {
721 TEST_F(MemoryDumpManagerTest, DISABLED_DisableTracingWhileDumping) {
722 base::WaitableEvent tracing_disabled_event(false, false); 721 base::WaitableEvent tracing_disabled_event(false, false);
723 InitializeMemoryDumpManager(false /* is_coordinator */); 722 InitializeMemoryDumpManager(false /* is_coordinator */);
724 723
725 // Register a bound dump provider. 724 // Register a bound dump provider.
726 scoped_ptr<Thread> mdp_thread(new Thread("test thread")); 725 scoped_ptr<Thread> mdp_thread(new Thread("test thread"));
727 mdp_thread->Start(); 726 mdp_thread->Start();
728 MockMemoryDumpProvider mdp_with_affinity; 727 MockMemoryDumpProvider mdp_with_affinity;
729 RegisterDumpProvider(&mdp_with_affinity, mdp_thread->task_runner(), 728 RegisterDumpProvider(&mdp_with_affinity, mdp_thread->task_runner(),
730 kDefaultOptions); 729 kDefaultOptions);
731 730
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(123))); 818 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(123)));
820 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(456))); 819 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(456)));
821 ASSERT_EQ(1u, trace_analyzer::CountMatches( 820 ASSERT_EQ(1u, trace_analyzer::CountMatches(
822 events, Query::EventPidIs(GetCurrentProcId()))); 821 events, Query::EventPidIs(GetCurrentProcId())));
823 ASSERT_EQ(events[0]->id, events[1]->id); 822 ASSERT_EQ(events[0]->id, events[1]->id);
824 ASSERT_EQ(events[0]->id, events[2]->id); 823 ASSERT_EQ(events[0]->id, events[2]->id);
825 } 824 }
826 825
827 } // namespace trace_event 826 } // namespace trace_event
828 } // namespace base 827 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698