Skip to content

Commit

Permalink
Merge pull request #319 from nkcsgexi/log-batch-config
Browse files Browse the repository at this point in the history
BatchMode: log batch configurations when -driver-show-job-lifecycle is set. NFC
  • Loading branch information
nkcsgexi committed Oct 19, 2020
2 parents c57cd5c + 87e1865 commit f6161b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/SwiftDriver/Jobs/Planning.swift
Expand Up @@ -175,6 +175,15 @@ extension Driver {
addJobOutputs: ([TypedVirtualPath]) -> Void)
throws {
let partitions = batchPartitions()
// Log life cycle for added batch job
if parsedOptions.hasArgument(.driverShowJobLifecycle) {
for input in inputFiles {
if let idx = partitions?.assignment[input] {
stdoutStream.write("Adding {compile: \(input.file.basename)} to batch \(idx)\n")
stdoutStream.flush()
}
}
}
for (index, input) in inputFiles.enumerated() {
// Only emit a loaded module trace from the first frontend job.
let emitModuleTrace = (index == inputFiles.startIndex) && (loadedModuleTracePath != nil)
Expand Down Expand Up @@ -215,6 +224,7 @@ extension Driver {

if parsedOptions.hasArgument(.driverShowJobLifecycle) {
stdoutStream.write("Forming batch job from \(partition.count) constituents\n")
stdoutStream.flush()
}

primaryInputs = partitions.partitions[partitionIdx]
Expand Down

0 comments on commit f6161b0

Please sign in to comment.