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

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

Issue 1584583003: Remove --no-sandbox flag from command line for telemetry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sandbox
Patch Set: More fixes. Created 4 years, 11 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
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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 // hence the above |post_task_failed| == true. 391 // hence the above |post_task_failed| == true.
392 // - The MDP does NOT have a task runner affinity. A locked access is required 392 // - The MDP does NOT have a task runner affinity. A locked access is required
393 // to R/W |disabled| (for the UnregisterAndDeleteDumpProviderSoon() case). 393 // to R/W |disabled| (for the UnregisterAndDeleteDumpProviderSoon() case).
394 bool should_dump; 394 bool should_dump;
395 const char* disabled_reason = nullptr; 395 const char* disabled_reason = nullptr;
396 { 396 {
397 AutoLock lock(lock_); 397 AutoLock lock(lock_);
398 if (!mdpinfo->disabled) { 398 if (!mdpinfo->disabled) {
399 if (mdpinfo->consecutive_failures >= kMaxConsecutiveFailuresCount) { 399 if (mdpinfo->consecutive_failures >= kMaxConsecutiveFailuresCount) {
400 mdpinfo->disabled = true; 400 mdpinfo->disabled = true;
401 disabled_reason = 401 disabled_reason = "Dump failed multiple times consecutively.";
402 "Dump failure, possibly related with sandboxing (crbug.com/461788)."
403 " Try --no-sandbox.";
404 } else if (post_task_failed && mdpinfo->task_runner) { 402 } else if (post_task_failed && mdpinfo->task_runner) {
405 // Don't disable unbound dump providers. The utility thread is normally 403 // Don't disable unbound dump providers. The utility thread is normally
406 // shutdown when disabling the trace and getting here in this case is 404 // shutdown when disabling the trace and getting here in this case is
407 // expected. 405 // expected.
408 mdpinfo->disabled = true; 406 mdpinfo->disabled = true;
409 disabled_reason = "The thread it was meant to dump onto is gone."; 407 disabled_reason = "The thread it was meant to dump onto is gone.";
410 } 408 }
411 } 409 }
412 should_dump = !mdpinfo->disabled && !post_task_failed; 410 should_dump = !mdpinfo->disabled && !post_task_failed;
413 } 411 }
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 auto iter = process_dumps.find(pid); 640 auto iter = process_dumps.find(pid);
643 if (iter == process_dumps.end()) { 641 if (iter == process_dumps.end()) {
644 scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state)); 642 scoped_ptr<ProcessMemoryDump> new_pmd(new ProcessMemoryDump(session_state));
645 iter = process_dumps.insert(std::make_pair(pid, std::move(new_pmd))).first; 643 iter = process_dumps.insert(std::make_pair(pid, std::move(new_pmd))).first;
646 } 644 }
647 return iter->second.get(); 645 return iter->second.get();
648 } 646 }
649 647
650 } // namespace trace_event 648 } // namespace trace_event
651 } // namespace base 649 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | components/tracing/docs/memory_infra.md » ('j') | components/tracing/docs/memory_infra.md » ('J')

Powered by Google App Engine
This is Rietveld 408576698