]> Cypherpunks repositories - gostls13.git/commit
runtime/trace: test detection of broken timestamps
authorDmitry Vyukov <dvyukov@google.com>
Thu, 7 Apr 2016 13:48:15 +0000 (15:48 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Sun, 24 Apr 2016 09:11:37 +0000 (09:11 +0000)
commit75b844f0d228bda5dea2aabae096909f81355bac
treef3751910ecac44a0ff89309efc03a8c520ce269e
parent687fe991e42f15fe1f491680c615ef96568f780a
runtime/trace: test detection of broken timestamps

On some processors cputicks (used to generate trace timestamps)
produce non-monotonic timestamps. It is important that the parser
distinguishes logically inconsistent traces (e.g. missing, excessive
or misordered events) from broken timestamps. The former is a bug
in tracer, the latter is a machine issue.

Test that (1) parser does not return a logical error in case of
broken timestamps and (2) broken timestamps are eventually detected
and reported.

Change-Id: Ib4b1eb43ce128b268e754400ed8b5e8def04bd78
Reviewed-on: https://go-review.googlesource.com/21608
Reviewed-by: Austin Clements <austin@google.com>
src/internal/trace/parser.go
src/runtime/trace/trace_stack_test.go
src/runtime/trace/trace_test.go