Commit ca6f7e45 authored by Russ Cox's avatar Russ Cox

runtime/trace: report negative frequency as a time-ordering problem

This should fix the solaris/amd64 builder.

Change-Id: Idd6460cc9e842f7b874c9757379986aa723c974c
Reviewed-on: https://go-review.googlesource.com/12922Reviewed-by: default avatarAustin Clements <austin@google.com>
parent 4e150920
...@@ -191,8 +191,10 @@ func parseEvents(rawEvents []rawEvent) (events []*Event, err error) { ...@@ -191,8 +191,10 @@ func parseEvents(rawEvents []rawEvent) (events []*Event, err error) {
case EvFrequency: case EvFrequency:
ticksPerSec = int64(raw.args[0]) ticksPerSec = int64(raw.args[0])
if ticksPerSec <= 0 { if ticksPerSec <= 0 {
err = fmt.Errorf("EvFrequency contains invalid frequency %v at offset 0x%x", // The most likely cause for this is tick skew on different CPUs.
ticksPerSec, raw.off) // For example, solaris/amd64 seems to have wildly different
// ticks on different CPUs.
err = ErrTimeOrder
return return
} }
case EvTimerGoroutine: case EvTimerGoroutine:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment