sun.cpu.isalist
Dr Andrew John Hughes
gnu_andrew at member.fsf.org
Tue Feb 15 13:58:46 UTC 2011
2011/2/15 Dmytro Sheyko <dmytro_sheyko at hotmail.com>:
> Sure, we can parse /proc/cpuinfo output on Linux in order to provide valid
> isalist, but it seems it's not worth doing. Maybe we can just get rid of it.
>
>
>> Date: Mon, 14 Feb 2011 20:44:23 -0600
>> From: david.lloyd at redhat.com
>> To: core-libs-dev at openjdk.java.net
>> Subject: Re: sun.cpu.isalist
>>
>> On 02/14/2011 07:12 PM, David Holmes wrote:
>> > Dmytro Sheyko said the following on 02/15/11 03:49:
>> >> I can see that such system property as "sun.cpu.isalist" is not set on
>> >> Linux, but it is set on Solaris and Windows.
>> >> What is the purpose of this property and shouldn't it be set on Linux
>> >> as well?
>> >
>> > I don't see the property actually being used anywhere these days. No
>> > idea what it may have been used for other than printing the property for
>> > information (there's a Java2D demo that does that).
>> >
>> > Is there an API on Linux that will provide the information? Both Solaris
>> > and Windows have a "sys info" call that can provide this information.
>> > But Linux sysinfo is something different.
>>
>> /proc/cpuinfo has a flags field, maybe that's similar enough?
>>
>> --
>> - DML
>
I looked at this briefly last night. The ISA sysinfo call results can
be seen on Solaris by running isainfo:
$ isainfo
amd64 i386
That's the results from an x86_64 box. I presume x86 would just
return i386. /proc/cpuinfo's flags is quite a bit more detailed:
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 est tm2 ssse3
cx16 xtpr pdcm dca sse4_1 lahf_lm dts tpr_shadow vnmi flexpriority
so it's not the same thing. Also the output of /proc/cpuinfo is
per-core, so on an 8-core box there are 8 sets of flags. The standard
property os.arch
will already return amd64 on a x86_64 GNU/Linux box. There may be
more advantage on SPARC and I guess that's what this was originally
designed for.
--
Andrew :-)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
More information about the core-libs-dev
mailing list