aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-10-12 20:46:34 -0700
committerDan Willemsen <dwillemsen@google.com>2017-10-14 00:42:30 +0000
commit75d2c170b42f98dae912be26fb6884621217065c (patch)
tree0ba438bde84c87199debd70dd9c311b7e4bccb37 /ui
parent37cba1471f5275676c1e6d9a94f0b5597862b1db (diff)
downloadbuild_soong-75d2c170b42f98dae912be26fb6884621217065c.tar.gz
build_soong-75d2c170b42f98dae912be26fb6884621217065c.tar.bz2
build_soong-75d2c170b42f98dae912be26fb6884621217065c.zip
Always record kati stats into soong log
Pass --dump-stats to ckati, but filter out the '*kati*' lines so that they only end up in our verbose output. That way we've always got access to the statistics. Bug: 36182021 Test: m nothing; cat out/soong.log Change-Id: Iaf7a814fc67f3e475c913faf69924a7f4e2ae3b3
Diffstat (limited to 'ui')
-rw-r--r--ui/build/kati.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/build/kati.go b/ui/build/kati.go
index c58621e7..7bb721de 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -77,6 +77,7 @@ func runKati(ctx Context, config Config) {
"--color_warnings",
"--gen_all_targets",
"--werror_find_emulator",
+ "--kati_stats",
"-f", "build/make/core/main.mk",
}
@@ -109,6 +110,7 @@ func runKati(ctx Context, config Config) {
}
var katiIncludeRe = regexp.MustCompile(`^(\[\d+/\d+] )?including [^ ]+ ...$`)
+var katiLogRe = regexp.MustCompile(`^\*kati\*: `)
func katiRewriteOutput(ctx Context, pipe io.ReadCloser) {
haveBlankLine := true
@@ -119,6 +121,12 @@ func katiRewriteOutput(ctx Context, pipe io.ReadCloser) {
line := scanner.Text()
verbose := katiIncludeRe.MatchString(line)
+ // Only put kati debug/stat lines in our verbose log
+ if katiLogRe.MatchString(line) {
+ ctx.Verbose(line)
+ continue
+ }
+
// For verbose lines, write them on the current line without a newline,
// then overwrite them if the next thing we're printing is another
// verbose line.