Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document internals of invalidation and hook profiler #585

Merged
merged 6 commits into from
Aug 31, 2018

Commits on Aug 26, 2018

  1. Remove stale ClassToSourceMapper functions

    And inline the actual used function in the companion of
    `IncrementalCommon`, with a better and simpler implementation.
    jvican committed Aug 26, 2018
    Configuration menu
    Copy the full SHA
    a813eb9 View commit details
    Browse the repository at this point in the history
  2. Reorganise code in IncrementalCommon and document it

    While I was trying to implement some improvements here, I realize that
    the current code can hardly be read and reused. I struggled as well to
    understand the nitty-gritty of the algorithm as the control flow was not
    clear and the order of functions was confusing.
    
    This commit aims to fix this by reorganising the code to allow for more
    reuse (functions in `IncrementalCommon`'s companion), reorganizes the
    outline of `IncrementalCommon` to have clearer names and structure and
    documents the most important parts of the code with implementation and
    contract details.
    jvican committed Aug 26, 2018
    Configuration menu
    Copy the full SHA
    396713b View commit details
    Browse the repository at this point in the history
  3. Add profiling invalidation utils (zprof)

    zprof is the name I've chosen for this small profiler (or tracker if you
    will) of the invalidation logic. The profiled data is formalized in an
    internal format that is not supposed to be used by normal users, but
    rather by us (Zinc) and related tools (Bloop).
    
    The current profiled data exposes details of how the incremental
    compiler works internally and how it invalidates classes. This is the
    realization of an idea I registered here: sbt#550
    
    With this idea, this data will not only be useful for debugging but for
    providing an automatic way of reporting bugs in Zinc. The infrastructure
    is far from finished but it's already in a usable state for libraries
    that depend on Zinc directly and have direct access to `Incremental`.
    
    By default, no profiler is used. Only people that change the profiler
    argument for `Incremental.compile` will be able to get the run profiles.
    jvican committed Aug 26, 2018
    Configuration menu
    Copy the full SHA
    3dd4a2f View commit details
    Browse the repository at this point in the history
  4. Exclude binary compatibility errors in zincCore

    These methods are not exposed to the public API of Zinc and can
    therefore be changed with certainty.
    jvican committed Aug 26, 2018
    Configuration menu
    Copy the full SHA
    13c7d4d View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2018

  1. Configuration menu
    Copy the full SHA
    90b56cd View commit details
    Browse the repository at this point in the history
  2. Remove secondary string table

    I realized how stupid it was the idea of keeping two string tables
    intead of one, since it's unlikely we'll ever have more than
    2147483647 unique string instances and the JVM doesn't allow to
    instantiate such a big array in normal heap sizes. So we remove this
    part of the design that we inherited from pprof.
    jvican committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    11092ad View commit details
    Browse the repository at this point in the history