Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348190

Framework for tracing makefile inclusion and parsing

XMLWordPrintable

    • b09
    • Fix failed

      Currently, it is very hard to understand which makefiles include which other makefiles, and in what order.

      By introducing a framework to keep track of makefile execution, we can present a clear log showing how makefiles are read and parsed. With a simple follow-up addition, we will also be able to track the time spent parsing each individual makefile. That way we can get a performance measurement to see if any specific makefile is responsible for too large make parsing times.

      As an added bonus, this will also simplify the boilerplate needed for each makefile.

      The log might look something like this:

      :Entering Main.gmk
      :____Entering common/MakeBase.gmk
      :________ Entering common/Utils.gmk
      :________ Exiting common/Utils.gmk
      :________ Entering common/FileUtils.gmk
      :________ Exiting common/FileUtils.gmk
      :____Exiting common/MakeBase.gmk
      :____Entering common/FindTests.gmk
      :____Exiting common/FindTests.gmk
      :____Entering common/Modules.gmk
      :____Exiting common/Modules.gmk
      :Exiting Main.gmk

      but with space instead of _; added since JBS does not preserve spaces :-(

            ihse Magnus Ihse Bursie
            ihse Magnus Ihse Bursie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: