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

Side by Side Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 1262333005: [tracing] Introduce MemoryDumpArgs to enable light and heavy dumps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 5 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
6 6
7 #include "base/atomic_sequence_num.h" 7 #include "base/atomic_sequence_num.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 } 255 }
256 256
257 void BrowserGpuMemoryBufferManager::SetDestructionSyncPoint( 257 void BrowserGpuMemoryBufferManager::SetDestructionSyncPoint(
258 gfx::GpuMemoryBuffer* buffer, 258 gfx::GpuMemoryBuffer* buffer,
259 uint32 sync_point) { 259 uint32 sync_point) {
260 static_cast<GpuMemoryBufferImpl*>(buffer) 260 static_cast<GpuMemoryBufferImpl*>(buffer)
261 ->set_destruction_sync_point(sync_point); 261 ->set_destruction_sync_point(sync_point);
262 } 262 }
263 263
264 bool BrowserGpuMemoryBufferManager::OnMemoryDump( 264 bool BrowserGpuMemoryBufferManager::OnMemoryDump(
265 const base::trace_event::MemoryDumpArgs& args,
265 base::trace_event::ProcessMemoryDump* pmd) { 266 base::trace_event::ProcessMemoryDump* pmd) {
266 DCHECK_CURRENTLY_ON(BrowserThread::IO); 267 DCHECK_CURRENTLY_ON(BrowserThread::IO);
267 268
268 for (const auto& client : clients_) { 269 for (const auto& client : clients_) {
269 int client_id = client.first; 270 int client_id = client.first;
270 271
271 for (const auto& buffer : client.second) { 272 for (const auto& buffer : client.second) {
272 if (buffer.second.type == gfx::EMPTY_BUFFER) 273 if (buffer.second.type == gfx::EMPTY_BUFFER)
273 continue; 274 continue;
274 275
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 return gpu_client_tracing_id_; 599 return gpu_client_tracing_id_;
599 } 600 }
600 601
601 // In normal cases, |client_id| is a child process id, so we can perform 602 // In normal cases, |client_id| is a child process id, so we can perform
602 // the standard conversion. 603 // the standard conversion.
603 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId( 604 return ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
604 client_id); 605 client_id);
605 } 606 }
606 607
607 } // namespace content 608 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_memory_buffer_manager.h ('k') | content/child/child_discardable_shared_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698