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

Side by Side Diff: gpu/command_buffer/client/cmd_buffer_helper.cc

Issue 1406213005: [tracing] Add names to memory-infra dumpers for debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@memory-infra-runtime
Patch Set: Rebase + fix android Created 5 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // This file contains the implementation of the command buffer helper class. 5 // This file contains the implementation of the command buffer helper class.
6 6
7 #include "gpu/command_buffer/client/cmd_buffer_helper.h" 7 #include "gpu/command_buffer/client/cmd_buffer_helper.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 25 matching lines...) Expand all
36 #endif 36 #endif
37 usable_(true), 37 usable_(true),
38 context_lost_(false), 38 context_lost_(false),
39 flush_automatically_(true), 39 flush_automatically_(true),
40 flush_generation_(0) { 40 flush_generation_(0) {
41 // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview). 41 // In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
42 // Don't register a dump provider in these cases. 42 // Don't register a dump provider in these cases.
43 // TODO(ericrk): Get this working in Android Webview. crbug.com/517156 43 // TODO(ericrk): Get this working in Android Webview. crbug.com/517156
44 if (base::ThreadTaskRunnerHandle::IsSet()) { 44 if (base::ThreadTaskRunnerHandle::IsSet()) {
45 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 45 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
46 this, base::ThreadTaskRunnerHandle::Get()); 46 this, "gpu::CommandBufferHelper", base::ThreadTaskRunnerHandle::Get());
47 } 47 }
48 } 48 }
49 49
50 void CommandBufferHelper::SetAutomaticFlushes(bool enabled) { 50 void CommandBufferHelper::SetAutomaticFlushes(bool enabled) {
51 flush_automatically_ = enabled; 51 flush_automatically_ = enabled;
52 CalcImmediateEntries(0); 52 CalcImmediateEntries(0);
53 } 53 }
54 54
55 bool CommandBufferHelper::IsContextLost() { 55 bool CommandBufferHelper::IsContextLost() {
56 if (!context_lost_) { 56 if (!context_lost_) {
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 GetTotalFreeEntriesNoWaiting() * sizeof(CommandBufferEntry)); 353 GetTotalFreeEntriesNoWaiting() * sizeof(CommandBufferEntry));
354 auto guid = GetBufferGUIDForTracing(tracing_process_id, ring_buffer_id_); 354 auto guid = GetBufferGUIDForTracing(tracing_process_id, ring_buffer_id_);
355 const int kImportance = 2; 355 const int kImportance = 2;
356 pmd->CreateSharedGlobalAllocatorDump(guid); 356 pmd->CreateSharedGlobalAllocatorDump(guid);
357 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance); 357 pmd->AddOwnershipEdge(dump->guid(), guid, kImportance);
358 358
359 return true; 359 return true;
360 } 360 }
361 361
362 } // namespace gpu 362 } // namespace gpu
OLDNEW
« no previous file with comments | « gin/v8_isolate_memory_dump_provider.cc ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698