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

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

Issue 1659033002: Revert of Remove --no-sandbox flag from command line for telemetry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sandbox
Patch Set: Created 4 years, 10 months 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 | tools/perf/benchmarks/memory_infra.py » ('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 #include <utility> 8 #include <utility>
9 9
10 #include "base/atomic_sequence_num.h" 10 #include "base/atomic_sequence_num.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // hence the above |post_task_failed| == true. 412 // hence the above |post_task_failed| == true.
413 // - The MDP does NOT have a task runner affinity. A locked access is required 413 // - The MDP does NOT have a task runner affinity. A locked access is required
414 // to R/W |disabled| (for the UnregisterAndDeleteDumpProviderSoon() case). 414 // to R/W |disabled| (for the UnregisterAndDeleteDumpProviderSoon() case).
415 bool should_dump; 415 bool should_dump;
416 const char* disabled_reason = nullptr; 416 const char* disabled_reason = nullptr;
417 { 417 {
418 AutoLock lock(lock_); 418 AutoLock lock(lock_);
419 if (!mdpinfo->disabled) { 419 if (!mdpinfo->disabled) {
420 if (mdpinfo->consecutive_failures >= kMaxConsecutiveFailuresCount) { 420 if (mdpinfo->consecutive_failures >= kMaxConsecutiveFailuresCount) {
421 mdpinfo->disabled = true; 421 mdpinfo->disabled = true;
422 disabled_reason = "Dump failed multiple times consecutively."; 422 disabled_reason =
423 "Dump failure, possibly related with sandboxing (crbug.com/461788)."
424 " Try --no-sandbox.";
423 } else if (post_task_failed && mdpinfo->task_runner) { 425 } else if (post_task_failed && mdpinfo->task_runner) {
424 // Don't disable unbound dump providers. The utility thread is normally 426 // Don't disable unbound dump providers. The utility thread is normally
425 // shutdown when disabling the trace and getting here in this case is 427 // shutdown when disabling the trace and getting here in this case is
426 // expected. 428 // expected.
427 mdpinfo->disabled = true; 429 mdpinfo->disabled = true;
428 disabled_reason = "The thread it was meant to dump onto is gone."; 430 disabled_reason = "The thread it was meant to dump onto is gone.";
429 } 431 }
430 } 432 }
431 should_dump = !mdpinfo->disabled && !post_task_failed; 433 should_dump = !mdpinfo->disabled && !post_task_failed;
432 } // AutoLock lock(lock_); 434 } // AutoLock lock(lock_);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 auto iter = process_dumps.find(pid); 672 auto iter = process_dumps.find(pid);
671 if (iter == process_dumps.end()) { 673 if (iter == process_dumps.end()) {
672 scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state)); 674 scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state));
673 iter = process_dumps.insert(std::make_pair(pid, std::move(new_pmd))).first; 675 iter = process_dumps.insert(std::make_pair(pid, std::move(new_pmd))).first;
674 } 676 }
675 return iter->second.get(); 677 return iter->second.get();
676 } 678 }
677 679
678 } // namespace trace_event 680 } // namespace trace_event
679 } // namespace base 681 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | tools/perf/benchmarks/memory_infra.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698