diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2021-01-05 10:35:30 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-01-05 11:15:55 +0100 |
| commit | 270cde8ebe422a3197eec97faf00d3f10b0b0148 (patch) | |
| tree | 3b534453949994c2a17ba6a02a2b0ee07cebd792 /tools/syz-showprio | |
| parent | a0234d980eccaa87f5821ac8e95ed9c94a104acf (diff) | |
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.
Diffstat (limited to 'tools/syz-showprio')
| -rw-r--r-- | tools/syz-showprio/showprio.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } |
