add profiling parameters to the right part of the classpath (has been broken after Launcher was introduced)

This commit is contained in:
Eugene Zhuravlev
2014-01-21 18:17:05 +04:00
parent 3234c0b77f
commit 0f41580845
@@ -100,8 +100,7 @@ import org.jetbrains.jps.cmdline.ClasspathBootstrap;
import org.jetbrains.jps.incremental.Utils;
import org.jetbrains.jps.model.serialization.JpsGlobalLoader;
import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;
import javax.tools.*;
import java.awt.*;
import java.io.File;
import java.io.IOException;
@@ -878,7 +877,11 @@ public class BuildManager implements ApplicationComponent{
cmdLine.addParameter(option);
}
}
if (isProfilingMode) {
cmdLine.addParameter("-agentlib:yjpagent=disablej2ee,disablealloc,delay=10000,sessionname=ExternalBuild");
}
// debugging
final int debugPort = Registry.intValue("compiler.process.debug.port");
if (debugPort > 0) {
@@ -933,7 +936,6 @@ public class BuildManager implements ApplicationComponent{
cp.addAll(myClasspathManager.getBuildProcessPluginsClasspath(project));
if (isProfilingMode) {
cp.add(new File(workDirectory, "yjp-controller-api-redist.jar").getPath());
cmdLine.addParameter("-agentlib:yjpagent=disablej2ee,disablealloc,delay=10000,sessionname=ExternalBuild");
}
cmdLine.addParameter(classpathToString(cp));