diff options
author | 2022-03-17 12:55:27 +0000 | |
---|---|---|
committer | 2022-04-04 16:40:55 +0000 | |
commit | f67e8c35ee11b0bd81a2d6f6e267b9081db7d758 (patch) | |
tree | 4b5331d57e63554d7a7a84020bb971dcf50c6507 /compiler/driver/compiler_options.h | |
parent | 65258db896c8270873f362d95204336d7d1e333d (diff) |
Preallocate `CodeInfoTableDeduper::dedupe_set_`.
Preallocate large buffer except for multi-image compilation
which requires multiple dedupe sets, so we let them grow as
needed without wasting too much memory. We do not expect to
use multi-image compilation on user devices.
Also remove the hash from the dedupe set entry. With the
large pre-allocated buffer, we have very few hash conflicts
and comparing the hash just slows down finding identical
entries. If we exceed the pre-allocated buffer, this shall
trade some performance for lower memory use.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: Ibbb98b6d3ebbc35ffa75165baad54f4df7c62ad9
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r-- | compiler/driver/compiler_options.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h index 783092431a..0034306fdf 100644 --- a/compiler/driver/compiler_options.h +++ b/compiler/driver/compiler_options.h @@ -233,6 +233,10 @@ class CompilerOptions final { return image_type_ == ImageType::kAppImage; } + bool IsMultiImage() const { + return multi_image_; + } + // Returns whether we are running ART tests. // The compiler will use that information for checking invariants. bool CompileArtTest() const { @@ -408,6 +412,7 @@ class CompilerOptions final { CompilerType compiler_type_; ImageType image_type_; + bool multi_image_; bool compile_art_test_; bool baseline_; bool debuggable_; |