Package oshi.driver.windows
Class LogicalProcessorInformation
java.lang.Object
oshi.driver.windows.LogicalProcessorInformation
Utility to query Logical Processor Information
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
getBitMatchingPackageNumber
(List<Long> packageMaskList, int logProc) Iterate over the package mask list and find a matching mask indexstatic Triplet
<List<CentralProcessor.LogicalProcessor>, List<CentralProcessor.PhysicalProcessor>, List<CentralProcessor.ProcessorCache>> Get a list of logical processors on this machinestatic Triplet
<List<CentralProcessor.LogicalProcessor>, List<CentralProcessor.PhysicalProcessor>, List<CentralProcessor.ProcessorCache>> Get a list of logical processors on this machine.private static int
getMatchingCore
(List<com.sun.jna.platform.win32.WinNT.GROUP_AFFINITY> cores, int g, int lp) private static int
getMatchingPackage
(List<com.sun.jna.platform.win32.WinNT.GROUP_AFFINITY[]> packages, int g, int lp) private static List
<CentralProcessor.PhysicalProcessor> getPhysProcs
(List<com.sun.jna.platform.win32.WinNT.GROUP_AFFINITY> cores, Map<com.sun.jna.platform.win32.WinNT.GROUP_AFFINITY, Integer> coreEfficiencyMap, Map<Integer, Integer> corePkgMap, Map<Integer, String> coreCpuidMap)
-
Field Details
-
IS_WIN10_OR_GREATER
private static final boolean IS_WIN10_OR_GREATER
-
-
Constructor Details
-
LogicalProcessorInformation
private LogicalProcessorInformation()
-
-
Method Details
-
getLogicalProcessorInformationEx
public static Triplet<List<CentralProcessor.LogicalProcessor>,List<CentralProcessor.PhysicalProcessor>, getLogicalProcessorInformationEx()List<CentralProcessor.ProcessorCache>> Get a list of logical processors on this machine. Requires Windows 7 and higher.- Returns:
- A list of logical processors
-
getPhysProcs
-
getMatchingPackage
private static int getMatchingPackage(List<com.sun.jna.platform.win32.WinNT.GROUP_AFFINITY[]> packages, int g, int lp) -
getMatchingCore
private static int getMatchingCore(List<com.sun.jna.platform.win32.WinNT.GROUP_AFFINITY> cores, int g, int lp) -
getLogicalProcessorInformation
public static Triplet<List<CentralProcessor.LogicalProcessor>,List<CentralProcessor.PhysicalProcessor>, getLogicalProcessorInformation()List<CentralProcessor.ProcessorCache>> Get a list of logical processors on this machine- Returns:
- A list of logical processors
-
getBitMatchingPackageNumber
Iterate over the package mask list and find a matching mask index- Parameters:
packageMaskList
- The list of bitmasks to iteratelogProc
- The bit to find matching mask- Returns:
- The index of the list which matched the bit
-