RFR (s) 8085865: hs_err improvement: Printing /proc/cpuinfo makes too long hs_err files

Coleen Phillimore coleen.phillimore at oracle.com
Wed Jun 17 12:15:03 UTC 2015



On 6/17/15 12:08 AM, David Holmes wrote:
> Hi Coleen,
>
> On 16/06/2015 10:10 AM, Coleen Phillimore wrote:
>>
>> Hi, I've added Chris's requested flags line but this made me change more
>> lines of code because the flags line can be pretty long and we don't
>> want to allocate more stack space during error handling.
>>
>> http://cr.openjdk.java.net/~coleenp/8085865.03/
>
> The logic here is a little odd to me:
>
> 2227         if (strstr(buf, "model name") != NULL) {
> 2228           if (!model_name_printed) {
> 2229             st->print_raw("\nCPU Model and flags from 
> /proc/cpuinfo:\n");
> 2230             st->print_raw(buf);
> 2231             model_name_printed = true;
> 2232           } else {
> 2233             // model name printed but not flags?  Odd, just exit.
> 2234             return true;
> 2235           }
> 2236         }
>
> You'll only hit 2233 if "model name" appears twice (with no flag line 
> in between). Is that assumed to be the "model name" from a second 
> processor section?

Yes, it is assumed.  It is a little odd but I didn't want to add more 
logic for waiting to find the 'flags' section, and potentially printing 
model name 32 times.

>
> Otherwise seems okay.

Thanks!
Coleen
>
> Thanks,
> David
>
>> Tested on my machine.  It's a little bit longer but nowhere nearly as
>> long as printing the 4 processors (or 32 on some other people's 
>> machines).
>>
>> CPU Model and flags from /proc/cpuinfo:
>> model name      : Intel(R) Core(TM) i5-3550 CPU @ 3.30GHz
>> 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 rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl
>> xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor
>> ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic
>> popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb
>> xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase
>> smep erms
>>
>> Also tested with JPRT.
>>
>> Thanks,
>> Coleen
>>
>> On 6/15/15 1:39 PM, Coleen Phillimore wrote:
>>>
>>>
>>> On 6/15/15 12:04 PM, Christian Thalinger wrote:
>>>>> On Jun 12, 2015, at 3:07 AM, Coleen Phillimore
>>>>> <coleen.phillimore at oracle.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On 6/12/15 4:17 AM, Mikael Gerdin wrote:
>>>>>> Hi Coleen,
>>>>>>
>>>>>> On 2015-06-11 18:06, Coleen Phillimore wrote:
>>>>>>> Summary: summarize information from linux-x86; it's too long and
>>>>>>> redundant
>>>>>>>
>>>>>>> The cpuinfo on one linux/x86 machine now prints:
>>>>>>>
>>>>>>> /proc/cpuinfo:
>>>>>>> model name      : Intel(R) Core(TM) i5-3550 CPU @ 3.30GHz
>>>>>>>
>>>>>>> on 32 bit machine:
>>>>>>> *
>>>>>>> */proc/cpuinfo:
>>>>>>> model name      : Intel(R) Xeon(R) CPU L5520  @ 2.27GHz
>>>>>>> **
>>>>>>> Other linux platforms are unaffected because they don't print as 
>>>>>>> much
>>>>>>> and information seems not redundant.
>>>>>> Would you be ok with printing one of the "flags" lines as well?
>>>>>>
>>>>>> 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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts
>>>>>> rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni
>>>>>> pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr
>>>>>> pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes
>>>>>> xsave avx lahf_lm ida arat epb pln pts dtherm tpr_shadow vnmi
>>>>>> flexpriority ept vpid xsaveopt
>>>>>>
>>>>>> It would give some quick insight into what CPU features were
>>>>>> available during runtime.
>>>>> We already print
>>>>>
>>>>> CPU:total 4 (4 cores per cpu, 1 threads per core) family 6 model 58
>>>>> stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1,
>>>>> sse4.2, popcnt, avx, aes, clmul, erms, tsc, tscinvbit, tscinv
>>>>>
>>>>> For the flags we use.   This isn't enough?
>>>> I’d prefer to print the flags the CPU supports too since these are
>>>> not the same.
>>>
>>> Okay, sure, I'll add that line.
>>> Coleen
>>>
>>>>
>>>>> thanks,
>>>>> Coleen
>>>>>> /Mikael
>>>>>>
>>>>>>> Rather than duplicating the pd_print_cpu_info function for all the
>>>>>>> os_cpu/linux* combinations, I added an ifdef.   In os_aix.cpp
>>>>>>> there's a
>>>>>>> pd_print_cpu_info, which is called from os::print_cpu_info that
>>>>>>> duplicates the information but I didn't touch it.
>>>>>>>
>>>>>>> open webrev at http://cr.openjdk.java.net/~coleenp/8085865.01/
>>>>>>> bug link https://bugs.openjdk.java.net/browse/JDK-8085865
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Coleen
>>>>>>>
>>>>>>>
>>>
>>



More information about the hotspot-runtime-dev mailing list