6953477: review request for portability improvements to Hotspot

David Holmes David.Holmes at oracle.com
Thu Jul 29 20:23:28 PDT 2010


I said the following on 07/30/10 12:36:
> Tom Rodriguez said the following on 07/30/10 03:18:
>> jniHandles.cpp:
>>
>> What's the point of these changes?  They expose _block_list in
>> product but don't actually enable the code that updates block_list so
>> they don't do anything useful.
> 
> It was an oversight on my part that _block_list would not get updated in 
> product mode. This needs to enabled in product. print_location needs 
> access to JNIHandleBlock::any_contains in product, which in turn needs 
> access to the _block_list. (Or we disable the JNI handle check in 
> product mode inside print_location.)

I disabled the use of any_contains in product mode. We don't want to 
keep the handle block list under normal operation.

I'm sending Bob a link to an updated webrev and patch of my corrections 
so that he can merge them with the proposed changeset.

David
-----

> Testing of print_location was limited as it was not feasible to 
> orchestrate crashes where a register was known to contain an address of 
> all the possible "types" that print_location would be looking for. There 
> may be other places where the conversion from non-product to product 
> missed something.
> 
>> os.cpp:
>>
>> why was the default for _processor_count changed to 1?
> 
> I don't know, but it partially invalidates the sanity check here:
> 
>  static inline bool is_MP() {
>     assert(_processor_count > 0, "invalid processor count");
>     return _processor_count > 1;
>   }
> 
> this would allow is_MP to be used before the processor count has been 
> properly set. Such a usage might be incorrect in some contexts.
> 
> David
> -----
> 
> ---------------  T H R E A D  ---------------
> 
> Current thread (0x00021400):  JavaThread "main" [_thread_in_vm, 
> id=28045, stack(0x406ae000,0x406fe000)]
> 
> siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), 
> si_addr=0x00000000
> 
> Registers:
>   r0  = 0x000b0c00
>   r1  = 0x00006b70
>   r2  = 0x00000000
>   r3  = 0x00000064
>   r4  = 0x00000000
>   r5  = 0x000b0c00
>   r6  = 0x000b0c00
>   r7  = 0x00021400
>   r8  = 0x00020638
>   r9  = 0x4a650c58
>   r10 = 0x00000000
>   fp  = 0x406fcad4
>   r12 = 0x00000001
>   sp  = 0x406fca58
>   lr  = 0x403e1768
>   pc  = 0x40480278
> 
> 
> Register to memory mapping:
>   r0  = 0x000b0c00
> "Thread-2" prio=10 tid=0x000b0c00 nid=0x7da1 initialized [0x00000000]
>    java.lang.Thread.State: RUNNABLE
>   r1  = 0x00006b70
> 0x00006b70 is pointing to unknown location
>   r2  = 0x00000000
> 0x00000000 is pointing to unknown location
>   r3  = 0x00000064
> 0x00000064 is pointing to unknown location
>   r4  = 0x00000000
> 0x00000000 is pointing to unknown location
>   r5  = 0x000b0c00
> "Thread-2" prio=10 tid=0x000b0c00 nid=0x7da1 initialized [0x00000000]
>    java.lang.Thread.State: RUNNABLE
>   r6  = 0x000b0c00
> "Thread-2" prio=10 tid=0x000b0c00 nid=0x7da1 initialized [0x00000000]
>    java.lang.Thread.State: RUNNABLE
>   r7  = 0x00021400
> "main" prio=10 tid=0x00021400 nid=0x6d8d runnable [0x406fc000]
>    java.lang.Thread.State: RUNNABLE
>   r8  = 0x00020638
> 0x00020638 is pointing to unknown location
>   r9  = 0x4a650c58
> {method}
>  - klass: {other class}
>   r10 = 0x00000000
> 0x00000000 is pointing to unknown location
>   fp  = 0x406fcad4
> 0x406fcad4 is pointing into the stack for thread: 0x00021400
> "main" prio=10 tid=0x00021400 nid=0x6d8d runnable [0x406fc000]
>    java.lang.Thread.State: RUNNABLE
>   r12 = 0x00000001
> 0x00000001 is pointing to unknown location
>   sp  = 0x406fca58
> 0x406fca58 is pointing into the stack for thread: 0x00021400
> "main" prio=10 tid=0x00021400 nid=0x6d8d runnable [0x406fc000]
>    java.lang.Thread.State: RUNNABLE
>   lr  = 0x403e1768
> 0x403e1768: JVM_StartThread+0xe8 in 
> /java/embedded/users/dh198349/1.6.0_18/builds/b06/linux-armv5-eabi-sflt-full-dev/j2sdk-image/jre/lib/arm/client/libjvm.so 
> at 0x40191000
>   pc  = 0x40480278
> 0x40480278: <offset 0x2ef278> in 
> /java/embedded/users/dh198349/1.6.0_18/builds/b06/linux-armv5-eabi-sflt-full-dev/j2sdk-image/jre/lib/arm/client/libjvm.so 
> at 0x40191000


More information about the hotspot-dev mailing list