Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java

Issue 651243005: Add support for attaching observatory to the server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
index 586230cb239dbaddff6713b15687d266be1d45b0..5c790c6c477b6100b6506159558a916e1247497d 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/internal/remote/StdioServerSocket.java
@@ -46,6 +46,7 @@ public class StdioServerSocket implements AnalysisServerSocket {
private final String analysisServerPath;
private final DebugPrintStream debugStream;
private final boolean debugRemoteProcess;
+ private final boolean profileRemoteProcess;
private RequestSink requestSink;
private ResponseStream responseStream;
private ByteLineReaderStream errorStream;
@@ -58,24 +59,27 @@ public class StdioServerSocket implements AnalysisServerSocket {
private final String packageRoot;
public StdioServerSocket(String runtimePath, String analysisServerPath, String packageRoot,
- DebugPrintStream debugStream, boolean debugRemoteProcess) {
+ DebugPrintStream debugStream, boolean debugRemoteProcess, boolean profileRemoteProcess) {
this(
runtimePath,
analysisServerPath,
packageRoot,
debugStream,
new String[] {},
- debugRemoteProcess);
+ debugRemoteProcess,
+ profileRemoteProcess);
}
public StdioServerSocket(String runtimePath, String analysisServerPath, String packageRoot,
- DebugPrintStream debugStream, String[] additionalProgramArguments, boolean debugRemoteProcess) {
+ DebugPrintStream debugStream, String[] additionalProgramArguments,
+ boolean debugRemoteProcess, boolean profileRemoteProcess) {
this.runtimePath = runtimePath;
this.analysisServerPath = analysisServerPath;
this.packageRoot = packageRoot;
this.debugStream = debugStream;
this.additionalProgramArguments = additionalProgramArguments;
this.debugRemoteProcess = debugRemoteProcess;
+ this.profileRemoteProcess = profileRemoteProcess;
}
@Override
@@ -107,6 +111,10 @@ public class StdioServerSocket implements AnalysisServerSocket {
if (debugRemoteProcess) {
args.add("--debug:" + debugPort);
}
+ if (profileRemoteProcess) {
+ args.add("--observe");
+ args.add("--pause-isolates-on-exit");
+ }
args.add(analysisServerPath);
for (String arg : additionalProgramArguments) {
args.add(arg);

Powered by Google App Engine
This is Rietveld 408576698