Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime/race: implement race detector for ppc64le #23731

Closed
laboger opened this issue Feb 7, 2018 · 8 comments
Closed

runtime/race: implement race detector for ppc64le #23731

laboger opened this issue Feb 7, 2018 · 8 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@laboger
Copy link
Contributor

laboger commented Feb 7, 2018

What version of Go are you using (go version)?

Planned for go 1.11

What operating system and processor architecture are you using (go env)?

ppc64le any distro

/cc @dvyukov

@laboger
Copy link
Contributor Author

laboger commented Feb 7, 2018

@ceseo and I are working on this, we can build golang and get the race tests to pass but now trying to get the LLVM code upstream.

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 28, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Mar 28, 2018
@laboger
Copy link
Contributor Author

laboger commented Mar 29, 2018

I have the golang changes, still waiting for the latest LLVM code to be submitted upstream so the syso can be built for ppc64le. (TSAN already works on ppc64le with Clang.)

@ceseo
Copy link
Contributor

ceseo commented Apr 16, 2018

@laboger LLVM changes merged into revision 330122.

You can proceed with your changes.

@laboger
Copy link
Contributor Author

laboger commented Apr 16, 2018

We need to understand how to get the syso file built so it can be added to the runtime/race directory.

@gopherbot
Copy link

Change https://golang.org/cl/107935 mentions this issue: runtime/race: implement race detector for ppc64le

@gopherbot
Copy link

Change https://golang.org/cl/112881 mentions this issue: cmd/racebuild: add linux/ppc64le

gopherbot pushed a commit to golang/build that referenced this issue May 11, 2018
Updates golang/go#19273.
Updates golang/go#24354.
Updates golang/go#23731.

Change-Id: Iad8870b265e7e3b56b5219d3367ccef70dcc0679
Reviewed-on: https://go-review.googlesource.com/112881
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
gopherbot pushed a commit that referenced this issue Jun 11, 2018
This adds the support to enable the race detector for ppc64le.

Added runtime/race_ppc64le.s to manage the calls from Go to the
LLVM tsan functions, mostly converting from the Go ABI to the
PPC64 ABI expected by Clang generated code.

Changed racewalk.go to call racefuncenterfp instead of racefuncenter
on ppc64le to allow the caller pc to be obtained in the asm code
before calling the tsan version.

Changed the set up code for racecallbackthunk so it doesn't use
the autogenerated save and restore of the link register since that
sequence uses registers inconsistent with the normal ppc64 ABI.

Made various changes to recognize that race is supported for
ppc64le.

Ensured that tls_g is updated and accessible from race_linux_ppc64le.s
so that the race ctx can be obtained and passed to tsan functions.

This enables the race tests for ppc64le in cmd/dist/test.go and
increases the timeout when running the benchmarks with the -race
option to avoid timing out.

Updates #24354, #23731

Change-Id: Ib97dc7ac313e6313c836dc7d2fb698f9d8fba3ef
Reviewed-on: https://go-review.googlesource.com/107935
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@laboger
Copy link
Contributor Author

laboger commented Jun 20, 2018

This is in.

@laboger laboger closed this as completed Jun 20, 2018
@benesch
Copy link
Contributor

benesch commented Sep 18, 2018

Should this line from racebuild be uncommented now that this is closed? https://github.com/golang/build/blob/1d8c3548c0bbc477bdf7cb400b72a4cf9c7d362e/cmd/racebuild/racebuild.go#L112

@golang golang locked and limited conversation to collaborators Sep 18, 2019
@rsc rsc unassigned laboger Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants