Parallelize singleton execution

Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
This commit is contained in:
LaMont Jones
2023-05-16 00:58:37 +00:00
parent e59c0db536
commit 0c10e4dcc0
41 changed files with 51 additions and 51 deletions

View File

@@ -465,7 +465,7 @@ func dexpreoptBootJarsFactory() android.SingletonModule {
}
func RegisterDexpreoptBootJarsComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonModuleType("dex_bootjars", dexpreoptBootJarsFactory)
ctx.RegisterParallelSingletonModuleType("dex_bootjars", dexpreoptBootJarsFactory)
}
func SkipDexpreoptBootJars(ctx android.PathContext) bool {

View File

@@ -28,7 +28,7 @@ func init() {
}
func RegisterDexpreoptCheckBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonModuleType("dexpreopt_systemserver_check", dexpreoptSystemserverCheckFactory)
ctx.RegisterParallelSingletonModuleType("dexpreopt_systemserver_check", dexpreoptSystemserverCheckFactory)
}
// A build-time check to verify if all compilation artifacts of system server jars are installed

View File

@@ -38,7 +38,7 @@ func init() {
func RegisterJavaFuzzBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("java_fuzz", JavaFuzzFactory)
ctx.RegisterSingletonType("java_fuzz_packaging", javaFuzzPackagingFactory)
ctx.RegisterParallelSingletonType("java_fuzz_packaging", javaFuzzPackagingFactory)
}
type JavaFuzzTest struct {

View File

@@ -25,7 +25,7 @@ func init() {
}
func RegisterHiddenApiSingletonComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonType("hiddenapi", hiddenAPISingletonFactory)
ctx.RegisterParallelSingletonType("hiddenapi", hiddenAPISingletonFactory)
}
var PrepareForTestWithHiddenApiBuildComponents = android.FixtureRegisterWithContext(RegisterHiddenApiSingletonComponents)

View File

@@ -73,8 +73,8 @@ func registerJavaBuildComponents(ctx android.RegistrationContext) {
ctx.BottomUp("jacoco_deps", jacocoDepsMutator).Parallel()
})
ctx.RegisterSingletonType("logtags", LogtagsSingleton)
ctx.RegisterSingletonType("kythe_java_extract", kytheExtractJavaFactory)
ctx.RegisterParallelSingletonType("logtags", LogtagsSingleton)
ctx.RegisterParallelSingletonType("kythe_java_extract", kytheExtractJavaFactory)
}
func RegisterJavaSdkMemberTypes() {

View File

@@ -26,7 +26,7 @@ import (
// called. Dependency info file is generated in $OUT/module_bp_java_depend.json.
func init() {
android.RegisterSingletonType("jdeps_generator", jDepsGeneratorSingleton)
android.RegisterParallelSingletonType("jdeps_generator", jDepsGeneratorSingleton)
}
func jDepsGeneratorSingleton() android.Singleton {

View File

@@ -705,7 +705,7 @@ func (l *lintSingleton) MakeVars(ctx android.MakeVarsContext) {
var _ android.SingletonMakeVarsProvider = (*lintSingleton)(nil)
func init() {
android.RegisterSingletonType("lint",
android.RegisterParallelSingletonType("lint",
func() android.Singleton { return &lintSingleton{} })
registerLintBuildComponents(android.InitRegistrationContext)

View File

@@ -26,7 +26,7 @@ func init() {
}
func registerPlatformBootclasspathBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
ctx.RegisterParallelSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory)
}
// The tags used for the dependencies between the platform bootclasspath and any configured boot

View File

@@ -36,7 +36,7 @@ var CompatConfigSdkMemberType = &compatConfigMemberType{
}
func registerPlatformCompatConfigBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterSingletonType("platform_compat_config_singleton", platformCompatConfigSingletonFactory)
ctx.RegisterParallelSingletonType("platform_compat_config_singleton", platformCompatConfigSingletonFactory)
ctx.RegisterModuleType("platform_compat_config", PlatformCompatConfigFactory)
ctx.RegisterModuleType("prebuilt_platform_compat_config", prebuiltCompatConfigFactory)
ctx.RegisterModuleType("global_compat_config", globalCompatConfigFactory)

View File

@@ -28,7 +28,7 @@ import (
func init() {
android.RegisterPreSingletonType("sdk_versions", sdkPreSingletonFactory)
android.RegisterSingletonType("sdk", sdkSingletonFactory)
android.RegisterParallelSingletonType("sdk", sdkSingletonFactory)
android.RegisterMakeVarsProvider(pctx, sdkMakeVars)
}