godmodelabs / ejecta-v8

A port of @phoboslabs EjectaJS which uses v8 instead of JavaScriptCore.
http://godmodelabs.github.io/ejecta-v8/
85 stars 16 forks source link

Implemented V8 locker logger #50

Closed not-implemented closed 2 years ago

not-implemented commented 2 years ago

For analyzing locks from v8::Locker, we implemented a wrapper class, that can be activated via V8_LOCK_LOGGING in BGJSV8Engine.h. Runtime-Overhead in C++ should be zero when not activated.

For more detailled JAVA-level context, V8Engine::runLocked accepts an optional parameter - additional stack info can be activated in V8Engine.java@runLocked (commented out by default).

More info from stack trace can be activated in JNIV8Function::callAsV8Function (commented out by default).

Runtime-Overhead on JAVA level should be very minimal when disabled (just passing an additional string to function)