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
This commit is contained in:
parent
37cba1471f
commit
75d2c170b4
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue