summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Willemsen <dwillemsen@google.com> 2017-10-12 20:46:34 -0700
committer Dan Willemsen <dwillemsen@google.com> 2017-10-14 00:42:30 +0000
commit75d2c170b42f98dae912be26fb6884621217065c (patch)
tree0ba438bde84c87199debd70dd9c311b7e4bccb37
parent37cba1471f5275676c1e6d9a94f0b5597862b1db (diff)
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
-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 c58621e79..7bb721dec 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.