OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project 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 "src/profiler/allocation-tracker.h" | 5 #include "src/profiler/allocation-tracker.h" |
6 | 6 |
7 #include "src/frames-inl.h" | 7 #include "src/frames-inl.h" |
8 #include "src/objects-inl.h" | 8 #include "src/objects-inl.h" |
9 #include "src/profiler/heap-snapshot-generator-inl.h" | 9 #include "src/profiler/heap-snapshot-generator-inl.h" |
10 | 10 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 AddRange(to, size, trace_node_id); | 142 AddRange(to, size, trace_node_id); |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 void AddressToTraceMap::Clear() { | 146 void AddressToTraceMap::Clear() { |
147 ranges_.clear(); | 147 ranges_.clear(); |
148 } | 148 } |
149 | 149 |
150 | 150 |
151 void AddressToTraceMap::Print() { | 151 void AddressToTraceMap::Print() { |
152 PrintF("[AddressToTraceMap (%" PRIuS "): \n", ranges_.size()); | 152 PrintF("[AddressToTraceMap (%" V8_SIZET_PREFIX V8PRIuPTR "): \n", |
| 153 ranges_.size()); |
153 for (RangeMap::iterator it = ranges_.begin(); it != ranges_.end(); ++it) { | 154 for (RangeMap::iterator it = ranges_.begin(); it != ranges_.end(); ++it) { |
154 PrintF("[%p - %p] => %u\n", it->second.start, it->first, | 155 PrintF("[%p - %p] => %u\n", it->second.start, it->first, |
155 it->second.trace_node_id); | 156 it->second.trace_node_id); |
156 } | 157 } |
157 PrintF("]\n"); | 158 PrintF("]\n"); |
158 } | 159 } |
159 | 160 |
160 | 161 |
161 void AddressToTraceMap::RemoveRange(Address start, Address end) { | 162 void AddressToTraceMap::RemoveRange(Address start, Address end) { |
162 RangeMap::iterator it = ranges_.upper_bound(start); | 163 RangeMap::iterator it = ranges_.upper_bound(start); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 const v8::WeakCallbackData<v8::Value, void>& data) { | 332 const v8::WeakCallbackData<v8::Value, void>& data) { |
332 UnresolvedLocation* loc = | 333 UnresolvedLocation* loc = |
333 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); | 334 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); |
334 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); | 335 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); |
335 loc->script_ = Handle<Script>::null(); | 336 loc->script_ = Handle<Script>::null(); |
336 } | 337 } |
337 | 338 |
338 | 339 |
339 } // namespace internal | 340 } // namespace internal |
340 } // namespace v8 | 341 } // namespace v8 |
OLD | NEW |