mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-12-02 16:07:20 +00:00
commit
0ad9ef9f48
@ -163,7 +163,7 @@ void HeapProfiler::DumpHeapSnapshot([[maybe_unused]] DumpFormat dumpFormat, [[ma
|
||||
}
|
||||
FileDescriptorStream stream(fd);
|
||||
DumpHeapSnapshot(
|
||||
dumpFormat, &stream, nullptr, isVmMode, isPrivate, captureNumericValue, isFullGC, isSimplify, isSync);
|
||||
dumpFormat, &stream, nullptr, isVmMode, isPrivate, captureNumericValue, isFullGC, isSimplify, isSync, false);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ void HeapProfiler::FillIdMap()
|
||||
|
||||
bool HeapProfiler::DumpHeapSnapshot(DumpFormat dumpFormat, Stream *stream, Progress *progress,
|
||||
bool isVmMode, bool isPrivate, bool captureNumericValue,
|
||||
bool isFullGC, bool isSimplify, bool isSync)
|
||||
bool isFullGC, bool isSimplify, bool isSync, bool isBeforeFill)
|
||||
{
|
||||
bool res = false;
|
||||
base::BlockHookScope blockScope;
|
||||
@ -290,11 +290,13 @@ bool HeapProfiler::DumpHeapSnapshot(DumpFormat dumpFormat, Stream *stream, Progr
|
||||
DISALLOW_GARBAGE_COLLECTION;
|
||||
const_cast<Heap *>(vm_->GetHeap())->Prepare();
|
||||
}
|
||||
Runtime::GetInstance()->GCIterateThreadList([&](JSThread *thread) {
|
||||
ASSERT(!thread->IsInRunningState());
|
||||
const_cast<Heap*>(thread->GetEcmaVM()->GetHeap())->FillBumpPointerForTlab();
|
||||
});
|
||||
FillIdMap();
|
||||
if (isBeforeFill) {
|
||||
Runtime::GetInstance()->GCIterateThreadList([&](JSThread *thread) {
|
||||
ASSERT(!thread->IsInRunningState());
|
||||
const_cast<Heap*>(thread->GetEcmaVM()->GetHeap())->FillBumpPointerForTlab();
|
||||
});
|
||||
FillIdMap();
|
||||
}
|
||||
// fork
|
||||
if ((pid = ForkBySyscall()) < 0) {
|
||||
LOG_ECMA(ERROR) << "DumpHeapSnapshot fork failed!";
|
||||
|
@ -90,7 +90,8 @@ public:
|
||||
*/
|
||||
bool DumpHeapSnapshot(DumpFormat dumpFormat, Stream *stream, Progress *progress = nullptr,
|
||||
bool isVmMode = true, bool isPrivate = false, bool captureNumericValue = false,
|
||||
bool isFullGC = true, bool isSimplify = false, bool isSync = true) override;
|
||||
bool isFullGC = true, bool isSimplify = false, bool isSync = true,
|
||||
bool isBeforeFill = true) override;
|
||||
void DumpHeapSnapshot(DumpFormat dumpFormat, bool isVmMode = true, bool isPrivate = false,
|
||||
bool captureNumericValue = false, bool isFullGC = true,
|
||||
bool isSimplify = false, bool isSync = true) override;
|
||||
|
@ -42,7 +42,8 @@ public:
|
||||
virtual void MoveEvent(uintptr_t address, TaggedObject *forwardAddress, size_t size)= 0;
|
||||
virtual bool DumpHeapSnapshot(DumpFormat dumpFormat, Stream *stream, Progress *progress = nullptr,
|
||||
bool isVmMode = true, bool isPrivate = false, bool captureNumericValue = false,
|
||||
bool isFullGC = true, bool isSimplify = false, bool isSync = true) = 0;
|
||||
bool isFullGC = true, bool isSimplify = false, bool isSync = true,
|
||||
bool isBeforeFill = true) = 0;
|
||||
// Provide an internal interface for oom dump.
|
||||
virtual void DumpHeapSnapshot(DumpFormat dumpFormat, bool isVmMode = true, bool isPrivate = false,
|
||||
bool captureNumericValue = false, bool isFullGC = true,
|
||||
|
@ -90,10 +90,11 @@ public:
|
||||
|
||||
bool DumpHeapSnapshot(DumpFormat dumpFormat, Stream *stream, Progress *progress = nullptr,
|
||||
bool isVmMode = true, bool isPrivate = false, bool captureNumericValue = false,
|
||||
bool isFullGC = true, bool isSimplify = false, bool isSync = false) override
|
||||
bool isFullGC = true, bool isSimplify = false, bool isSync = false,
|
||||
bool isBeforeFill = true) override
|
||||
{
|
||||
return profiler_->DumpHeapSnapshot(dumpFormat, stream, progress, isVmMode, isPrivate, captureNumericValue,
|
||||
isFullGC, isSimplify, isSync);
|
||||
isFullGC, isSimplify, isSync, isBeforeFill);
|
||||
}
|
||||
|
||||
void DumpHeapSnapshot(DumpFormat dumpFormat, bool isVmMode = true, bool isPrivate = false,
|
||||
|
Loading…
Reference in New Issue
Block a user