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

Side by Side Diff: base/trace_event/memory_dump_manager.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 | « no previous file | base/trace_event/memory_dump_manager_unittest.cc » ('j') | 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 consecutive_failures(0), 610 consecutive_failures(0),
611 disabled(false), 611 disabled(false),
612 unregistered(false) {} 612 unregistered(false) {}
613 613
614 MemoryDumpManager::MemoryDumpProviderInfo::~MemoryDumpProviderInfo() {} 614 MemoryDumpManager::MemoryDumpProviderInfo::~MemoryDumpProviderInfo() {}
615 615
616 bool MemoryDumpManager::MemoryDumpProviderInfo::operator<( 616 bool MemoryDumpManager::MemoryDumpProviderInfo::operator<(
617 const MemoryDumpProviderInfo& other) const { 617 const MemoryDumpProviderInfo& other) const {
618 if (task_runner == other.task_runner) 618 if (task_runner == other.task_runner)
619 return dump_provider < other.dump_provider; 619 return dump_provider < other.dump_provider;
620 // TODO(ssid): Ensure that unbound providers (task_runner == nullptr) 620 // Ensure that unbound providers (task_runner == nullptr) always run last.
621 // always run last. Currently it runs first so that it doesn't cause 621 return !(task_runner < other.task_runner);
622 // regression in perf bots due to change in measurement time.
623 // crbug.com/555584.
624 return task_runner < other.task_runner;
625 } 622 }
626 623
627 MemoryDumpManager::ProcessMemoryDumpAsyncState::ProcessMemoryDumpAsyncState( 624 MemoryDumpManager::ProcessMemoryDumpAsyncState::ProcessMemoryDumpAsyncState(
628 MemoryDumpRequestArgs req_args, 625 MemoryDumpRequestArgs req_args,
629 MemoryDumpProviderInfoSet::iterator next_dump_provider, 626 MemoryDumpProviderInfoSet::iterator next_dump_provider,
630 const scoped_refptr<MemoryDumpSessionState>& session_state, 627 const scoped_refptr<MemoryDumpSessionState>& session_state,
631 MemoryDumpCallback callback, 628 MemoryDumpCallback callback,
632 const scoped_refptr<SingleThreadTaskRunner>& dump_thread_task_runner) 629 const scoped_refptr<SingleThreadTaskRunner>& dump_thread_task_runner)
633 : req_args(req_args), 630 : req_args(req_args),
634 next_dump_provider(next_dump_provider), 631 next_dump_provider(next_dump_provider),
(...skipping 10 matching lines...) Expand all
645 auto iter = process_dumps.find(pid); 642 auto iter = process_dumps.find(pid);
646 if (iter == process_dumps.end()) { 643 if (iter == process_dumps.end()) {
647 scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state)); 644 scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state));
648 iter = process_dumps.insert(pid, new_pmd.Pass()).first; 645 iter = process_dumps.insert(pid, new_pmd.Pass()).first;
649 } 646 }
650 return iter->second; 647 return iter->second;
651 } 648 }
652 649
653 } // namespace trace_event 650 } // namespace trace_event
654 } // namespace base 651 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/trace_event/memory_dump_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698