| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 6387 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6398 SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Value> value) { | 6398 SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Value> value) { | 
| 6399   i::Isolate* isolate = i::Isolate::Current(); | 6399   i::Isolate* isolate = i::Isolate::Current(); | 
| 6400   IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshotObjectId"); | 6400   IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshotObjectId"); | 
| 6401   i::Handle<i::Object> obj = Utils::OpenHandle(*value); | 6401   i::Handle<i::Object> obj = Utils::OpenHandle(*value); | 
| 6402   return i::HeapProfiler::GetSnapshotObjectId(obj); | 6402   return i::HeapProfiler::GetSnapshotObjectId(obj); | 
| 6403 } | 6403 } | 
| 6404 | 6404 | 
| 6405 | 6405 | 
| 6406 const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title, | 6406 const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title, | 
| 6407                                                HeapSnapshot::Type type, | 6407                                                HeapSnapshot::Type type, | 
| 6408                                                ActivityControl* control) { | 6408                                                ActivityControl* control, | 
|  | 6409                                                ObjectNameResolver* resolver) { | 
| 6409   i::Isolate* isolate = i::Isolate::Current(); | 6410   i::Isolate* isolate = i::Isolate::Current(); | 
| 6410   IsDeadCheck(isolate, "v8::HeapProfiler::TakeSnapshot"); | 6411   IsDeadCheck(isolate, "v8::HeapProfiler::TakeSnapshot"); | 
| 6411   i::HeapSnapshot::Type internal_type = i::HeapSnapshot::kFull; | 6412   i::HeapSnapshot::Type internal_type = i::HeapSnapshot::kFull; | 
| 6412   switch (type) { | 6413   switch (type) { | 
| 6413     case HeapSnapshot::kFull: | 6414     case HeapSnapshot::kFull: | 
| 6414       internal_type = i::HeapSnapshot::kFull; | 6415       internal_type = i::HeapSnapshot::kFull; | 
| 6415       break; | 6416       break; | 
| 6416     default: | 6417     default: | 
| 6417       UNREACHABLE(); | 6418       UNREACHABLE(); | 
| 6418   } | 6419   } | 
| 6419   return reinterpret_cast<const HeapSnapshot*>( | 6420   return reinterpret_cast<const HeapSnapshot*>( | 
| 6420       i::HeapProfiler::TakeSnapshot( | 6421       i::HeapProfiler::TakeSnapshot( | 
| 6421           *Utils::OpenHandle(*title), internal_type, control)); | 6422           *Utils::OpenHandle(*title), internal_type, control, resolver)); | 
| 6422 } | 6423 } | 
| 6423 | 6424 | 
| 6424 | 6425 | 
| 6425 void HeapProfiler::StartHeapObjectsTracking() { | 6426 void HeapProfiler::StartHeapObjectsTracking() { | 
| 6426   i::Isolate* isolate = i::Isolate::Current(); | 6427   i::Isolate* isolate = i::Isolate::Current(); | 
| 6427   IsDeadCheck(isolate, "v8::HeapProfiler::StartHeapObjectsTracking"); | 6428   IsDeadCheck(isolate, "v8::HeapProfiler::StartHeapObjectsTracking"); | 
| 6428   i::HeapProfiler::StartHeapObjectsTracking(); | 6429   i::HeapProfiler::StartHeapObjectsTracking(); | 
| 6429 } | 6430 } | 
| 6430 | 6431 | 
| 6431 | 6432 | 
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6673 | 6674 | 
| 6674   v->VisitPointers(blocks_.first(), first_block_limit_); | 6675   v->VisitPointers(blocks_.first(), first_block_limit_); | 
| 6675 | 6676 | 
| 6676   for (int i = 1; i < blocks_.length(); i++) { | 6677   for (int i = 1; i < blocks_.length(); i++) { | 
| 6677     v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 6678     v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 
| 6678   } | 6679   } | 
| 6679 } | 6680 } | 
| 6680 | 6681 | 
| 6681 | 6682 | 
| 6682 } }  // namespace v8::internal | 6683 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|