From bb5bb5e242fba18f7820ce14330f81afb8d76505 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 10 Oct 2022 10:16:23 -0700 Subject: [PATCH] Limit cts-api-coverage parallelism to 8 cts-api-coverage is getting OOM killed in presubmit, likely due to spawning a copy of dexdeps in parallel for every cpu in the system. Limit it to 8 parallel subprocesses when running inside the build, as other processes are likely already using cpu and memory. Bug: 252817769 Test: m out/host/linux-x86/cts-api-coverage/system-api-coverage.html Change-Id: Iaae6561ac173d32c1b5af895cab76f3f898da4bb --- core/tasks/cts.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tasks/cts.mk b/core/tasks/cts.mk index c282268c2f..c8b1183e28 100644 --- a/core/tasks/cts.mk +++ b/core/tasks/cts.mk @@ -211,7 +211,7 @@ ALL_TARGETS.$(cts-combined-xml-coverage-report).META_LIC:=$(module_license_metad # 3 - Format of the report define generate-coverage-report-cts $(hide) mkdir -p $(dir $@) - $(hide) $(PRIVATE_CTS_API_COVERAGE_EXE) -d $(PRIVATE_DEXDEPS_EXE) -a $(PRIVATE_API_XML_DESC) -n $(PRIVATE_NAPI_XML_DESC) -f $(3) -o $@ $(2) + $(hide) $(PRIVATE_CTS_API_COVERAGE_EXE) -j 8 -d $(PRIVATE_DEXDEPS_EXE) -a $(PRIVATE_API_XML_DESC) -n $(PRIVATE_NAPI_XML_DESC) -f $(3) -o $@ $(2) @ echo $(1): file://$$(cd $(dir $@); pwd)/$(notdir $@) endef