Processors (CPU)
Central Processing Unit
SpecProbe can probe CPU information by calling the HardwareProber.Processors property. This populates the following values in accordance to the available information:
ProcessorCores
CoresForEachCore
Always 1 on ARM systems
TotalCores
L1CacheSize
Unavailable on ARM systems
L2CacheSize
Unavailable on ARM systems
L3CacheSize
Unavailable on ARM systems
Unavailable on macOS
Name
A list of part names on ARM systems
CpuidVendor
Can sometimes be empty on some systems.
Unavailable on ARM systems
Vendor
A list of implementers on ARM systems
Speed
Unavailable on ARM systems
Hypervisor
True if running on a hypervisor; false otherwise. If you've enabled WSL or Hyper-V on Windows, it may return true.
Unavailable on ARM systems
CpuidHypervisorVendor
Unavailable on ARM systems
HypervisorVendor
Unavailable on ARM systems
OnHypervisor
True if a hypervisor is running and a hypervisor is known.
Unavailable on ARM syst
How parsing works
This section describes how parsing works for the below systems:
Linux
CPU information is obtained by using the cpuinfo file from the /proc interface usually accessible by normal users on Linux systems. The following entries are searched for:
physical idcpu corescpu MHzvendor_idmodel nameprocessorflagsProcessor(ARM)CPU implementer(ARM)CPU part(ARM)
If the system is running either 32-bit or 64-bit, SpecProbe attempts to get the CPU name and the vendor string directly from the system processor by calling the cpuid assembly instruction on your processor using the native wrapper library.
For cache sizes and other properties that don't have their entry in the /proc/cpuinfo file, it attempts to use the /sys/devices/system/cpu folder to get the appropriate files and use them to calculate these values.
Whole processor's cache size can be calculated using only the primary processor's information, which is located in the cache folder of /sys/devices/system/cpu/cpu0. SpecProbe attempts to use the following folders for all the cache levels:
L1 cache:
{cacheFolder}/index1L2 cache:
{cacheFolder}/index2L3 cache:
{cacheFolder}/index3
The size file in the abovementioned folders is represented in kilobytes, so we need to convert the values to bytes by multiplying these values by 1024. Finally, if SpecProbe is not run from ARM processor, it queries the feature list using the CPUID instruction to get all features by parsing the integer as a sequence of bits by reading bit by bit.
Windows
For Windows systems, it calls the native Windows API GetLogicalProcessorInformation() function twice (the first time to get number of cores, and the second time to populate processor information), which contains some of the necessary information needed to, such as the processor core count and the cache sizes.
For core count, the
RelationProcessorCorerelationship type specifies the number of real processor cores (not multiplied by 2x or more for hyper-threaded systems).For cores per physical core, the
RelationProcessorPackagerelationship type specifies how many processor cores are there per each physical core.For caches, the
RelationCacherelationship type specifies the cache size in bytes (cacheInfo.Size) for each cache level as specified in thecacheInfo.Levelproperty.
If your Windows system is running on 32-bit or 64-bit, SpecProbe attempts to call its helper native library which attempts to call the cpuid machine instruction to get the CPU name and the CPU vendor.
For clock speed, it queries the CallNtPowerInformation() function result to get the maximum clock speed in MHz. Finally, if SpecProbe is not run from ARM processor, it queries the feature list using the CPUID instruction to get all features by parsing the integer as a sequence of bits by reading bit by bit.
macOS
The name is obtained using the helper library, SpecProber, and optionally falls back to the sysctl method if it failed to get the name.
SpecProbe executes the sysctl command with the following arguments:
machdep.cpu.core_count: CPU core countmachdep.cpu.cores_per_package: CPU cores per processor packagehw.cpufrequency: The frequency of the CPU in hertz (Hz)machdep.cpu.vendor: The processor vendor (GenuineIntel, AuthenticAMD, etc.)machdep.cpu.brand_string: The processor brand stringhw.l1icachesize: L1 cache size in byteshw.l2cachesize: L2 cache size in bytes
Then, SpecProbe probes these values and processes them as appropriate. Finally, if SpecProbe is not run from ARM processor, it queries the feature list using the CPUID instruction to get all features by parsing the integer as a sequence of bits by reading bit by bit.
CPU flags
The following CPU flags are parsed and queried by SpecProbe:
fpuvmedepsetscmsrpaemcecx8apicmtrr_reservedsepmtrrpgemcacmovpatpse-36psnclfshnxdsacpimmxfxsrssesse2sshtttmia64pbesse3pclmulqdqdtes64monitords-cplvmxsmxesttm2ssse3cnxt-idsdbgfmacx16xtprpdcmpchnlpciddcasse4.1sse4.2x2apicmovbepopcnttsc-deadlineaes-nixsaveosxsaveavxf16crdrndhypervisorfpuvmedepsetscmsrpaemcecx8apicsyscall_k6syscallmtrrpgemcacmovpatpse-36eccnxmmxextmmxfxsrfxsr_optpdpe1gbrdtscplm3dnowext3dnowlahf_lmcmp_legacysvmextapiccr8_legacyabm/lzcntsse4amisalignsse3dnowprefetchosvwibsxopskinitwdtlwpfma4tcenodeid_msrtbmtopoextperfctr_coreperfctr_nbstreamperfmondbxperftscpcx_l2imonitorxaddr_mask_extfsgsbaseia32_tsc_adjust_msrsgxbmi1hleavx2fdp-excptn-onlysmepbmi2ermsinvpcidrtmrdt-m/pqmfpucsdsmpxrdt-a/pqeavx512-favx512-dqrdseedadxsmapavx512-ifmapcommitclflushoptclwbptavx512-pfavx512-eravx512-cdshaavx512-bwavx512-vlprefetchwt1avx512-vbmiumippkuospkewaitpkgavx512-vbmi2cet_ss/shstkgfnivaesvpclmulqdqavx512-vnniavx512-bitalgtme_enavx512-vpopcntdqfzmla57mawaurdpidklbus-lock-detectcldemotemprrmovdirimovdir64benqcmdsgx-lcpkssgx-temsgx-keysavx512-4vnniwavx512-4fmapsfsrmuintravx512-vp2intersectsrbds-ctrlmd-clearrtm-always-abortrtm-force-abortserializehybridtsxldtrkpconfiglbrcet-ibtamx-bf16avx512-fp16amx-tileamx-int8ibrs/spec_ctrlstibpl1d_flushia32_arch_capabilities_msris32_core_capabilities_msrssbdsha512sm3sm4rao-intavx-vnniavx512-bf16lasscmpccxaddarchperfmonextdedupfzrmfsrsrsrcsfredlkgswrmsrnsnmi_srcamx-fp16hresetavx-ifmalammsrlistinvd_disable_post_bios_donepbnpbndkblegacy_reduced_isasipi64avx-vnni-int8avx-ne-convertamx-complexavx-vnni-int16utmrprefetchiuser_msruiret-uif-from-rflagscet-sssavx10apx_fmwaitpsfdipred_ctrlrrsba_ctrlddpd_ubhi_ctrlmcdt_nouc_lock_nomonitor_mitg_no
Last updated