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: randomNumber is unused on linux/arm64 #15147

Closed
bradfitz opened this issue Apr 6, 2016 · 2 comments
Closed

runtime: randomNumber is unused on linux/arm64 #15147

bradfitz opened this issue Apr 6, 2016 · 2 comments

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Apr 6, 2016

In the runtime, linux/arm defines a global variable randomNumber which is used by cputicks.

arm64 instead has this in src/runtime/os_linux_arm64.go

var randomNumber uint32

//go:nosplit
func cputicks() int64 {
        // Currently cputicks() is used in blocking profiler and to seed fastrand1().
        // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.
        // randomNumber provides better seeding of fastrand1.
        return nanotime() + int64(randomNumber)
}

... but never defines randomNumber to anything, unlike arm.

Bug? Incomplete? Missing TODO?

@bradfitz bradfitz added this to the Unplanned milestone Apr 6, 2016
@minux
Copy link
Member

minux commented Apr 6, 2016 via email

@gopherbot
Copy link

CL https://golang.org/cl/21580 mentions this issue.

@golang golang locked and limited conversation to collaborators Apr 6, 2017
@rsc rsc unassigned minux Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants