From 270cde8ebe422a3197eec97faf00d3f10b0b0148 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 5 Jan 2021 10:35:30 +0100 Subject: prog: make priority calculation faster Switch from float32 to int32. Float32 is super slow in arm emulation. Plus flats are generally non-deterministic due to order of operations, so we needed to do additional sorts to deal with that. Now we don't. --- tools/syz-showprio/showprio.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/syz-showprio') diff --git a/tools/syz-showprio/showprio.go b/tools/syz-showprio/showprio.go index 3f4cf452f..0729f4388 100644 --- a/tools/syz-showprio/showprio.go +++ b/tools/syz-showprio/showprio.go @@ -48,13 +48,13 @@ func main() { showPriorities(enabled, target.CalculatePriorities(corpus), target) } -func showPriorities(calls []string, prios [][]float32, target *prog.Target) { +func showPriorities(calls []string, prios [][]int32, target *prog.Target) { printLine(append([]string{"CALLS"}, calls...)) for _, callRow := range calls { line := []string{callRow} for _, callCol := range calls { val := prios[target.SyscallMap[callRow].ID][target.SyscallMap[callCol].ID] - line = append(line, fmt.Sprintf("%.2f", val)) + line = append(line, fmt.Sprintf("%v", val)) } printLine(line) } -- cgit mrf-deployment