Package freenet.support.CPUInformation
Class CPUID
java.lang.Object
freenet.support.CPUInformation.CPUID
public class CPUID extends Object
A class for retrieveing details about the CPU using the CPUID assembly instruction.
Ref: http://en.wikipedia.org/wiki/Cpuid
- Author:
- Iakin
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCPUID.CPUIDResultA class that can (amongst other things I assume) represent the state of the different CPU registers after a call to the CPUID assembly method -
Constructor Summary
Constructors Constructor Description CPUID() -
Method Summary
Modifier and Type Method Description (package private) static intgetCPUExtendedFamily()Only valid if family == 15.(package private) static intgetCPUExtendedModel()Only valid if family == 15, or, for Intel only, family == 6.(package private) static intgetCPUFamily()(package private) static intgetCPUModel()(package private) static StringgetCPUModelName()The model name string, up to 48 characters, as reported by the processor itself.(package private) static intgetCPUStepping()(package private) static intgetCPUType()(package private) static StringgetCPUVendorID()(package private) static intgetECXCPUFlags()(package private) static intgetEDXCPUFlags()(package private) static intgetExtendedEBXFeatureFlags()(package private) static intgetExtendedECXCPUFlags()(package private) static intgetExtendedECXFeatureFlags()There's almost nothing in here.(package private) static intgetExtendedEDXCPUFlags()static CPUInfogetInfo()Returns a CPUInfo item for the current type of CPU If I could I would declare this method in a interface named CPUInfoProvider and implement that interface in this class.static intgetJcpuidVersion()Return the jcpuid versionstatic voidmain(String[] args)
-
Constructor Details
-
CPUID
public CPUID()
-
-
Method Details
-
getJcpuidVersion
public static int getJcpuidVersion()Return the jcpuid version- Returns:
- 0 if no jcpuid available, 2 if version not supported
- Since:
- 0.9.26
-
getCPUVendorID
-
getCPUFamily
static int getCPUFamily()- Returns:
- 0-15
-
getCPUModel
static int getCPUModel()- Returns:
- 0-15
-
getCPUExtendedModel
static int getCPUExtendedModel()Only valid if family == 15, or, for Intel only, family == 6. Left shift by 4 and then add model to get full model.- Returns:
- 0-15
-
getCPUType
static int getCPUType()- Returns:
- 0-15
-
getCPUExtendedFamily
static int getCPUExtendedFamily()Only valid if family == 15. Add family to get full family.- Returns:
- 0-255
-
getCPUStepping
static int getCPUStepping()- Returns:
- 0-15
-
getEDXCPUFlags
static int getEDXCPUFlags() -
getECXCPUFlags
static int getECXCPUFlags() -
getExtendedECXCPUFlags
static int getExtendedECXCPUFlags() -
getExtendedEDXCPUFlags
static int getExtendedEDXCPUFlags()- Since:
- 0.8.7
-
getExtendedEBXFeatureFlags
static int getExtendedEBXFeatureFlags()- Since:
- 0.9.26
-
getExtendedECXFeatureFlags
static int getExtendedECXFeatureFlags()There's almost nothing in here.- Since:
- 0.9.26
-
getCPUModelName
The model name string, up to 48 characters, as reported by the processor itself.- Returns:
- trimmed string, null if unsupported
- Since:
- 0.9.16
-
getInfo
Returns a CPUInfo item for the current type of CPU If I could I would declare this method in a interface named CPUInfoProvider and implement that interface in this class. This would make it easier for other people to understand that there is nothing preventing them from coding up new providers, probably using other detection methods than the x86-only CPUID instruction- Throws:
UnknownCPUException
-
main
-