From c4c182140adedf300800778127840e3b8b9f7423 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 23 Apr 2016 21:18:34 +0200 Subject: [PATCH] internal/trace: fix event ordering for coarse timestamps Arm arch uses coarse-grained kernel timer as cputicks. As the result sort.Sort smashes trace entirely. Use sort.Stable instead. Change-Id: Idfa017a86a489be58cf239f7fe56d7f4b66b52a9 Reviewed-on: https://go-review.googlesource.com/22317 Run-TryBot: Dmitry Vyukov TryBot-Result: Gobot Gobot Reviewed-by: Austin Clements --- src/internal/trace/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/trace/order.go b/src/internal/trace/order.go index f9ec44c745..8ca2da52aa 100644 --- a/src/internal/trace/order.go +++ b/src/internal/trace/order.go @@ -133,7 +133,7 @@ func order1007(m map[int][]*Event) (events []*Event, err error) { ev.Ts = ts } } - sort.Sort(eventList(events)) + sort.Stable(eventList(events)) return }