- Enclosing interface:
- CentralProcessor
-
Constructor Summary
ConstructorDescriptionPhysicalProcessor
(int physicalPackageNumber, int physicalProcessorNumber) PhysicalProcessor
(int physicalPackageNumber, int physicalProcessorNumber, int efficiency, String idString) -
Method Summary
Modifier and TypeMethodDescriptionint
Gets a platform specific measure of processor performance vs. efficiency, useful for identifying cores in hybrid/System on Chip (SoC) processors such as ARM's big.LITTLE architecture, Apple's M1, and Intel's P-core and E-core hybrid technology.Gets a platform specific identification string representing this core.int
Gets the package id.int
Gets the core id.toString()
-
Constructor Details
-
PhysicalProcessor
public PhysicalProcessor(int physicalPackageNumber, int physicalProcessorNumber) -
PhysicalProcessor
public PhysicalProcessor(int physicalPackageNumber, int physicalProcessorNumber, int efficiency, String idString)
-
-
Method Details
-
getPhysicalPackageNumber
public int getPhysicalPackageNumber()Gets the package id. This is also the physical package number which corresponds toCentralProcessor.LogicalProcessor.getPhysicalPackageNumber()
.- Returns:
- the physicalProcessorNumber
-
getPhysicalProcessorNumber
public int getPhysicalProcessorNumber()Gets the core id. This is also the physical processor number which corresponds toCentralProcessor.LogicalProcessor.getPhysicalProcessorNumber()
.- Returns:
- the physicalProcessorNumber
-
getEfficiency
public int getEfficiency()Gets a platform specific measure of processor performance vs. efficiency, useful for identifying cores in hybrid/System on Chip (SoC) processors such as ARM's big.LITTLE architecture, Apple's M1, and Intel's P-core and E-core hybrid technology. A core with a higher value for the efficiency class has intrinsically greater performance and less efficiency than a core with a lower value for the efficiency class.- Returns:
- On Windows 10 and higher, returns the
EfficiencyClass
value from thePROCESSOR_RELATIONSHIP
structure.On macOS with Apple Silicon, emulates the same relative efficiency class values as Windows.
On Linux, returns the
cpu_capacity
value from sysfs. This is an optional cpu node property representing CPU capacity expressed in normalized DMIPS/MHz.On OpenBSD, FreeBSD, and Solaris with ARM big.LITTLE processors, emulates the same relative efficiency class values as Windows.
For unimplemented operating systems or architectures, returns 0.
- See Also:
-
getIdString
Gets a platform specific identification string representing this core. This string requires user parsing to obtain meaningful information. As this is an experimental feature, users should not rely on the format.- Returns:
- On Windows, returns the per-core Processor ID (CPUID).
On macOS, returns a compatibility string from the IO Registry identifying hybrid cores.
On Linux, returns the
MODALIAS
value for the core's driver.On OpenBSD, FreeBSD, and Solaris, returns a per-core CPU identification string.
For unimplemented operating systems, returns an empty string.
-
toString
-