Skip to content

Commit

Permalink
feat(js): open js profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
zealotchen0 committed Sep 5, 2023
1 parent b3b7df6 commit e424fde
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions driver/js/src/vm/v8/v8_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ V8VM::V8VM(const std::shared_ptr<V8VMInitParam>& param) : VM(param) {
#endif
FOOTSTONE_DLOG(INFO) << "Initialize";
v8::V8::Initialize();
#ifdef ENABLE_INSPECTOR
auto trace = reinterpret_cast<v8::platform::tracing::TracingController*>(platform->GetTracingController());
devtools::DevtoolsDataSource::OnGlobalTracingControlGenerate(trace);
#endif
}
}
create_params_.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
Expand Down
2 changes: 2 additions & 0 deletions framework/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ android {
assert !(INCLUDE_ABI_ARMEABI.toBoolean() && ANDROID_ARM_NEON.toBoolean())
arguments (
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_INSPECTOR=$ENABLE_INSPECTOR",
"-DMODULES=${getAllModules().join(';')}",
*mergeCppDefinitions()
)
Expand Down Expand Up @@ -123,6 +124,7 @@ android {
arguments (
"-DCMAKE_BUILD_TYPE=Debug",
"-DMODULES=${getAllModules().join(';')}",
"-DENABLE_INSPECTOR=$ENABLE_INSPECTOR",
*mergeCppDefinitions()
)

Expand Down
2 changes: 2 additions & 0 deletions framework/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,5 @@ PUBLISH_ARTIFACT_ID=release
# Specifies maven publish group ID
#
PUBLISH_GROUP_ID=com.tencent.hippy

ENABLE_INSPECTOR=true

0 comments on commit e424fde

Please sign in to comment.