Package cpu implements processor feature detection used by the Go standard library.

Static methods

staticinlineinitialize(_env:GoString):Void

Initialize examines the processor and sets the relevant variables above. This is called by the runtime package early in program initialization, before normal init functions are run. env is set by runtime if the OS supports cpu feature options in GODEBUG.

staticinlinename():GoString

Name returns the CPU name given by the vendor if it can be read directly from memory or by CPU instructions. If the CPU name can not be determined an empty string is returned.

Implementations that use the Operating System (e.g. sysctl or /sys/) to gather CPU information for display should be placed in internal/sysinfo.