mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 18:20:04 +00:00
Add trace for ProcessNativeDelete
Signed-off-by: xiongluo <xiongluo@huawei.com> Change-Id: Id129d58dd569ad5aadb6bc5d647cd66d18ae57a5
This commit is contained in:
parent
70aee379a9
commit
fcb0c5846b
@ -533,6 +533,7 @@ JSHandle<JSTaggedValue> EcmaContext::GetAndClearEcmaUncaughtException() const
|
||||
void EcmaContext::ProcessNativeDelete(const WeakRootVisitor &visitor)
|
||||
{
|
||||
auto iterator = cachedConstpools_.begin();
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "Constpools:" + std::to_string(cachedConstpools_.size()));
|
||||
while (iterator != cachedConstpools_.end()) {
|
||||
auto &constpools = iterator->second;
|
||||
auto constpoolIter = constpools.begin();
|
||||
|
@ -478,6 +478,7 @@ void EcmaVM::ProcessReferences(const WeakRootVisitor &visitor)
|
||||
heap_->ResetNativeBindingSize();
|
||||
// array buffer
|
||||
auto iter = nativePointerList_.begin();
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "ProcessNativeDeleteNum:" + std::to_string(nativePointerList_.size()));
|
||||
while (iter != nativePointerList_.end()) {
|
||||
JSNativePointer *object = *iter;
|
||||
auto fwd = visitor(reinterpret_cast<TaggedObject *>(object));
|
||||
|
@ -70,6 +70,8 @@ private:
|
||||
void *externalPointer = GetExternalPointer();
|
||||
DeleteEntryPoint deleter = GetDeleter();
|
||||
if (deleter != nullptr) {
|
||||
ECMA_BYTRACE_NAME(HITRACE_TAG_ARK, "ExternalDelete"
|
||||
+ std::to_string(reinterpret_cast<uintptr_t>(deleter)));
|
||||
deleter(externalPointer, GetData());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user