From 883c1346b87537ed93f7d4fd88bbbb041c14d320 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Mon, 11 May 2020 23:30:29 +0000 Subject: Revert^2 "Remove test_per_src from ART tests." Second attempt at this, which fixes the asan failures. Remove test_per_src since it is not supported by atest. Replace it with gtest_isolate which is transparent to atest, and which still allows us to run tests in parallel. The size of test binaries halves (from 1GB to 0.5GB). Test run-time on host is unchanged. Test run-time on target is 4x faster (tested on walleye). Added a gtest_main.cc with the gtest isolated main function, and ART-specific initialization. Bug: 147819342 Test: m test-art-host-gtest Test: art/tools/run-gtests.sh Test: art/test/testrunner/run_build_test_target.py art-gtest-asan Change-Id: I515c911bb7d44285495802fc66cd732fc8e6d8df --- compiler/optimizing/optimizing_unit_test.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/optimizing/optimizing_unit_test.h') diff --git a/compiler/optimizing/optimizing_unit_test.h b/compiler/optimizing/optimizing_unit_test.h index c884f5b0a4..484e444d6d 100644 --- a/compiler/optimizing/optimizing_unit_test.h +++ b/compiler/optimizing/optimizing_unit_test.h @@ -56,11 +56,11 @@ namespace art { #define FIVE_REGISTERS_CODE_ITEM(...) N_REGISTERS_CODE_ITEM(5, __VA_ARGS__) #define SIX_REGISTERS_CODE_ITEM(...) N_REGISTERS_CODE_ITEM(6, __VA_ARGS__) -LiveInterval* BuildInterval(const size_t ranges[][2], - size_t number_of_ranges, - ScopedArenaAllocator* allocator, - int reg = -1, - HInstruction* defined_by = nullptr) { +inline LiveInterval* BuildInterval(const size_t ranges[][2], + size_t number_of_ranges, + ScopedArenaAllocator* allocator, + int reg = -1, + HInstruction* defined_by = nullptr) { LiveInterval* interval = LiveInterval::MakeInterval(allocator, DataType::Type::kInt32, defined_by); if (defined_by != nullptr) { @@ -73,7 +73,7 @@ LiveInterval* BuildInterval(const size_t ranges[][2], return interval; } -void RemoveSuspendChecks(HGraph* graph) { +inline void RemoveSuspendChecks(HGraph* graph) { for (HBasicBlock* block : graph->GetBlocks()) { if (block != nullptr) { if (block->GetLoopInformation() != nullptr) { -- cgit v1.2.3-59-g8ed1b