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 6471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6482 | 6482 |
6483 Handle<String> CpuProfile::GetTitle() const { | 6483 Handle<String> CpuProfile::GetTitle() const { |
6484 i::Isolate* isolate = i::Isolate::Current(); | 6484 i::Isolate* isolate = i::Isolate::Current(); |
6485 IsDeadCheck(isolate, "v8::CpuProfile::GetTitle"); | 6485 IsDeadCheck(isolate, "v8::CpuProfile::GetTitle"); |
6486 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 6486 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
6487 return Handle<String>(ToApi<String>(isolate->factory()->InternalizeUtf8String( | 6487 return Handle<String>(ToApi<String>(isolate->factory()->InternalizeUtf8String( |
6488 profile->title()))); | 6488 profile->title()))); |
6489 } | 6489 } |
6490 | 6490 |
6491 | 6491 |
6492 const CpuProfileNode* CpuProfile::GetBottomUpRoot() const { | |
6493 i::Isolate* isolate = i::Isolate::Current(); | |
6494 IsDeadCheck(isolate, "v8::CpuProfile::GetBottomUpRoot"); | |
6495 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | |
6496 return reinterpret_cast<const CpuProfileNode*>(profile->bottom_up()->root()); | |
6497 } | |
6498 | |
6499 | |
6500 const CpuProfileNode* CpuProfile::GetTopDownRoot() const { | 6492 const CpuProfileNode* CpuProfile::GetTopDownRoot() const { |
6501 i::Isolate* isolate = i::Isolate::Current(); | 6493 i::Isolate* isolate = i::Isolate::Current(); |
6502 IsDeadCheck(isolate, "v8::CpuProfile::GetTopDownRoot"); | 6494 IsDeadCheck(isolate, "v8::CpuProfile::GetTopDownRoot"); |
6503 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); | 6495 const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this); |
6504 return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root()); | 6496 return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root()); |
6505 } | 6497 } |
6506 | 6498 |
6507 | 6499 |
6508 int CpuProfiler::GetProfilesCount() { | 6500 int CpuProfiler::GetProfilesCount() { |
6509 i::Isolate* isolate = i::Isolate::Current(); | 6501 i::Isolate* isolate = i::Isolate::Current(); |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7068 | 7060 |
7069 v->VisitPointers(blocks_.first(), first_block_limit_); | 7061 v->VisitPointers(blocks_.first(), first_block_limit_); |
7070 | 7062 |
7071 for (int i = 1; i < blocks_.length(); i++) { | 7063 for (int i = 1; i < blocks_.length(); i++) { |
7072 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); | 7064 v->VisitPointers(blocks_[i], &blocks_[i][kHandleBlockSize]); |
7073 } | 7065 } |
7074 } | 7066 } |
7075 | 7067 |
7076 | 7068 |
7077 } } // namespace v8::internal | 7069 } } // namespace v8::internal |
OLD | NEW |