Interface JavacEventSink

  • All Known Implementing Classes:
    JavacEventSinkToBuckEventBusBridge

    public interface JavacEventSink
    This is an abstraction on top of event bus. For various places we need to have a unified code that will work for both in process and out of process javac. We can't transfer event bus to another process, but we can abstract it and then re-fill the main process' event bus with events.
    • Method Detail

      • reportCompilerPluginStarted

        void reportCompilerPluginStarted​(BuildTarget buildTarget,
                                         String pluginName,
                                         String durationName,
                                         com.google.common.collect.ImmutableMap<String,​String> args)
      • reportCompilerPluginFinished

        void reportCompilerPluginFinished​(BuildTarget buildTarget,
                                          com.google.common.collect.ImmutableMap<String,​String> args)
      • reportJavacPhaseStarted

        void reportJavacPhaseStarted​(BuildTarget buildTarget,
                                     String phase,
                                     com.google.common.collect.ImmutableMap<String,​String> args)
      • reportJavacPhaseFinished

        void reportJavacPhaseFinished​(BuildTarget buildTarget,
                                      String phase,
                                      com.google.common.collect.ImmutableMap<String,​String> args)
      • reportAnnotationProcessingEventStarted

        void reportAnnotationProcessingEventStarted​(BuildTarget buildTarget,
                                                    String annotationProcessorName,
                                                    String operation,
                                                    int round,
                                                    boolean isLastRound)
      • reportAnnotationProcessingEventFinished

        void reportAnnotationProcessingEventFinished​(BuildTarget buildTarget,
                                                     String annotationProcessorName,
                                                     String operation,
                                                     int round,
                                                     boolean isLastRound)
      • startSimplePerfEvent

        void startSimplePerfEvent​(String name,
                                  long uniqueKey)
        There could be several perf events with the same name. Since event sink can't pass started events into finished events, we use some shared key between started and finished. This allows us to reconstruct started-finished pairs later.
        Parameters:
        name - Name of event. This should match in both Start and Stop method calls.
        uniqueKey - Unique key. This should match in both Start and Stop method calls.
      • stopSimplePerfEvent

        void stopSimplePerfEvent​(long uniqueKey)
        Parameters:
        uniqueKey - Unique key. This should match in both Start and Stop method calls.