Remove operations tracer from compile() interface
This commit is contained in:
+1
-2
@@ -140,8 +140,7 @@ interface CompileService : Remote {
|
|||||||
targetPlatform: TargetPlatform,
|
targetPlatform: TargetPlatform,
|
||||||
compilerArguments: CommonCompilerArguments,
|
compilerArguments: CommonCompilerArguments,
|
||||||
additionalCompilerArguments: AdditionalCompilerArguments,
|
additionalCompilerArguments: AdditionalCompilerArguments,
|
||||||
servicesFacade: CompilerServicesFacadeBase,
|
servicesFacade: CompilerServicesFacadeBase
|
||||||
operationsTracer: RemoteOperationsTracer?
|
|
||||||
): CallResult<Int>
|
): CallResult<Int>
|
||||||
|
|
||||||
@Throws(RemoteException::class)
|
@Throws(RemoteException::class)
|
||||||
|
|||||||
@@ -327,8 +327,7 @@ class CompileServiceImpl(
|
|||||||
targetPlatform: CompileService.TargetPlatform,
|
targetPlatform: CompileService.TargetPlatform,
|
||||||
compilerArguments: CommonCompilerArguments,
|
compilerArguments: CommonCompilerArguments,
|
||||||
additionalCompilerArguments: AdditionalCompilerArguments,
|
additionalCompilerArguments: AdditionalCompilerArguments,
|
||||||
servicesFacade: CompilerServicesFacadeBase,
|
servicesFacade: CompilerServicesFacadeBase
|
||||||
operationsTracer: RemoteOperationsTracer?
|
|
||||||
): CompileService.CallResult<Int> {
|
): CompileService.CallResult<Int> {
|
||||||
val messageCollector = CompileServicesFacadeMessageCollector(servicesFacade, additionalCompilerArguments)
|
val messageCollector = CompileServicesFacadeMessageCollector(servicesFacade, additionalCompilerArguments)
|
||||||
val serviceReporter = CompileServiceReporterImpl(servicesFacade, additionalCompilerArguments)
|
val serviceReporter = CompileServiceReporterImpl(servicesFacade, additionalCompilerArguments)
|
||||||
@@ -337,13 +336,13 @@ class CompileServiceImpl(
|
|||||||
CompileService.CompilerMode.JPS_COMPILER -> {
|
CompileService.CompilerMode.JPS_COMPILER -> {
|
||||||
val jpsServicesFacade = servicesFacade as JpsCompilerServicesFacade
|
val jpsServicesFacade = servicesFacade as JpsCompilerServicesFacade
|
||||||
|
|
||||||
doCompile(sessionId, serviceReporter, operationsTracer) { eventManger, profiler ->
|
doCompile(sessionId, serviceReporter, tracer = null) { eventManger, profiler ->
|
||||||
val services = createCompileServices(jpsServicesFacade, eventManger, profiler)
|
val services = createCompileServices(jpsServicesFacade, eventManger, profiler)
|
||||||
execCompiler(targetPlatform, services, compilerArguments, messageCollector)
|
execCompiler(targetPlatform, services, compilerArguments, messageCollector)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CompileService.CompilerMode.NON_INCREMENTAL_COMPILER -> {
|
CompileService.CompilerMode.NON_INCREMENTAL_COMPILER -> {
|
||||||
doCompile(sessionId, serviceReporter, operationsTracer) { eventManger, profiler ->
|
doCompile(sessionId, serviceReporter, tracer = null) { eventManger, profiler ->
|
||||||
execCompiler(targetPlatform, Services.EMPTY, compilerArguments, messageCollector)
|
execCompiler(targetPlatform, Services.EMPTY, compilerArguments, messageCollector)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -357,7 +356,7 @@ class CompileServiceImpl(
|
|||||||
val gradleIncrementalServicesFacade = servicesFacade as IncrementalCompilerServicesFacade
|
val gradleIncrementalServicesFacade = servicesFacade as IncrementalCompilerServicesFacade
|
||||||
|
|
||||||
withIC {
|
withIC {
|
||||||
doCompile(sessionId, serviceReporter, operationsTracer) { eventManger, profiler ->
|
doCompile(sessionId, serviceReporter, tracer = null) { eventManger, profiler ->
|
||||||
execIncrementalCompiler(k2jvmArgs, gradleIncrementalArgs, gradleIncrementalServicesFacade, messageCollector)
|
execIncrementalCompiler(k2jvmArgs, gradleIncrementalArgs, gradleIncrementalServicesFacade, messageCollector)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -678,11 +677,11 @@ class CompileServiceImpl(
|
|||||||
|
|
||||||
private fun doCompile(sessionId: Int,
|
private fun doCompile(sessionId: Int,
|
||||||
compileServiceReporter: CompileServiceReporter,
|
compileServiceReporter: CompileServiceReporter,
|
||||||
operationsTracer: RemoteOperationsTracer?,
|
tracer: RemoteOperationsTracer?,
|
||||||
body: (EventManger, Profiler) -> ExitCode): CompileService.CallResult<Int> =
|
body: (EventManger, Profiler) -> ExitCode): CompileService.CallResult<Int> =
|
||||||
ifAlive {
|
ifAlive {
|
||||||
withValidClientOrSessionProxy(sessionId) { session ->
|
withValidClientOrSessionProxy(sessionId) { session ->
|
||||||
operationsTracer?.before("compile")
|
tracer?.before("compile")
|
||||||
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
|
val rpcProfiler = if (daemonOptions.reportPerf) WallAndThreadTotalProfiler() else DummyProfiler()
|
||||||
val eventManger = EventMangerImpl()
|
val eventManger = EventMangerImpl()
|
||||||
try {
|
try {
|
||||||
@@ -693,7 +692,7 @@ class CompileServiceImpl(
|
|||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
eventManger.fireCompilationFinished()
|
eventManger.fireCompilationFinished()
|
||||||
operationsTracer?.after("compile")
|
tracer?.after("compile")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,8 +105,7 @@ class JpsKotlinCompilerRunner : KotlinCompilerRunner<JpsCompilerEnvironment>() {
|
|||||||
targetPlatform,
|
targetPlatform,
|
||||||
compilerArgs,
|
compilerArgs,
|
||||||
AdditionalCompilerArguments(reportingFilters = getReportingFilters(compilerArgs.verbose)),
|
AdditionalCompilerArguments(reportingFilters = getReportingFilters(compilerArgs.verbose)),
|
||||||
JpsCompilerServicesFacadeImpl(environment),
|
JpsCompilerServicesFacadeImpl(environment))
|
||||||
operationsTracer = null)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return res?.get()?.let { exitCodeFromProcessExitCode(it) }
|
return res?.get()?.let { exitCodeFromProcessExitCode(it) }
|
||||||
|
|||||||
+2
-4
@@ -170,8 +170,7 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
|||||||
targetPlatform,
|
targetPlatform,
|
||||||
environment.compilerArgs,
|
environment.compilerArgs,
|
||||||
AdditionalCompilerArguments(reportingFilters = getNonIncrementalReportingFilters(environment.compilerArgs.verbose)),
|
AdditionalCompilerArguments(reportingFilters = getNonIncrementalReportingFilters(environment.compilerArgs.verbose)),
|
||||||
GradleCompilerServicesFacadeImpl(project, environment.messageCollector),
|
GradleCompilerServicesFacadeImpl(project, environment.messageCollector))
|
||||||
operationsTracer = null)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val exitCode = res?.get()?.let { exitCodeFromProcessExitCode(it) }
|
val exitCode = res?.get()?.let { exitCodeFromProcessExitCode(it) }
|
||||||
@@ -202,8 +201,7 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
|||||||
CompileService.TargetPlatform.JVM,
|
CompileService.TargetPlatform.JVM,
|
||||||
environment.compilerArgs,
|
environment.compilerArgs,
|
||||||
additionalCompilerArguments,
|
additionalCompilerArguments,
|
||||||
GradleIncrementalCompilerServicesFacadeImpl(project, environment),
|
GradleIncrementalCompilerServicesFacadeImpl(project, environment))
|
||||||
operationsTracer = null)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val exitCode = res?.get()?.let { exitCodeFromProcessExitCode(it) }
|
val exitCode = res?.get()?.let { exitCodeFromProcessExitCode(it) }
|
||||||
|
|||||||
Reference in New Issue
Block a user