| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 (%" PRIuS "): \n", ranges_.size()); |
| 153 for (RangeMap::iterator it = ranges_.begin(); it != ranges_.end(); ++it) { | 153 for (RangeMap::iterator it = ranges_.begin(); it != ranges_.end(); ++it) { |
| 154 PrintF("[%p - %p] => %u\n", it->second.start, it->first, | 154 PrintF("[%p - %p] => %u\n", static_cast<void*>(it->second.start), |
| 155 it->second.trace_node_id); | 155 static_cast<void*>(it->first), it->second.trace_node_id); |
| 156 } | 156 } |
| 157 PrintF("]\n"); | 157 PrintF("]\n"); |
| 158 } | 158 } |
| 159 | 159 |
| 160 | 160 |
| 161 void AddressToTraceMap::RemoveRange(Address start, Address end) { | 161 void AddressToTraceMap::RemoveRange(Address start, Address end) { |
| 162 RangeMap::iterator it = ranges_.upper_bound(start); | 162 RangeMap::iterator it = ranges_.upper_bound(start); |
| 163 if (it == ranges_.end()) return; | 163 if (it == ranges_.end()) return; |
| 164 | 164 |
| 165 RangeStack prev_range(0, 0); | 165 RangeStack prev_range(0, 0); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 const v8::WeakCallbackInfo<void>& data) { | 329 const v8::WeakCallbackInfo<void>& data) { |
| 330 UnresolvedLocation* loc = | 330 UnresolvedLocation* loc = |
| 331 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); | 331 reinterpret_cast<UnresolvedLocation*>(data.GetParameter()); |
| 332 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); | 332 GlobalHandles::Destroy(reinterpret_cast<Object**>(loc->script_.location())); |
| 333 loc->script_ = Handle<Script>::null(); | 333 loc->script_ = Handle<Script>::null(); |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 } // namespace internal | 337 } // namespace internal |
| 338 } // namespace v8 | 338 } // namespace v8 |
| OLD | NEW |