You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the inspector agent and a possible tracing writer are per-Environment on Node’s side. However, as far as I can tell, on the V8 side they are fundamentally per-Isolate and per-Platform, respectively.
So, my question for @nodejs/v8-inspector @nodejs/trace-events here is:
Should we move the Inspector handle and CLI debug options from Environment to IsolateData?
Should we move the tracing handle and corresponding CLI options to a global/per-process model?
@eugeneo, Tracing is global, Tracing domain on the root target should handle tracing for everything, including workers. There should be no tracing agents on the workers. Tracing started event should be propagated to all the isolates (workers) so that tracing controller singleton was capturing all the samples from all of them. This functionality would be typically implemented in the tracing controller with the Tracing domain being an interfacing shim sitting on top of it.
Are there any cases when there are multiple isolates for one environment?
@eugeneo There can be multiple Environments for a single Isolate. Since currently inspector Agents and Environments are 1:1, I guess the question is, do multiple Agents per Isolate conflict with each other?
Activity
jasnell commentedon Aug 25, 2018
Yes, tracing should be global/per-Platform in the current implementation. Whether or not that makes sense long term I don't know. /cc @ofrobots
eugeneo commentedon Aug 25, 2018
Inspector agent is per-"target" - i.e. workers have their own instance. Are there any cases when there are multiple isolates for one environment?
IMHO, inspector Agent does not need to know about CLI options at all.
pavelfeldman commentedon Aug 25, 2018
@eugeneo, Tracing is global, Tracing domain on the root target should handle tracing for everything, including workers. There should be no tracing agents on the workers. Tracing started event should be propagated to all the isolates (workers) so that tracing controller singleton was capturing all the samples from all of them. This functionality would be typically implemented in the tracing controller with the Tracing domain being an interfacing shim sitting on top of it.
addaleax commentedon Aug 25, 2018
@eugeneo There can be multiple
Environments for a singleIsolate. Since currently inspectorAgents andEnvironments are 1:1, I guess the question is, do multipleAgents perIsolateconflict with each other?pavelfeldman commentedon Aug 25, 2018
they don't in chrome, but it requires proper context goup management. @ak239 would know if we already do that in node.
src: remove `Environment::tracing_agent_writer()`
trace_events: forbid tracing modifications from worker threads
src: remove `Environment::tracing_agent_writer()`
trace_events: forbid tracing modifications from worker threads
src: remove `Environment::tracing_agent_writer()`
trace_events: forbid tracing modifications from worker threads
src: remove `Environment::tracing_agent_writer()`
trace_events: forbid tracing modifications from worker threads
addaleax commentedon Feb 14, 2019
This is answered as far as I am concerned, thanks!