Log information for Mixed Builds modules.
Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0 Change-Id: I88780c7cc52a189a72216c5e2e499c96574b3731
This commit is contained in:
@@ -338,9 +338,19 @@ func shouldKeepExistingBuildFileForDir(allowlist bp2BuildConversionAllowlist, di
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// MixedBuildsEnabled checks that a module is ready to be replaced by a
|
// MixedBuildsEnabled returns true if a module is ready to be replaced by a
|
||||||
|
// converted or handcrafted Bazel target. As a side effect, calling this
|
||||||
|
// method will also log whether this module is mixed build enabled for
|
||||||
|
// metrics reporting.
|
||||||
|
func MixedBuildsEnabled(ctx ModuleContext) bool {
|
||||||
|
mixedBuildEnabled := mixedBuildPossible(ctx)
|
||||||
|
ctx.Config().LogMixedBuild(ctx, mixedBuildEnabled)
|
||||||
|
return mixedBuildEnabled
|
||||||
|
}
|
||||||
|
|
||||||
|
// mixedBuildPossible returns true if a module is ready to be replaced by a
|
||||||
// converted or handcrafted Bazel target.
|
// converted or handcrafted Bazel target.
|
||||||
func (b *BazelModuleBase) MixedBuildsEnabled(ctx ModuleContext) bool {
|
func mixedBuildPossible(ctx ModuleContext) bool {
|
||||||
if ctx.Os() == Windows {
|
if ctx.Os() == Windows {
|
||||||
// Windows toolchains are not currently supported.
|
// Windows toolchains are not currently supported.
|
||||||
return false
|
return false
|
||||||
|
@@ -170,6 +170,10 @@ type config struct {
|
|||||||
ninjaFileDepsSet sync.Map
|
ninjaFileDepsSet sync.Map
|
||||||
|
|
||||||
OncePer
|
OncePer
|
||||||
|
|
||||||
|
mixedBuildsLock sync.Mutex
|
||||||
|
mixedBuildEnabledModules map[string]struct{}
|
||||||
|
mixedBuildDisabledModules map[string]struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
type deviceConfig struct {
|
type deviceConfig struct {
|
||||||
@@ -376,6 +380,8 @@ func TestConfig(buildDir string, env map[string]string, bp string, fs map[string
|
|||||||
TestAllowNonExistentPaths: true,
|
TestAllowNonExistentPaths: true,
|
||||||
|
|
||||||
BazelContext: noopBazelContext{},
|
BazelContext: noopBazelContext{},
|
||||||
|
mixedBuildDisabledModules: make(map[string]struct{}),
|
||||||
|
mixedBuildEnabledModules: make(map[string]struct{}),
|
||||||
}
|
}
|
||||||
config.deviceConfig = &deviceConfig{
|
config.deviceConfig = &deviceConfig{
|
||||||
config: config,
|
config: config,
|
||||||
@@ -468,6 +474,8 @@ func NewConfig(moduleListFile string, runGoTests bool, outDir, soongOutDir strin
|
|||||||
|
|
||||||
moduleListFile: moduleListFile,
|
moduleListFile: moduleListFile,
|
||||||
fs: pathtools.NewOsFs(absSrcDir),
|
fs: pathtools.NewOsFs(absSrcDir),
|
||||||
|
mixedBuildDisabledModules: make(map[string]struct{}),
|
||||||
|
mixedBuildEnabledModules: make(map[string]struct{}),
|
||||||
}
|
}
|
||||||
|
|
||||||
config.deviceConfig = &deviceConfig{
|
config.deviceConfig = &deviceConfig{
|
||||||
@@ -2038,3 +2046,14 @@ func (c *config) RBEWrapper() string {
|
|||||||
func (c *config) UseHostMusl() bool {
|
func (c *config) UseHostMusl() bool {
|
||||||
return Bool(c.productVariables.HostMusl)
|
return Bool(c.productVariables.HostMusl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *config) LogMixedBuild(ctx ModuleContext, useBazel bool) {
|
||||||
|
moduleName := ctx.Module().Name()
|
||||||
|
c.mixedBuildsLock.Lock()
|
||||||
|
defer c.mixedBuildsLock.Unlock()
|
||||||
|
if useBazel {
|
||||||
|
c.mixedBuildEnabledModules[moduleName] = struct{}{}
|
||||||
|
} else {
|
||||||
|
c.mixedBuildDisabledModules[moduleName] = struct{}{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -115,7 +115,7 @@ func FileGroupFactory() Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (fg *fileGroup) maybeGenerateBazelBuildActions(ctx ModuleContext) {
|
func (fg *fileGroup) maybeGenerateBazelBuildActions(ctx ModuleContext) {
|
||||||
if !fg.MixedBuildsEnabled(ctx) {
|
if !MixedBuildsEnabled(ctx) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@ package android
|
|||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/google/blueprint/metrics"
|
"github.com/google/blueprint/metrics"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
@@ -78,6 +79,23 @@ func collectMetrics(config Config, eventHandler metrics.EventHandler) *soong_met
|
|||||||
}
|
}
|
||||||
metrics.Events = append(metrics.Events, &perfInfo)
|
metrics.Events = append(metrics.Events, &perfInfo)
|
||||||
}
|
}
|
||||||
|
mixedBuildsInfo := soong_metrics_proto.MixedBuildsInfo{}
|
||||||
|
mixedBuildEnabledModules := make([]string, 0, len(config.mixedBuildEnabledModules))
|
||||||
|
for module, _ := range config.mixedBuildEnabledModules {
|
||||||
|
mixedBuildEnabledModules = append(mixedBuildEnabledModules, module)
|
||||||
|
}
|
||||||
|
|
||||||
|
mixedBuildDisabledModules := make([]string, 0, len(config.mixedBuildDisabledModules))
|
||||||
|
for module, _ := range config.mixedBuildDisabledModules {
|
||||||
|
mixedBuildDisabledModules = append(mixedBuildDisabledModules, module)
|
||||||
|
}
|
||||||
|
// Sorted for deterministic output.
|
||||||
|
sort.Strings(mixedBuildEnabledModules)
|
||||||
|
sort.Strings(mixedBuildDisabledModules)
|
||||||
|
|
||||||
|
mixedBuildsInfo.MixedBuildEnabledModules = mixedBuildEnabledModules
|
||||||
|
mixedBuildsInfo.MixedBuildDisabledModules = mixedBuildDisabledModules
|
||||||
|
metrics.MixedBuildsInfo = &mixedBuildsInfo
|
||||||
|
|
||||||
return metrics
|
return metrics
|
||||||
}
|
}
|
||||||
|
2
cc/cc.go
2
cc/cc.go
@@ -1789,7 +1789,7 @@ func (c *Module) maybeGenerateBazelActions(actx android.ModuleContext) bool {
|
|||||||
bazelActionsUsed := false
|
bazelActionsUsed := false
|
||||||
// Mixed builds mode is disabled for modules outside of device OS.
|
// Mixed builds mode is disabled for modules outside of device OS.
|
||||||
// TODO(b/200841190): Support non-device OS in mixed builds.
|
// TODO(b/200841190): Support non-device OS in mixed builds.
|
||||||
if c.MixedBuildsEnabled(actx) && c.bazelHandler != nil {
|
if android.MixedBuildsEnabled(actx) && c.bazelHandler != nil {
|
||||||
bazelActionsUsed = c.bazelHandler.GenerateBazelBuildActions(actx, bazelModuleLabel)
|
bazelActionsUsed = c.bazelHandler.GenerateBazelBuildActions(actx, bazelModuleLabel)
|
||||||
}
|
}
|
||||||
return bazelActionsUsed
|
return bazelActionsUsed
|
||||||
|
@@ -578,7 +578,7 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
|||||||
|
|
||||||
bazelModuleLabel := g.GetBazelLabel(ctx, g)
|
bazelModuleLabel := g.GetBazelLabel(ctx, g)
|
||||||
bazelActionsUsed := false
|
bazelActionsUsed := false
|
||||||
if g.MixedBuildsEnabled(ctx) {
|
if android.MixedBuildsEnabled(ctx) {
|
||||||
bazelActionsUsed = g.GenerateBazelBuildActions(ctx, bazelModuleLabel)
|
bazelActionsUsed = g.GenerateBazelBuildActions(ctx, bazelModuleLabel)
|
||||||
}
|
}
|
||||||
if !bazelActionsUsed {
|
if !bazelActionsUsed {
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.27.1
|
// protoc-gen-go v1.28.0
|
||||||
// protoc v3.9.1
|
// protoc v3.9.1
|
||||||
// source: metrics.proto
|
// source: metrics.proto
|
||||||
|
|
||||||
@@ -954,9 +954,9 @@ type ModuleTypeInfo struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// The build system, eg. Soong or Make.
|
// The build system, e.g. Soong or Make.
|
||||||
BuildSystem *ModuleTypeInfo_BuildSystem `protobuf:"varint,1,opt,name=build_system,json=buildSystem,enum=soong_build_metrics.ModuleTypeInfo_BuildSystem,def=0" json:"build_system,omitempty"`
|
BuildSystem *ModuleTypeInfo_BuildSystem `protobuf:"varint,1,opt,name=build_system,json=buildSystem,enum=soong_build_metrics.ModuleTypeInfo_BuildSystem,def=0" json:"build_system,omitempty"`
|
||||||
// The module type, eg. java_library, cc_binary, and etc.
|
// The module type, e.g. java_library, cc_binary, and etc.
|
||||||
ModuleType *string `protobuf:"bytes,2,opt,name=module_type,json=moduleType" json:"module_type,omitempty"`
|
ModuleType *string `protobuf:"bytes,2,opt,name=module_type,json=moduleType" json:"module_type,omitempty"`
|
||||||
// The number of logical modules.
|
// The number of logical modules.
|
||||||
NumOfModules *uint32 `protobuf:"varint,3,opt,name=num_of_modules,json=numOfModules" json:"num_of_modules,omitempty"`
|
NumOfModules *uint32 `protobuf:"varint,3,opt,name=num_of_modules,json=numOfModules" json:"num_of_modules,omitempty"`
|
||||||
@@ -1142,6 +1142,8 @@ type SoongBuildMetrics struct {
|
|||||||
MaxHeapSize *uint64 `protobuf:"varint,5,opt,name=max_heap_size,json=maxHeapSize" json:"max_heap_size,omitempty"`
|
MaxHeapSize *uint64 `protobuf:"varint,5,opt,name=max_heap_size,json=maxHeapSize" json:"max_heap_size,omitempty"`
|
||||||
// Runtime metrics for soong_build execution.
|
// Runtime metrics for soong_build execution.
|
||||||
Events []*PerfInfo `protobuf:"bytes,6,rep,name=events" json:"events,omitempty"`
|
Events []*PerfInfo `protobuf:"bytes,6,rep,name=events" json:"events,omitempty"`
|
||||||
|
// Mixed Builds information
|
||||||
|
MixedBuildsInfo *MixedBuildsInfo `protobuf:"bytes,7,opt,name=mixed_builds_info,json=mixedBuildsInfo" json:"mixed_builds_info,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SoongBuildMetrics) Reset() {
|
func (x *SoongBuildMetrics) Reset() {
|
||||||
@@ -1218,6 +1220,13 @@ func (x *SoongBuildMetrics) GetEvents() []*PerfInfo {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *SoongBuildMetrics) GetMixedBuildsInfo() *MixedBuildsInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.MixedBuildsInfo
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
type ExpConfigFetcher struct {
|
type ExpConfigFetcher struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
@@ -1287,6 +1296,63 @@ func (x *ExpConfigFetcher) GetMicros() uint64 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MixedBuildsInfo struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Modules that are enabled for Mixed Builds.
|
||||||
|
MixedBuildEnabledModules []string `protobuf:"bytes,1,rep,name=mixed_build_enabled_modules,json=mixedBuildEnabledModules" json:"mixed_build_enabled_modules,omitempty"`
|
||||||
|
// Modules that are not currently eligible for MixedBuilds
|
||||||
|
MixedBuildDisabledModules []string `protobuf:"bytes,2,rep,name=mixed_build_disabled_modules,json=mixedBuildDisabledModules" json:"mixed_build_disabled_modules,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MixedBuildsInfo) Reset() {
|
||||||
|
*x = MixedBuildsInfo{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_metrics_proto_msgTypes[10]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MixedBuildsInfo) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MixedBuildsInfo) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MixedBuildsInfo) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_metrics_proto_msgTypes[10]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MixedBuildsInfo.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MixedBuildsInfo) Descriptor() ([]byte, []int) {
|
||||||
|
return file_metrics_proto_rawDescGZIP(), []int{10}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MixedBuildsInfo) GetMixedBuildEnabledModules() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.MixedBuildEnabledModules
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MixedBuildsInfo) GetMixedBuildDisabledModules() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.MixedBuildDisabledModules
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
var File_metrics_proto protoreflect.FileDescriptor
|
var File_metrics_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_metrics_proto_rawDesc = []byte{
|
var file_metrics_proto_rawDesc = []byte{
|
||||||
@@ -1491,7 +1557,7 @@ var file_metrics_proto_rawDesc = []byte{
|
|||||||
0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74,
|
0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74,
|
||||||
0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x55, 0x73, 0x65,
|
0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x55, 0x73, 0x65,
|
||||||
0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52,
|
0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52,
|
||||||
0x04, 0x63, 0x75, 0x6a, 0x73, 0x22, 0xfa, 0x01, 0x0a, 0x11, 0x53, 0x6f, 0x6f, 0x6e, 0x67, 0x42,
|
0x04, 0x63, 0x75, 0x6a, 0x73, 0x22, 0xcc, 0x02, 0x0a, 0x11, 0x53, 0x6f, 0x6f, 0x6e, 0x67, 0x42,
|
||||||
0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d,
|
||||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x6f,
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x6f,
|
||||||
0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
|
0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
|
||||||
@@ -1507,22 +1573,36 @@ var file_metrics_proto_rawDesc = []byte{
|
|||||||
0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f,
|
0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f,
|
||||||
0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63,
|
0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63,
|
||||||
0x73, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e,
|
0x73, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e,
|
||||||
0x74, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
0x74, 0x73, 0x12, 0x50, 0x0a, 0x11, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c,
|
||||||
0x46, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75,
|
0x64, 0x73, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e,
|
||||||
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f,
|
0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72,
|
||||||
0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x45, 0x78,
|
0x69, 0x63, 0x73, 0x2e, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x49,
|
||||||
0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x43,
|
0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73,
|
||||||
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61,
|
0x49, 0x6e, 0x66, 0x6f, 0x22, 0xc8, 0x01, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x43, 0x6f, 0x6e, 0x66,
|
||||||
0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
0x69, 0x67, 0x46, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x06, 0x73, 0x74, 0x61,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12,
|
0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x73, 0x6f, 0x6f, 0x6e,
|
||||||
0x16, 0x0a, 0x06, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
|
0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e,
|
||||||
0x06, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x22, 0x34, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
0x45, 0x78, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x65, 0x74, 0x63, 0x68, 0x65, 0x72,
|
||||||
0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f, 0x43, 0x4f,
|
0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73,
|
||||||
0x4e, 0x46, 0x49, 0x47, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47,
|
0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d,
|
||||||
0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x28, 0x5a,
|
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d,
|
||||||
0x26, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x75,
|
0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x69, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63,
|
0x04, 0x52, 0x06, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x22, 0x34, 0x0a, 0x0c, 0x43, 0x6f, 0x6e,
|
||||||
0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x5f,
|
||||||
|
0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x46,
|
||||||
|
0x49, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x22,
|
||||||
|
0x91, 0x01, 0x0a, 0x0f, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x73, 0x49,
|
||||||
|
0x6e, 0x66, 0x6f, 0x12, 0x3d, 0x0a, 0x1b, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x69,
|
||||||
|
0x6c, 0x64, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x42,
|
||||||
|
0x75, 0x69, 0x6c, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x73, 0x12, 0x3f, 0x0a, 0x1c, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x62, 0x75, 0x69, 0x6c,
|
||||||
|
0x64, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
|
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x42,
|
||||||
|
0x75, 0x69, 0x6c, 0x64, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75,
|
||||||
|
0x6c, 0x65, 0x73, 0x42, 0x28, 0x5a, 0x26, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73,
|
||||||
|
0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x75, 0x69, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f,
|
||||||
|
0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -1538,7 +1618,7 @@ func file_metrics_proto_rawDescGZIP() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var file_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
var file_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
|
||||||
var file_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
var file_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||||
var file_metrics_proto_goTypes = []interface{}{
|
var file_metrics_proto_goTypes = []interface{}{
|
||||||
(MetricsBase_BuildVariant)(0), // 0: soong_build_metrics.MetricsBase.BuildVariant
|
(MetricsBase_BuildVariant)(0), // 0: soong_build_metrics.MetricsBase.BuildVariant
|
||||||
(MetricsBase_Arch)(0), // 1: soong_build_metrics.MetricsBase.Arch
|
(MetricsBase_Arch)(0), // 1: soong_build_metrics.MetricsBase.Arch
|
||||||
@@ -1554,6 +1634,7 @@ var file_metrics_proto_goTypes = []interface{}{
|
|||||||
(*CriticalUserJourneysMetrics)(nil), // 11: soong_build_metrics.CriticalUserJourneysMetrics
|
(*CriticalUserJourneysMetrics)(nil), // 11: soong_build_metrics.CriticalUserJourneysMetrics
|
||||||
(*SoongBuildMetrics)(nil), // 12: soong_build_metrics.SoongBuildMetrics
|
(*SoongBuildMetrics)(nil), // 12: soong_build_metrics.SoongBuildMetrics
|
||||||
(*ExpConfigFetcher)(nil), // 13: soong_build_metrics.ExpConfigFetcher
|
(*ExpConfigFetcher)(nil), // 13: soong_build_metrics.ExpConfigFetcher
|
||||||
|
(*MixedBuildsInfo)(nil), // 14: soong_build_metrics.MixedBuildsInfo
|
||||||
}
|
}
|
||||||
var file_metrics_proto_depIdxs = []int32{
|
var file_metrics_proto_depIdxs = []int32{
|
||||||
0, // 0: soong_build_metrics.MetricsBase.target_build_variant:type_name -> soong_build_metrics.MetricsBase.BuildVariant
|
0, // 0: soong_build_metrics.MetricsBase.target_build_variant:type_name -> soong_build_metrics.MetricsBase.BuildVariant
|
||||||
@@ -1575,12 +1656,13 @@ var file_metrics_proto_depIdxs = []int32{
|
|||||||
4, // 16: soong_build_metrics.CriticalUserJourneyMetrics.metrics:type_name -> soong_build_metrics.MetricsBase
|
4, // 16: soong_build_metrics.CriticalUserJourneyMetrics.metrics:type_name -> soong_build_metrics.MetricsBase
|
||||||
10, // 17: soong_build_metrics.CriticalUserJourneysMetrics.cujs:type_name -> soong_build_metrics.CriticalUserJourneyMetrics
|
10, // 17: soong_build_metrics.CriticalUserJourneysMetrics.cujs:type_name -> soong_build_metrics.CriticalUserJourneyMetrics
|
||||||
7, // 18: soong_build_metrics.SoongBuildMetrics.events:type_name -> soong_build_metrics.PerfInfo
|
7, // 18: soong_build_metrics.SoongBuildMetrics.events:type_name -> soong_build_metrics.PerfInfo
|
||||||
3, // 19: soong_build_metrics.ExpConfigFetcher.status:type_name -> soong_build_metrics.ExpConfigFetcher.ConfigStatus
|
14, // 19: soong_build_metrics.SoongBuildMetrics.mixed_builds_info:type_name -> soong_build_metrics.MixedBuildsInfo
|
||||||
20, // [20:20] is the sub-list for method output_type
|
3, // 20: soong_build_metrics.ExpConfigFetcher.status:type_name -> soong_build_metrics.ExpConfigFetcher.ConfigStatus
|
||||||
20, // [20:20] is the sub-list for method input_type
|
21, // [21:21] is the sub-list for method output_type
|
||||||
20, // [20:20] is the sub-list for extension type_name
|
21, // [21:21] is the sub-list for method input_type
|
||||||
20, // [20:20] is the sub-list for extension extendee
|
21, // [21:21] is the sub-list for extension type_name
|
||||||
0, // [0:20] is the sub-list for field type_name
|
21, // [21:21] is the sub-list for extension extendee
|
||||||
|
0, // [0:21] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_metrics_proto_init() }
|
func init() { file_metrics_proto_init() }
|
||||||
@@ -1709,6 +1791,18 @@ func file_metrics_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_metrics_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*MixedBuildsInfo); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@@ -1716,7 +1810,7 @@ func file_metrics_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_metrics_proto_rawDesc,
|
RawDescriptor: file_metrics_proto_rawDesc,
|
||||||
NumEnums: 4,
|
NumEnums: 4,
|
||||||
NumMessages: 10,
|
NumMessages: 11,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
@@ -200,10 +200,10 @@ message ModuleTypeInfo {
|
|||||||
SOONG = 1;
|
SOONG = 1;
|
||||||
MAKE = 2;
|
MAKE = 2;
|
||||||
}
|
}
|
||||||
// The build system, eg. Soong or Make.
|
// The build system, e.g. Soong or Make.
|
||||||
optional BuildSystem build_system = 1 [default = UNKNOWN];
|
optional BuildSystem build_system = 1 [default = UNKNOWN];
|
||||||
|
|
||||||
// The module type, eg. java_library, cc_binary, and etc.
|
// The module type, e.g. java_library, cc_binary, and etc.
|
||||||
optional string module_type = 2;
|
optional string module_type = 2;
|
||||||
|
|
||||||
// The number of logical modules.
|
// The number of logical modules.
|
||||||
@@ -241,6 +241,9 @@ message SoongBuildMetrics {
|
|||||||
|
|
||||||
// Runtime metrics for soong_build execution.
|
// Runtime metrics for soong_build execution.
|
||||||
repeated PerfInfo events = 6;
|
repeated PerfInfo events = 6;
|
||||||
|
|
||||||
|
// Mixed Builds information
|
||||||
|
optional MixedBuildsInfo mixed_builds_info = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ExpConfigFetcher {
|
message ExpConfigFetcher {
|
||||||
@@ -261,3 +264,25 @@ message ExpConfigFetcher {
|
|||||||
// Time, in microseconds, taken by the expconfigfetcher
|
// Time, in microseconds, taken by the expconfigfetcher
|
||||||
optional uint64 micros = 3;
|
optional uint64 micros = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message MixedBuildsInfo{
|
||||||
|
// Modules may be listed below as both enabled for Mixed Builds
|
||||||
|
// and disabled for Mixed Builds. This implies that some variants
|
||||||
|
// of the module are handled by Bazel in a Mixed Build, and other
|
||||||
|
// variants of the same module are handled by Soong.
|
||||||
|
|
||||||
|
// Modules that are enabled for Mixed Builds.
|
||||||
|
repeated string mixed_build_enabled_modules = 1;
|
||||||
|
|
||||||
|
// Modules that are not currently eligible to be handled
|
||||||
|
// by Bazel in a Mixed Build.
|
||||||
|
// Note that not all modules exempt from Bazel handling are
|
||||||
|
// listed. This list includes only modules which are of a
|
||||||
|
// Mixed-Build supported module type but are nevertheless not
|
||||||
|
// handled by Bazel. This may occur due to being present in
|
||||||
|
// the mixed build denylist, or as part of an unsupported
|
||||||
|
// mixed build variant type such as Windows.
|
||||||
|
|
||||||
|
// Modules that are not enabled for MixedBuilds
|
||||||
|
repeated string mixed_build_disabled_modules = 2;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user