Skip to content

Commit 37391f9

Browse files
committed
[GR-27551] Dummy implementation of some methods of V8 profiling API.
PullRequest: js/1986
2 parents 281b81e + 13f711d commit 37391f9

File tree

1 file changed

+53
-0
lines changed
  • graal-nodejs/deps/v8/src/graal

1 file changed

+53
-0
lines changed

graal-nodejs/deps/v8/src/graal/v8.cc

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,25 @@ namespace v8 {
452452
return nullptr;
453453
}
454454

455+
SnapshotObjectId HeapProfiler::GetHeapStats(OutputStream* stream, int64_t* timestamp_us) {
456+
TRACE
457+
stream->WriteAsciiChunk(nullptr, 0);
458+
stream->EndOfStream();
459+
return 0;
460+
}
461+
462+
SnapshotObjectId HeapProfiler::GetObjectId(Local<Value> value) {
463+
TRACE
464+
return kUnknownObjectId;
465+
}
466+
467+
void HeapProfiler::StopTrackingHeapObjects() {
468+
TRACE
469+
}
470+
455471
void HeapSnapshot::Serialize(OutputStream* stream, SerializationFormat format) const {
472+
stream->WriteAsciiChunk("\"unsupported\"", 13);
473+
stream->EndOfStream();
456474
TRACE
457475
}
458476

@@ -470,6 +488,11 @@ namespace v8 {
470488
return nullptr;
471489
}
472490

491+
SnapshotObjectId HeapSnapshot::GetMaxSnapshotJSObjectId() const {
492+
TRACE
493+
return 0;
494+
}
495+
473496
SnapshotObjectId HeapGraphNode::GetId() const {
474497
TRACE
475498
return 0;
@@ -490,6 +513,11 @@ namespace v8 {
490513
return 0;
491514
}
492515

516+
Local<String> HeapGraphNode::GetName() const {
517+
TRACE
518+
return String::NewFromUtf8Literal(Isolate::GetCurrent(), "unknown");
519+
}
520+
493521
void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
494522
GraalIsolate* graal_isolate = reinterpret_cast<GraalIsolate*> (this);
495523
graal_isolate->ResetSharedBuffer();
@@ -3261,6 +3289,11 @@ namespace v8 {
32613289
TRACE
32623290
}
32633291

3292+
int CpuProfile::GetSamplesCount() const {
3293+
TRACE
3294+
return 0;
3295+
}
3296+
32643297
const CpuProfileNode* CpuProfile::GetTopDownRoot() const {
32653298
TRACE
32663299
return nullptr;
@@ -3301,6 +3334,26 @@ namespace v8 {
33013334
return String::NewFromUtf8Literal(Isolate::GetCurrent(), "unknown");
33023335
}
33033336

3337+
const char* CpuProfileNode::GetBailoutReason() const {
3338+
TRACE
3339+
return "unknown";
3340+
}
3341+
3342+
unsigned CpuProfileNode::GetNodeId() const {
3343+
TRACE
3344+
return 0;
3345+
}
3346+
3347+
unsigned int CpuProfileNode::GetHitLineCount() const {
3348+
TRACE
3349+
return 0;
3350+
}
3351+
3352+
bool CpuProfileNode::GetLineTicks(LineTick* entries, unsigned int length) const {
3353+
TRACE
3354+
return false;
3355+
}
3356+
33043357
SnapshotCreator::SnapshotCreator(Isolate* isolate, const intptr_t* external_references, StartupData* existing_blob) {
33053358
TRACE
33063359
}

0 commit comments

Comments
 (0)