Collect metrics from inside soong_build

Collect the number of modules and variants and some basic statistics
on memory usage inside soong_build by writing out a proto that is
read back in by soong_ui.

Test: examine soong.log
Change-Id: I6926876377a4f6229cf41fdbf166ae03c885ea55
This commit is contained in:
Colin Cross 2020-02-10 11:23:49 -08:00
parent 387ad5c576
commit b72c909899
8 changed files with 311 additions and 58 deletions

View file

@ -39,6 +39,7 @@ bootstrap_go_package {
"soong-android-soongconfig", "soong-android-soongconfig",
"soong-env", "soong-env",
"soong-shared", "soong-shared",
"soong-ui-metrics_proto",
], ],
srcs: [ srcs: [
"android/androidmk.go", "android/androidmk.go",
@ -54,6 +55,7 @@ bootstrap_go_package {
"android/hooks.go", "android/hooks.go",
"android/image.go", "android/image.go",
"android/makevars.go", "android/makevars.go",
"android/metrics.go",
"android/module.go", "android/module.go",
"android/mutator.go", "android/mutator.go",
"android/namespace.go", "android/namespace.go",

87
android/metrics.go Normal file
View file

@ -0,0 +1,87 @@
// Copyright 2020 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package android
import (
"io/ioutil"
"runtime"
"github.com/golang/protobuf/proto"
soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
)
var soongMetricsOnceKey = NewOnceKey("soong metrics")
type SoongMetrics struct {
Modules int
Variants int
}
func ReadSoongMetrics(config Config) SoongMetrics {
return config.Get(soongMetricsOnceKey).(SoongMetrics)
}
func init() {
RegisterSingletonType("soong_metrics", soongMetricsSingletonFactory)
}
func soongMetricsSingletonFactory() Singleton { return soongMetricsSingleton{} }
type soongMetricsSingleton struct{}
func (soongMetricsSingleton) GenerateBuildActions(ctx SingletonContext) {
metrics := SoongMetrics{}
ctx.VisitAllModules(func(m Module) {
if ctx.PrimaryModule(m) == m {
metrics.Modules++
}
metrics.Variants++
})
ctx.Config().Once(soongMetricsOnceKey, func() interface{} {
return metrics
})
}
func collectMetrics(config Config) *soong_metrics_proto.SoongBuildMetrics {
metrics := &soong_metrics_proto.SoongBuildMetrics{}
soongMetrics := ReadSoongMetrics(config)
metrics.Modules = proto.Uint32(uint32(soongMetrics.Modules))
metrics.Variants = proto.Uint32(uint32(soongMetrics.Variants))
memStats := runtime.MemStats{}
runtime.ReadMemStats(&memStats)
metrics.MaxHeapSize = proto.Uint64(memStats.HeapSys)
metrics.TotalAllocCount = proto.Uint64(memStats.Mallocs)
metrics.TotalAllocSize = proto.Uint64(memStats.TotalAlloc)
return metrics
}
func WriteMetrics(config Config, metricsFile string) error {
metrics := collectMetrics(config)
buf, err := proto.Marshal(metrics)
if err != nil {
return err
}
err = ioutil.WriteFile(absolutePath(metricsFile), buf, 0666)
if err != nil {
return err
}
return nil
}

View file

@ -17,9 +17,11 @@ bootstrap_go_binary {
deps: [ deps: [
"blueprint", "blueprint",
"blueprint-bootstrap", "blueprint-bootstrap",
"golang-protobuf-proto",
"soong", "soong",
"soong-android", "soong-android",
"soong-env", "soong-env",
"soong-ui-metrics_proto",
], ],
srcs: [ srcs: [
"main.go", "main.go",

View file

@ -131,4 +131,15 @@ func main() {
os.Exit(1) os.Exit(1)
} }
} }
// TODO(ccross): make this a command line argument. Requires plumbing through blueprint
// to affect the command line of the primary builder.
if docFile == "" {
metricsFile := filepath.Join(bootstrap.BuildDir, "soong_build_metrics.pb")
err = android.WriteMetrics(configuration, metricsFile)
if err != nil {
fmt.Fprintf(os.Stderr, "error writing soong_build metrics %s: %s", metricsFile, err)
os.Exit(1)
}
}
} }

View file

@ -15,11 +15,15 @@
package build package build
import ( import (
"io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"strconv" "strconv"
"strings" "strings"
soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
"github.com/golang/protobuf/proto"
"github.com/google/blueprint/microfactory" "github.com/google/blueprint/microfactory"
"android/soong/ui/metrics" "android/soong/ui/metrics"
@ -126,4 +130,35 @@ func runSoong(ctx Context, config Config) {
ninja("minibootstrap", ".minibootstrap/build.ninja") ninja("minibootstrap", ".minibootstrap/build.ninja")
ninja("bootstrap", ".bootstrap/build.ninja") ninja("bootstrap", ".bootstrap/build.ninja")
soongBuildMetrics := loadSoongBuildMetrics(ctx, config)
logSoongBuildMetrics(ctx, soongBuildMetrics)
if ctx.Metrics != nil {
ctx.Metrics.SetSoongBuildMetrics(soongBuildMetrics)
}
}
func loadSoongBuildMetrics(ctx Context, config Config) *soong_metrics_proto.SoongBuildMetrics {
soongBuildMetricsFile := filepath.Join(config.OutDir(), "soong", "soong_build_metrics.pb")
buf, err := ioutil.ReadFile(soongBuildMetricsFile)
if err != nil {
ctx.Fatalf("Failed to load %s: %s", soongBuildMetricsFile, err)
}
soongBuildMetrics := &soong_metrics_proto.SoongBuildMetrics{}
err = proto.Unmarshal(buf, soongBuildMetrics)
if err != nil {
ctx.Fatalf("Failed to unmarshal %s: %s", soongBuildMetricsFile, err)
}
return soongBuildMetrics
}
func logSoongBuildMetrics(ctx Context, metrics *soong_metrics_proto.SoongBuildMetrics) {
ctx.Verbosef("soong_build metrics:")
ctx.Verbosef(" modules: %v", metrics.GetModules())
ctx.Verbosef(" variants: %v", metrics.GetVariants())
ctx.Verbosef(" max heap size: %v MB", metrics.GetMaxHeapSize()/1e6)
ctx.Verbosef(" total allocation count: %v", metrics.GetTotalAllocCount())
ctx.Verbosef(" total allocation size: %v MB", metrics.GetTotalAllocSize()/1e6)
} }

View file

@ -145,6 +145,10 @@ func (m *Metrics) Dump(outputPath string) (err error) {
return writeMessageToFile(&m.metrics, outputPath) return writeMessageToFile(&m.metrics, outputPath)
} }
func (m *Metrics) SetSoongBuildMetrics(metrics *soong_metrics_proto.SoongBuildMetrics) {
m.metrics.SoongBuildMetrics = metrics
}
type CriticalUserJourneysMetrics struct { type CriticalUserJourneysMetrics struct {
cujs soong_metrics_proto.CriticalUserJourneysMetrics cujs soong_metrics_proto.CriticalUserJourneysMetrics
} }

View file

@ -197,10 +197,11 @@ type MetricsBase struct {
// The metrics for calling Ninja. // The metrics for calling Ninja.
NinjaRuns []*PerfInfo `protobuf:"bytes,20,rep,name=ninja_runs,json=ninjaRuns" json:"ninja_runs,omitempty"` NinjaRuns []*PerfInfo `protobuf:"bytes,20,rep,name=ninja_runs,json=ninjaRuns" json:"ninja_runs,omitempty"`
// The metrics for the whole build // The metrics for the whole build
Total *PerfInfo `protobuf:"bytes,21,opt,name=total" json:"total,omitempty"` Total *PerfInfo `protobuf:"bytes,21,opt,name=total" json:"total,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` SoongBuildMetrics *SoongBuildMetrics `protobuf:"bytes,22,opt,name=soong_build_metrics,json=soongBuildMetrics" json:"soong_build_metrics,omitempty"`
XXX_unrecognized []byte `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *MetricsBase) Reset() { *m = MetricsBase{} } func (m *MetricsBase) Reset() { *m = MetricsBase{} }
@ -380,6 +381,13 @@ func (m *MetricsBase) GetTotal() *PerfInfo {
return nil return nil
} }
func (m *MetricsBase) GetSoongBuildMetrics() *SoongBuildMetrics {
if m != nil {
return m.SoongBuildMetrics
}
return nil
}
type PerfInfo struct { type PerfInfo struct {
// The description for the phase/action/part while the tool running. // The description for the phase/action/part while the tool running.
Desc *string `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"` Desc *string `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"`
@ -607,6 +615,82 @@ func (m *CriticalUserJourneysMetrics) GetCujs() []*CriticalUserJourneyMetrics {
return nil return nil
} }
type SoongBuildMetrics struct {
// The number of modules handled by soong_build.
Modules *uint32 `protobuf:"varint,1,opt,name=modules" json:"modules,omitempty"`
// The total number of variants handled by soong_build.
Variants *uint32 `protobuf:"varint,2,opt,name=variants" json:"variants,omitempty"`
// The total number of allocations in soong_build.
TotalAllocCount *uint64 `protobuf:"varint,3,opt,name=total_alloc_count,json=totalAllocCount" json:"total_alloc_count,omitempty"`
// The total size of allocations in soong_build in bytes.
TotalAllocSize *uint64 `protobuf:"varint,4,opt,name=total_alloc_size,json=totalAllocSize" json:"total_alloc_size,omitempty"`
// The approximate maximum size of the heap in soong_build in bytes.
MaxHeapSize *uint64 `protobuf:"varint,5,opt,name=max_heap_size,json=maxHeapSize" json:"max_heap_size,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SoongBuildMetrics) Reset() { *m = SoongBuildMetrics{} }
func (m *SoongBuildMetrics) String() string { return proto.CompactTextString(m) }
func (*SoongBuildMetrics) ProtoMessage() {}
func (*SoongBuildMetrics) Descriptor() ([]byte, []int) {
return fileDescriptor_6039342a2ba47b72, []int{5}
}
func (m *SoongBuildMetrics) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SoongBuildMetrics.Unmarshal(m, b)
}
func (m *SoongBuildMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SoongBuildMetrics.Marshal(b, m, deterministic)
}
func (m *SoongBuildMetrics) XXX_Merge(src proto.Message) {
xxx_messageInfo_SoongBuildMetrics.Merge(m, src)
}
func (m *SoongBuildMetrics) XXX_Size() int {
return xxx_messageInfo_SoongBuildMetrics.Size(m)
}
func (m *SoongBuildMetrics) XXX_DiscardUnknown() {
xxx_messageInfo_SoongBuildMetrics.DiscardUnknown(m)
}
var xxx_messageInfo_SoongBuildMetrics proto.InternalMessageInfo
func (m *SoongBuildMetrics) GetModules() uint32 {
if m != nil && m.Modules != nil {
return *m.Modules
}
return 0
}
func (m *SoongBuildMetrics) GetVariants() uint32 {
if m != nil && m.Variants != nil {
return *m.Variants
}
return 0
}
func (m *SoongBuildMetrics) GetTotalAllocCount() uint64 {
if m != nil && m.TotalAllocCount != nil {
return *m.TotalAllocCount
}
return 0
}
func (m *SoongBuildMetrics) GetTotalAllocSize() uint64 {
if m != nil && m.TotalAllocSize != nil {
return *m.TotalAllocSize
}
return 0
}
func (m *SoongBuildMetrics) GetMaxHeapSize() uint64 {
if m != nil && m.MaxHeapSize != nil {
return *m.MaxHeapSize
}
return 0
}
func init() { func init() {
proto.RegisterEnum("soong_build_metrics.MetricsBase_BuildVariant", MetricsBase_BuildVariant_name, MetricsBase_BuildVariant_value) proto.RegisterEnum("soong_build_metrics.MetricsBase_BuildVariant", MetricsBase_BuildVariant_name, MetricsBase_BuildVariant_value)
proto.RegisterEnum("soong_build_metrics.MetricsBase_Arch", MetricsBase_Arch_name, MetricsBase_Arch_value) proto.RegisterEnum("soong_build_metrics.MetricsBase_Arch", MetricsBase_Arch_name, MetricsBase_Arch_value)
@ -616,63 +700,72 @@ func init() {
proto.RegisterType((*ModuleTypeInfo)(nil), "soong_build_metrics.ModuleTypeInfo") proto.RegisterType((*ModuleTypeInfo)(nil), "soong_build_metrics.ModuleTypeInfo")
proto.RegisterType((*CriticalUserJourneyMetrics)(nil), "soong_build_metrics.CriticalUserJourneyMetrics") proto.RegisterType((*CriticalUserJourneyMetrics)(nil), "soong_build_metrics.CriticalUserJourneyMetrics")
proto.RegisterType((*CriticalUserJourneysMetrics)(nil), "soong_build_metrics.CriticalUserJourneysMetrics") proto.RegisterType((*CriticalUserJourneysMetrics)(nil), "soong_build_metrics.CriticalUserJourneysMetrics")
proto.RegisterType((*SoongBuildMetrics)(nil), "soong_build_metrics.SoongBuildMetrics")
} }
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) } func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) }
var fileDescriptor_6039342a2ba47b72 = []byte{ var fileDescriptor_6039342a2ba47b72 = []byte{
// 847 bytes of a gzipped FileDescriptorProto // 962 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xdd, 0x6e, 0xdb, 0x36, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xef, 0x4e, 0xdc, 0x46,
0x14, 0xae, 0x12, 0x25, 0xb6, 0x8e, 0x62, 0x57, 0x65, 0x52, 0x54, 0x5d, 0x11, 0xcc, 0x10, 0xd6, 0x10, 0x8f, 0xe1, 0xe0, 0xce, 0x63, 0xee, 0x30, 0x0b, 0x69, 0x9c, 0x44, 0xa8, 0x27, 0xab, 0x89,
0x21, 0x17, 0xab, 0x5b, 0x78, 0x45, 0x50, 0x18, 0xc5, 0x80, 0xc4, 0x31, 0x8a, 0x2e, 0xb0, 0x5d, 0x50, 0xd5, 0x90, 0x88, 0x46, 0x28, 0x42, 0x51, 0x25, 0x38, 0x50, 0x9a, 0x22, 0xb8, 0xc8, 0xfc,
0x28, 0x71, 0x57, 0x6c, 0x17, 0x02, 0x23, 0xd1, 0x8d, 0x3a, 0x4b, 0x14, 0x48, 0xaa, 0x98, 0x1f, 0x69, 0xd4, 0x7e, 0x58, 0x2d, 0xf6, 0x12, 0x9c, 0xda, 0x5e, 0x6b, 0x77, 0x1d, 0x41, 0xde, 0xa1,
0x62, 0x0f, 0xb9, 0x8b, 0xbd, 0xc7, 0xc0, 0x43, 0xc9, 0x51, 0x00, 0x0f, 0x09, 0x7a, 0x47, 0x9d, 0x0f, 0xd4, 0xcf, 0x7d, 0x96, 0xbe, 0x47, 0xb5, 0xb3, 0xf6, 0x61, 0xda, 0x8b, 0x40, 0xf9, 0x66,
0xef, 0x87, 0xdf, 0xa1, 0xc4, 0x23, 0xe8, 0x64, 0x4c, 0x89, 0x34, 0x96, 0xfd, 0x42, 0x70, 0xc5, 0xcf, 0xef, 0xcf, 0xce, 0xac, 0x67, 0xe6, 0x0e, 0xfa, 0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, 0xe1, 0x19, 0x3c, 0x9e, 0x72, 0x9a,
0x67, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xbd, 0xe2, 0xb1, 0x69, 0x07, 0x00, 0x00, 0x6a, 0x8e, 0x1b, 0x41, 0x27, 0xae, 0x3e, 0xaa, 0xc0, 0xc1, 0xc9, 0x99, 0x7e, 0xb3, 0x5f, 0xce,
0x36, 0x42, 0x71, 0xf8, 0xb7, 0x03, 0x4b, 0xff, 0x6b, 0x71, 0x12, 0x40, 0xb7, 0xb9, 0x37, 0x07,
0xef, 0xad, 0x79, 0x25, 0x8f, 0xa0, 0x57, 0xff, 0x06, 0xd8, 0x82, 0xfa, 0xd1, 0xe4, 0x9d, 0x7c,
0x0f, 0x4b, 0x38, 0x66, 0x94, 0x65, 0x99, 0x88, 0x69, 0x2c, 0xaa, 0x42, 0xd7, 0x7d, 0xb6, 0x88,
0xc0, 0xb6, 0x89, 0x8f, 0x4c, 0x98, 0xac, 0x81, 0xdf, 0xe6, 0xaa, 0xf4, 0x73, 0xd3, 0x74, 0x83,
0x6b, 0xea, 0x51, 0xfa, 0x99, 0x9b, 0xa5, 0x9b, 0xb3, 0x4b, 0x7a, 0xc1, 0x59, 0x69, 0x69, 0xb6,
0xfb, 0xbc, 0x9c, 0x5d, 0xfe, 0xcc, 0x59, 0x69, 0x38, 0x3b, 0xf7, 0x7f, 0xab, 0xe7, 0xba, 0xae,
0x9b, 0xe2, 0xff, 0x8e, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x2a, 0x36, 0xe3, 0x87, 0x08,
0x00, 0x00,
} }

View file

@ -92,6 +92,8 @@ message MetricsBase {
// The metrics for the whole build // The metrics for the whole build
optional PerfInfo total = 21; optional PerfInfo total = 21;
optional SoongBuildMetrics soong_build_metrics = 22;
} }
message PerfInfo { message PerfInfo {
@ -140,4 +142,21 @@ message CriticalUserJourneyMetrics {
message CriticalUserJourneysMetrics { message CriticalUserJourneysMetrics {
// A set of metrics from a run of the critical user journey tests. // A set of metrics from a run of the critical user journey tests.
repeated CriticalUserJourneyMetrics cujs = 1; repeated CriticalUserJourneyMetrics cujs = 1;
}
message SoongBuildMetrics {
// The number of modules handled by soong_build.
optional uint32 modules = 1;
// The total number of variants handled by soong_build.
optional uint32 variants = 2;
// The total number of allocations in soong_build.
optional uint64 total_alloc_count = 3;
// The total size of allocations in soong_build in bytes.
optional uint64 total_alloc_size = 4;
// The approximate maximum size of the heap in soong_build in bytes.
optional uint64 max_heap_size = 5;
} }