use of com.oracle.truffle.tools.chromeinspector.TruffleProfiler in project graal by oracle.
the class WebSocketServer method openWebSocket.
@Override
protected NanoWSD.WebSocket openWebSocket(NanoHTTPD.IHTTPSession handshake) {
String descriptor = handshake.getUri();
TruffleExecutionContext context = SESSIONS.get(descriptor);
if (log != null) {
log.println("CLIENT ws connection opened, resource = " + descriptor + ", context = " + context);
log.flush();
}
if (context != null) {
boolean debugBreak = DEBUG_BRK.get(descriptor);
RuntimeDomain runtime = new TruffleRuntime(context);
DebuggerDomain debugger = new TruffleDebugger(context, debugBreak);
ProfilerDomain profiler = new TruffleProfiler(context);
InspectServerSession iss = new InspectServerSession(runtime, debugger, profiler, context);
return new InspectWebSocket(handshake, iss, log);
} else {
return new ClosedWebSocket(handshake);
}
}
use of com.oracle.truffle.tools.chromeinspector.TruffleProfiler in project graal by oracle.
the class InspectorTestInstrument method onCreate.
@Override
protected void onCreate(Env env) {
TruffleExecutionContext context = TruffleExecutionContext.create("test", env, new PrintWriter(env.err()));
TruffleRuntime runtime = new TruffleRuntime(context);
TruffleDebugger debugger = new TruffleDebugger(context, suspend);
TruffleProfiler profiler = new TruffleProfiler(context);
InspectServerSession iss = new InspectServerSession(runtime, debugger, profiler, context);
env.registerService(iss);
env.registerService(context.getId());
}
Aggregations