diff options
author | 2023-06-26 13:19:37 +0000 | |
---|---|---|
committer | 2023-07-26 14:39:30 +0000 | |
commit | 35cca3e296346277422aaee030edced697e09319 (patch) | |
tree | 37b7bb0f6f8ac94baf716213b0dbd8232215a5a8 /compiler/optimizing/graph_visualizer.cc | |
parent | 9ca7be960a291da42b27e6ee94b362cef9688427 (diff) |
Merge libart and libart-compiler into a single library
Rename old libart to libart-runtime.
Build libart-runtime and libart-compiler separately as static libraries.
This is required to support PGO (compiler) and AFDO (runtime) without
mixing them.
Combine libart-runtime and libart-compiler into libart with
whole-archive linking.
Remove JitLoadTest, since `jit_create` (previously `jit_load`) function
is guaranteed to exist in `libart`.
After this change libart-compiler will have access to all libart-runtime
symbols. This will allow to hide more symbols from libart-runtime.
ART APEX size before and after:
X86 : 29,748.00 KiB -> 29,648.00 KiB (-100.00 KiB, -0.34%)
X86_64: 49,148.00 KiB -> 48,928.00 KiB (-220.00 KiB, -0.45%)
Arm32 : 23,440.00 KiB -> 23,268.00 KiB (-172.00 KiB, -0.73%)
Arm64 : 44,472.00 KiB -> 43,884.00 KiB (-588.00 KiB, -1.32%)
Bug: 186902856
Test: art/test.py -b --host
Test: atest art_standalone_\*_tests
Test: art/tools/run-gtests.sh
Test: art/test/testrunner/testrunner.py --target
Test: art/tools/run-libcore-tests.sh --mode=device
Test: art/tools/run-libjdwp-tests.sh --mode=device
Test: m mts && mts-tradefed run commandAndExit mts-art
Test: m libart-compiler libartd-compiler libart-runtime libartd-runtime libart libartd
Test: art/build/apex/runtests.sh (no regressions)
Test: atest art-apex-update-rollback (no regressions)
Change-Id: I20bd2fcca26013963a48e933142c9f81883bdca4
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index bd33fde907..c2c0953044 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -115,7 +115,9 @@ std::ostream& operator<<(std::ostream& os, const StringList& list) { } } -#ifndef ART_STATIC_LIBART_COMPILER +// On target: load `libart-disassembler` only when required (to save on memory). +// On host: `libart-disassembler` should be linked directly (either as a static or dynamic lib) +#ifdef ART_TARGET using create_disasm_prototype = Disassembler*(InstructionSet, DisassemblerOptions*); #endif @@ -125,7 +127,7 @@ class HGraphVisualizerDisassembler { const uint8_t* base_address, const uint8_t* end_address) : instruction_set_(instruction_set), disassembler_(nullptr) { -#ifndef ART_STATIC_LIBART_COMPILER +#ifdef ART_TARGET constexpr const char* libart_disassembler_so_name = kIsDebugBuild ? "libartd-disassembler.so" : "libart-disassembler.so"; libart_disassembler_handle_ = dlopen(libart_disassembler_so_name, RTLD_NOW); @@ -159,7 +161,7 @@ class HGraphVisualizerDisassembler { ~HGraphVisualizerDisassembler() { // We need to call ~Disassembler() before we close the library. disassembler_.reset(); -#ifndef ART_STATIC_LIBART_COMPILER +#ifdef ART_TARGET if (libart_disassembler_handle_ != nullptr) { dlclose(libart_disassembler_handle_); } @@ -184,7 +186,7 @@ class HGraphVisualizerDisassembler { InstructionSet instruction_set_; std::unique_ptr<Disassembler> disassembler_; -#ifndef ART_STATIC_LIBART_COMPILER +#ifdef ART_TARGET void* libart_disassembler_handle_; #endif }; |