diff options
author | 2023-08-24 14:11:30 +0000 | |
---|---|---|
committer | 2023-10-17 07:22:13 +0000 | |
commit | b983874f2296c4d5a063d9e3d33f8a50fc865a09 (patch) | |
tree | 13a79de0af272ac1ae44f49c634e626716cc3114 /compiler/optimizing/graph_visualizer.cc | |
parent | 7d6bd10f0a2c3fd0b81e33d1d61ca60a0ecaae11 (diff) |
Revert^4 "Merge libart and libart-compiler into a single library"
This reverts commit 61b1c151163a09ad49c0b74c19ee84caeb4d0345.
Reason for revert: reland with dex2oat PGO removed.
Previous attempts at merging libart-compiler into libart showed some
performance regressions, which were caused by incompatibilities between
AFDO and PGO optimization pipelines when used within a single library.
This change removes dex2oat PGO and leaves only AFDO for libart.so.
Change-Id: I75a844f53663385ef98351f60d3adb900157f5e5
Bug: 303042202
Bug: 186902856
Test: art/test.py -b --host
Test: atest art_standalone_\*_tests
Test: art/build/apex/runtests.sh
Test: atest art-apex-update-rollback
Test: (chroot) art/tools/run-gtests.sh -j4
Test: (chroot) art/test/testrunner/testrunner.py --target
Test: (chroot) art/tools/run-libcore-tests.sh --mode=device
Test: (chroot) art/tools/run-libjdwp-tests.sh --mode=device
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 }; |