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

Allow CppLinkAction to inspect input sizes in resource estimation #19203

Closed
wants to merge 4 commits into from

Commits on Aug 8, 2023

  1. Allow CppLinkAction to inspect input sizes in resource estimation

    This PR instrumets the CppLinkAction to print log lines for every link
    operation and dumps the number of inputs, the aggregate size of the
    inputs, the predicted memory usage, and the actual consumed memory.
    
    Calculating the aggregate size of the inputs is a costly operation
    because we need to expand a nested set and stat all of its files, which
    explains why this PR is complex.  I've modified the local memory
    estimator to compute the inputs size exactly once per link as we need
    this information both to predict memory consumption _and_ to emit the
    log line after the spawn completes.
    
    This is meant to aid in assessing the local resources prediction for
    linking with the goal of adjusting the model, but that should be done
    in a separate change.
    
    Helps address bazelbuild#17368.
    jmmv committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    e19b541 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. Address review comments

    jmmv committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    ab31c6b View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. Address review comments

    jmmv committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    27994c4 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Fix tests

    jmmv committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    641c671 View commit details
    Browse the repository at this point in the history