diff options
author | 2022-10-12 14:15:31 +0000 | |
---|---|---|
committer | 2022-11-07 18:15:11 +0000 | |
commit | 2b7be1efa1ba363778057d4e42fccab8afe3046b (patch) | |
tree | 968e6b9f257ff1848ba47cab5c33171fb82ead91 /compiler/optimizing/graph_visualizer.cc | |
parent | f776c17dbe99b989dcbefd08b746c3709b1752bf (diff) |
Merge libart and libart-compiler into a single library
Rename old libart into 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
This change negates all size savings from libart-compiler
version script, it will be restored in a follow-up CL
Bug: 186902856
Test: m test-art-host-gtest
Test: m libart libartd dex2oat dex2oatd oatdump oatdumps
Test: art/build/apex/runtests.sh
Test: art/tools/run-gtests.sh
Test: art/test/testrunner/testrunner.py --target --64
Test: art/tools/run-libcore-tests.sh --mode=device --variant=X64
Test: art/tools/run-libjdwp-tests.sh --mode=device --variant=X64
Change-Id: I6b9717cf49007e77691d49a2dca18a8064749154
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 e1199dfb72..1e41a22e91 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 }; |