Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 579af7aebd442e4c346d1bc65dcc56d75b1b8073..ee9e03f119a79e431c887f18e37804d9c9991021 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -7325,33 +7325,11 @@ int CpuProfile::GetSamplesCount() const { |
} |
-int CpuProfiler::GetProfilesCount() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::CpuProfiler::GetProfilesCount"); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- ASSERT(profiler != NULL); |
- return profiler->GetProfilesCount(); |
-} |
- |
- |
int CpuProfiler::GetProfileCount() { |
return reinterpret_cast<i::CpuProfiler*>(this)->GetProfilesCount(); |
} |
-const CpuProfile* CpuProfiler::GetProfile(int index, |
- Handle<Value> security_token) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::CpuProfiler::GetProfile"); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- ASSERT(profiler != NULL); |
- return reinterpret_cast<const CpuProfile*>( |
- profiler->GetProfile( |
- security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token), |
- index)); |
-} |
- |
- |
const CpuProfile* CpuProfiler::GetCpuProfile(int index, |
Handle<Value> security_token) { |
return reinterpret_cast<const CpuProfile*>( |
@@ -7367,19 +7345,6 @@ const CpuProfile* CpuProfiler::GetCpuProfile(int index) { |
} |
-const CpuProfile* CpuProfiler::FindProfile(unsigned uid, |
- Handle<Value> security_token) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::CpuProfiler::FindProfile"); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- ASSERT(profiler != NULL); |
- return reinterpret_cast<const CpuProfile*>( |
- profiler->FindProfile( |
- security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token), |
- uid)); |
-} |
- |
- |
const CpuProfile* CpuProfiler::FindCpuProfile(unsigned uid, |
Handle<Value> security_token) { |
return reinterpret_cast<const CpuProfile*>( |
@@ -7389,34 +7354,12 @@ const CpuProfile* CpuProfiler::FindCpuProfile(unsigned uid, |
} |
-void CpuProfiler::StartProfiling(Handle<String> title, bool record_samples) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::CpuProfiler::StartProfiling"); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- ASSERT(profiler != NULL); |
- profiler->StartProfiling(*Utils::OpenHandle(*title), record_samples); |
-} |
- |
- |
void CpuProfiler::StartCpuProfiling(Handle<String> title, bool record_samples) { |
reinterpret_cast<i::CpuProfiler*>(this)->StartProfiling( |
*Utils::OpenHandle(*title), record_samples); |
} |
-const CpuProfile* CpuProfiler::StopProfiling(Handle<String> title, |
- Handle<Value> security_token) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::CpuProfiler::StopProfiling"); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- ASSERT(profiler != NULL); |
- return reinterpret_cast<const CpuProfile*>( |
- profiler->StopProfiling( |
- security_token.IsEmpty() ? NULL : *Utils::OpenHandle(*security_token), |
- *Utils::OpenHandle(*title))); |
-} |
- |
- |
const CpuProfile* CpuProfiler::StopCpuProfiling(Handle<String> title, |
Handle<Value> security_token) { |
return reinterpret_cast<const CpuProfile*>( |
@@ -7434,15 +7377,6 @@ const CpuProfile* CpuProfiler::StopCpuProfiling(Handle<String> title) { |
} |
-void CpuProfiler::DeleteAllProfiles() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::CpuProfiler::DeleteAllProfiles"); |
- i::CpuProfiler* profiler = isolate->cpu_profiler(); |
- ASSERT(profiler != NULL); |
- profiler->DeleteAllProfiles(); |
-} |
- |
- |
void CpuProfiler::DeleteAllCpuProfiles() { |
reinterpret_cast<i::CpuProfiler*>(this)->DeleteAllProfiles(); |
} |
@@ -7576,13 +7510,6 @@ void HeapSnapshot::Delete() { |
} |
-HeapSnapshot::Type HeapSnapshot::GetType() const { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapSnapshot::GetType"); |
- return kFull; |
-} |
- |
- |
unsigned HeapSnapshot::GetUid() const { |
i::Isolate* isolate = i::Isolate::Current(); |
IsDeadCheck(isolate, "v8::HeapSnapshot::GetUid"); |
@@ -7653,72 +7580,29 @@ void HeapSnapshot::Serialize(OutputStream* stream, |
} |
-int HeapProfiler::GetSnapshotsCount() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshotsCount"); |
- return isolate->heap_profiler()->GetSnapshotsCount(); |
-} |
- |
- |
int HeapProfiler::GetSnapshotCount() { |
return reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshotsCount(); |
} |
-const HeapSnapshot* HeapProfiler::GetSnapshot(int index) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshot"); |
- return reinterpret_cast<const HeapSnapshot*>( |
- isolate->heap_profiler()->GetSnapshot(index)); |
-} |
- |
- |
const HeapSnapshot* HeapProfiler::GetHeapSnapshot(int index) { |
return reinterpret_cast<const HeapSnapshot*>( |
reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshot(index)); |
} |
-const HeapSnapshot* HeapProfiler::FindSnapshot(unsigned uid) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::FindSnapshot"); |
- return reinterpret_cast<const HeapSnapshot*>( |
- isolate->heap_profiler()->FindSnapshot(uid)); |
-} |
- |
- |
const HeapSnapshot* HeapProfiler::FindHeapSnapshot(unsigned uid) { |
return reinterpret_cast<const HeapSnapshot*>( |
reinterpret_cast<i::HeapProfiler*>(this)->FindSnapshot(uid)); |
} |
-SnapshotObjectId HeapProfiler::GetSnapshotObjectId(Handle<Value> value) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::GetSnapshotObjectId"); |
- i::Handle<i::Object> obj = Utils::OpenHandle(*value); |
- return isolate->heap_profiler()->GetSnapshotObjectId(obj); |
-} |
- |
- |
SnapshotObjectId HeapProfiler::GetObjectId(Handle<Value> value) { |
i::Handle<i::Object> obj = Utils::OpenHandle(*value); |
return reinterpret_cast<i::HeapProfiler*>(this)->GetSnapshotObjectId(obj); |
} |
-const HeapSnapshot* HeapProfiler::TakeSnapshot(Handle<String> title, |
- HeapSnapshot::Type type, |
- ActivityControl* control, |
- ObjectNameResolver* resolver) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::TakeSnapshot"); |
- return reinterpret_cast<const HeapSnapshot*>( |
- isolate->heap_profiler()->TakeSnapshot( |
- *Utils::OpenHandle(*title), control, resolver)); |
-} |
- |
- |
const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( |
Handle<String> title, |
ActivityControl* control, |
@@ -7729,61 +7613,26 @@ const HeapSnapshot* HeapProfiler::TakeHeapSnapshot( |
} |
-void HeapProfiler::StartHeapObjectsTracking() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::StartHeapObjectsTracking"); |
- isolate->heap_profiler()->StartHeapObjectsTracking(); |
-} |
- |
- |
void HeapProfiler::StartTrackingHeapObjects() { |
reinterpret_cast<i::HeapProfiler*>(this)->StartHeapObjectsTracking(); |
} |
-void HeapProfiler::StopHeapObjectsTracking() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::StopHeapObjectsTracking"); |
- isolate->heap_profiler()->StopHeapObjectsTracking(); |
-} |
- |
- |
void HeapProfiler::StopTrackingHeapObjects() { |
reinterpret_cast<i::HeapProfiler*>(this)->StopHeapObjectsTracking(); |
} |
-SnapshotObjectId HeapProfiler::PushHeapObjectsStats(OutputStream* stream) { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::PushHeapObjectsStats"); |
- return isolate->heap_profiler()->PushHeapObjectsStats(stream); |
-} |
- |
- |
SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream) { |
return reinterpret_cast<i::HeapProfiler*>(this)->PushHeapObjectsStats(stream); |
} |
-void HeapProfiler::DeleteAllSnapshots() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- IsDeadCheck(isolate, "v8::HeapProfiler::DeleteAllSnapshots"); |
- isolate->heap_profiler()->DeleteAllSnapshots(); |
-} |
- |
- |
void HeapProfiler::DeleteAllHeapSnapshots() { |
reinterpret_cast<i::HeapProfiler*>(this)->DeleteAllSnapshots(); |
} |
-void HeapProfiler::DefineWrapperClass(uint16_t class_id, |
- WrapperInfoCallback callback) { |
- i::Isolate::Current()->heap_profiler()->DefineWrapperClass(class_id, |
- callback); |
-} |
- |
- |
void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id, |
WrapperInfoCallback callback) { |
reinterpret_cast<i::HeapProfiler*>(this)->DefineWrapperClass(class_id, |
@@ -7791,17 +7640,6 @@ void HeapProfiler::SetWrapperClassInfoProvider(uint16_t class_id, |
} |
-int HeapProfiler::GetPersistentHandleCount() { |
- i::Isolate* isolate = i::Isolate::Current(); |
- return isolate->global_handles()->NumberOfGlobalHandles(); |
-} |
- |
- |
-size_t HeapProfiler::GetMemorySizeUsedByProfiler() { |
- return i::Isolate::Current()->heap_profiler()->GetMemorySizeUsedByProfiler(); |
-} |
- |
- |
size_t HeapProfiler::GetProfilerMemorySize() { |
return reinterpret_cast<i::HeapProfiler*>(this)-> |
GetMemorySizeUsedByProfiler(); |