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

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

Issue 987043003: [tracing] Introduce support for userland memory allocators dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mmaps_en
Patch Set: Created 5 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/trace_event/memory_allocator_attributes.h"
6
7 namespace base {
8 namespace trace_event {
9
10 MemoryAllocatorDeclaredAttributes::MemoryAllocatorDeclaredAttributes() {
11 }
12
13 MemoryAllocatorDeclaredAttributes::~MemoryAllocatorDeclaredAttributes() {
14 }
15
16 void MemoryAllocatorDeclaredAttributes::Add(
17 const MemoryAllocatorDeclaredAttribute& attr) {
18 DCHECK_EQ(0u, attributes_.count(attr.name));
19 attributes_[attr.name] = attr;
20 }
21
22 const MemoryAllocatorDeclaredAttribute* MemoryAllocatorDeclaredAttributes::Get(
23 const std::string& name) const {
24 auto it = attributes_.find(name);
25 return it == attributes_.end() ? nullptr : &(it->second);
26 }
27
28 } // namespace trace_event
29 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698