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

Side by Side Diff: gpu/command_buffer/service/transfer_buffer_manager.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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | media/filters/vpx_video_decoder.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 (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 #include "gpu/command_buffer/service/transfer_buffer_manager.h" 5 #include "gpu/command_buffer/service/transfer_buffer_manager.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 30 matching lines...) Expand all
41 41
42 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( 42 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
43 this); 43 this);
44 } 44 }
45 45
46 bool TransferBufferManager::Initialize() { 46 bool TransferBufferManager::Initialize() {
47 // When created from InProcessCommandBuffer, we won't have a |memory_tracker_| 47 // When created from InProcessCommandBuffer, we won't have a |memory_tracker_|
48 // so don't register a dump provider. 48 // so don't register a dump provider.
49 if (memory_tracker_) { 49 if (memory_tracker_) {
50 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( 50 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
51 this, base::ThreadTaskRunnerHandle::Get()); 51 this, "gpu::TransferBufferManager",
52 base::ThreadTaskRunnerHandle::Get());
52 } 53 }
53 return true; 54 return true;
54 } 55 }
55 56
56 bool TransferBufferManager::RegisterTransferBuffer( 57 bool TransferBufferManager::RegisterTransferBuffer(
57 int32 id, 58 int32 id,
58 scoped_ptr<BufferBacking> buffer_backing) { 59 scoped_ptr<BufferBacking> buffer_backing) {
59 if (id <= 0) { 60 if (id <= 0) {
60 DVLOG(0) << "Cannot register transfer buffer with non-positive ID."; 61 DVLOG(0) << "Cannot register transfer buffer with non-positive ID.";
61 return false; 62 return false;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 auto guid = 123 auto guid =
123 GetBufferGUIDForTracing(memory_tracker_->ClientTracingId(), buffer_id); 124 GetBufferGUIDForTracing(memory_tracker_->ClientTracingId(), buffer_id);
124 pmd->CreateSharedGlobalAllocatorDump(guid); 125 pmd->CreateSharedGlobalAllocatorDump(guid);
125 pmd->AddOwnershipEdge(dump->guid(), guid); 126 pmd->AddOwnershipEdge(dump->guid(), guid);
126 } 127 }
127 128
128 return true; 129 return true;
129 } 130 }
130 131
131 } // namespace gpu 132 } // namespace gpu
132
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | media/filters/vpx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698