]> Cypherpunks.ru repositories - gostls13.git/commit
runtime/trace: ignore fallback stacks in test
authorRhys Hiltner <rhys@justin.tv>
Tue, 21 Jun 2022 19:28:48 +0000 (12:28 -0700)
committerRhys Hiltner <rhys@justin.tv>
Tue, 21 Jun 2022 22:05:17 +0000 (22:05 +0000)
commitab422f2749bc21514cb22d444bae460f5fa22376
tree85d9f8daf4ab657f2dce3c15414fe60524c916de
parent66685fb7dd72531aed6f1b3f4de43799bb26c052
runtime/trace: ignore fallback stacks in test

When runtime.sigprof encounters a stack that gentraceback is unable to
process, it synthesizes a call stack with a sentinel function (such as
runtime._System) at the leaf.

The test to confirm that runtime/trace and runtime/pprof have similar
views of CPU profile samples has trouble with those stacks. The test
confirms that the samples match by confirming that their symbolized
forms match, and the symbolization procedure is very different for the
two packages.

Skip the samples that the CPU profiler's view symbolizes to include one
of runtime.sigprof's sentinel functions at the leaf. (The test design
expects the CPU profiler to under-report samples relative to the
execution tracer.)

Fixes #53378

Change-Id: I60c27de4c69b454057d28a3b6e12d70369de4c4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/413457
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Rhys Hiltner <rhys@justin.tv>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/trace/trace_test.go