anchor.diff:          monitor: compiler.dumpInfoTask));
   
       if (shouldGenerateSourceMap) {
  -      mainOutput.add(SourceMapBuilder.generateSourceMapTag(
  -          compiler.options.sourceMapUri, compiler.options.outputUri));
  +      task.measureSubtask('source-maps', () {
  +        mainOutput.add(SourceMapBuilder.generateSourceMapTag(
  +            compiler.options.sourceMapUri, compiler.options.outputUri));
  +      });
       }
   
       mainOutput.close();
   
       if (shouldGenerateSourceMap) {
  -      SourceMapBuilder.outputSourceMap(
  -          mainOutput,
  -          locationCollector,
  -          namer.createMinifiedGlobalNameMap(),
  -          namer.createMinifiedInstanceNameMap(),
  -          '',
  -          compiler.options.sourceMapUri,
  -          compiler.options.outputUri,
  -          compiler.outputProvider);
  +      task.measureSubtask('source-maps', () {
  +        SourceMapBuilder.outputSourceMap(
  +            mainOutput,
  +            locationCollector,
  +            namer.createMinifiedGlobalNameMap(),
  +            namer.createMinifiedInstanceNameMap(),
  +            '',
  +            compiler.options.sourceMapUri,
  +            compiler.options.outputUri,
  +            compiler.outputProvider);
  +      });
       }
     }
   
  
positive.code:     LocationCollector locationCollector;
      List<CodeOutputListener> codeOutputListeners;
      if (shouldGenerateSourceMap) {
        locationCollector = new LocationCollector();
        codeOutputListeners = <CodeOutputListener>[locationCollector];
      }
  
      CodeOutput mainOutput = new StreamCodeOutput(
  
negative.code:         '${deferredInitializersGlobal}.current');
  
      if (shouldGenerateSourceMap) {
        task.measureSubtask('source-maps', () {
          Uri mapUri, partUri;
          Uri sourceMapUri = compiler.options.sourceMapUri;
          Uri outputUri = compiler.options.outputUri;
          String partName = "$hunkPrefix.$partExtension";
          String hunkFileName = "$hunkPrefix.$deferredExtension";
  
          if (sourceMapUri != null) {
            String mapFileName = hunkFileName + ".map";
            List<String> mapSegments = sourceMapUri.pathSegments.toList();
            mapSegments[mapSegments.length - 1] = mapFileName;
            mapUri =
                compiler.options.sourceMapUri.replace(pathSegments: mapSegments);
          }
  
          if (outputUri != null) {
            List<String> partSegments = outputUri.pathSegments.toList();
            partSegments[partSegments.length - 1] = hunkFileName;
            partUri =
                compiler.options.outputUri.replace(pathSegments: partSegments);
          }
  
          output.add(SourceMapBuilder.generateSourceMapTag(mapUri, partUri));
          output.close();
          SourceMapBuilder.outputSourceMap(output, locationCollector, {}, {},
              partName, mapUri, partUri, compiler.outputProvider);
        });
      } else {
        output.close();
      }
  