diff options
author | 2017-04-06 00:33:39 +0000 | |
---|---|---|
committer | 2017-04-06 11:00:34 +0200 | |
commit | 95d4280969b8aba81dd2ee637543707f9f8e6b9d (patch) | |
tree | 836910e7156dd0fc6ca49f602d5dc72b25c6178e /src/test | |
parent | 6c906e7b08970c1b2f7e1cf6bcb3d0bddb1fa1e0 (diff) |
When tracking the critical path, if not keeping incremental state, don't keep references to actions indefinitely. Instead, once an action is finished executing, keep just some metadata about it. This allows actions to be unconditionally dropped when running with --batch, --discard_analysis_cache, and --keep_going, even if profiling is enabled.
The additional fields here add between 8 and 12 bytes per component, and we have one component per action. This additional penalty is only incurred when we are already saving memory, so I think it's ok. The full penalty will be realized only towards the end of the build, when every action has started executing at least once. Users can still specify --noexperimental_enable_critical_path_profiling if they want to squeeze even more memory out.
PiperOrigin-RevId: 152328870
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/shell/integration/BUILD | 9 | ||||
-rwxr-xr-x | src/test/shell/integration/discard_graph_edges_test.sh | 9 |
2 files changed, 1 insertions, 17 deletions
diff --git a/src/test/shell/integration/BUILD b/src/test/shell/integration/BUILD index b083b44b8e..c33be609aa 100644 --- a/src/test/shell/integration/BUILD +++ b/src/test/shell/integration/BUILD @@ -217,15 +217,6 @@ sh_test( ) sh_test( - name = "discard_graph_edges_test_no_critical_path", - size = "medium", - srcs = ["discard_graph_edges_test.sh"], - args = ["--noexperimental_enable_critical_path_profiling"], - data = [":test-deps"], - shard_count = 5, -) - -sh_test( name = "build_event_stream_test", size = "medium", srcs = ["build_event_stream_test.sh"], diff --git a/src/test/shell/integration/discard_graph_edges_test.sh b/src/test/shell/integration/discard_graph_edges_test.sh index c034da862c..9de386b775 100755 --- a/src/test/shell/integration/discard_graph_edges_test.sh +++ b/src/test/shell/integration/discard_graph_edges_test.sh @@ -16,9 +16,6 @@ # # discard_graph_edges_test.sh: basic tests for the --discard_graph_edges flag. -additional_flags="$1" -shift - # Load the test setup defined in the parent directory CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" source "${CURRENT_DIR}/../integration_test_setup.sh" \ @@ -36,7 +33,7 @@ function set_up() { } STARTUP_FLAGS="--batch" -BUILD_FLAGS="--keep_going --discard_analysis_cache $additional_flags" +BUILD_FLAGS="--keep_going --discard_analysis_cache" #### TESTS ############################################################# @@ -198,10 +195,6 @@ function test_packages_cleared() { } function test_actions_deleted_after_execution() { - if [[ "$BUILD_FLAGS" != *"--noexperimental_enable_critical_path_profiling"* ]]; then - # Actions are only deleted if critical_path_profiling is disabled. - return - fi rm -rf histodump mkdir -p histodump || fail "Couldn't create directory" readonly local wait_fifo="$TEST_TMPDIR/wait_fifo" |