* Returns total (self + children) execution time of the function,
* in milliseconds, estimated by samples count.
*/
- V8_DEPRECATED(double GetTotalTime() const);
+ double GetTotalTime() const;
/**
* Returns self execution time of the function, in milliseconds,
* estimated by samples count.
*/
- V8_DEPRECATED(double GetSelfTime() const);
+ double GetSelfTime() const;
/** Returns the count of samples where function exists. */
- V8_DEPRECATED(double GetTotalSamplesCount() const);
+ double GetTotalSamplesCount() const;
- /** DEPRECATED. Please use GetHitCount instead.
- * Returns the count of samples where function was currently executing.
- */
+ /** Returns the count of samples where function was currently executing. */
double GetSelfSamplesCount() const;
- /**
- * Returns the count of samples where the function was currently executing.
- */
- unsigned GetHitCount() const;
-
/** Returns function entry UID. */
unsigned GetCallUid() const;
int CpuProfileNode::GetScriptId() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptId");
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
const i::CodeEntry* entry = node->entry();
return entry->script_id();
int CpuProfileNode::GetLineNumber() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber");
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
}
}
-unsigned CpuProfileNode::GetHitCount() const {
- return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
-}
-
-
unsigned CpuProfileNode::GetCallUid() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfileNode::GetCallUid");
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->GetCallUid();
}
int CpuProfileNode::GetChildrenCount() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfileNode::GetChildrenCount");
return reinterpret_cast<const i::ProfileNode*>(this)->children()->length();
}
const CpuProfileNode* CpuProfileNode::GetChild(int index) const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfileNode::GetChild");
const i::ProfileNode* child =
reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index);
return reinterpret_cast<const CpuProfileNode*>(child);
unsigned CpuProfile::GetUid() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfile::GetUid");
return reinterpret_cast<const i::CpuProfile*>(this)->uid();
}
const CpuProfileNode* CpuProfile::GetTopDownRoot() const {
+ i::Isolate* isolate = i::Isolate::Current();
+ IsDeadCheck(isolate, "v8::CpuProfile::GetTopDownRoot");
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root());
}
GetChild(root, ProfileGenerator::kProgramEntryName);
CHECK_EQ(0, programNode->GetChildrenCount());
CHECK_GE(programNode->GetSelfSamplesCount(), 3);
- CHECK_GE(programNode->GetHitCount(), 3);
const v8::CpuProfileNode* idleNode =
GetChild(root, ProfileGenerator::kIdleEntryName);
CHECK_EQ(0, idleNode->GetChildrenCount());
CHECK_GE(idleNode->GetSelfSamplesCount(), 3);
- CHECK_GE(idleNode->GetHitCount(), 3);
cpu_profiler->DeleteAllCpuProfiles();
}