[fpc-devel] Feature announcement: Extension of TThread's interface

Ewald ewald at yellowcouch.org
Thu Dec 27 21:38:48 CET 2012


Hmmm, that;s indeed quite some different output you've got there. Mine
looks like this:

    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 23
    model name      : Intel(R) Core(TM)2 Duo CPU     E8600  @ 3.33GHz
    stepping        : 10
    microcode       : 0xa07
    cpu MHz         : 2000.000
    cache size      : 6144 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 2
    apicid          : 0
    initial apicid  : 0
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 13
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr
    pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
    pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl
    aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr
    pdcm sse4_1 xsave lahf_lm dtherm tpr_shadow vnmi flexpriority
    bogomips        : 6668.63
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 36 bits physical, 48 bits virtual
    power management:


(this is repeated twice, with only `processor:0` changing to `processor:1`)


Since this is the same kind of output I got on several other linux
distributions/architectures(--> 32 bit versus 64 bit intel), I assumed
it was kinda `standard`. Then again assume = ...

Well, anyway, it's a bit trickier than I thought at first in that case.




Once upon a time, on 12/27/2012 08:01 PM to be precise, Mark Morgan
Lloyd said:
> Ewald wrote:
>
>> Now, for the implementation of ProcessorCount I've got code here that
>> reads the amount of processor cores from `/proc/cpuinfo` (linux only I
>> think) and some assembly code [asmmode att] (tested on x86_64 and i386)
>> that *tries* to get the amount of cpu cores by the use of CPUID. The
>
> In the general case, you have to be careful with this since (a) every
> architecture puts different info in /proc/cpuinfo and (b) the
> processor numbering and affinity vectors can have gaps.
>
> type            : sun4u
> ncpus probed    : 12
> ncpus active    : 12
> ..
> CPU0:           online
> CPU1:           online
> CPU4:           online
> CPU5:           online
> CPU8:           online
> CPU9:           online
> CPU10:          online
> CPU11:          online
> CPU12:          online
> CPU13:          online
> CPU14:          online
> CPU15:          online
>


-- 
Ewald

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20121227/b5ad679f/attachment.html>


More information about the fpc-devel mailing list