Skip to content

Instantly share code, notes, and snippets.

@headius
Last active September 18, 2015 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/4cff04b1c97564b3b530 to your computer and use it in GitHub Desktop.
Save headius/4cff04b1c97564b3b530 to your computer and use it in GitHub Desktop.
JRuby's Unsafe-utilizing volatile instance variable logic
/**
* Set the given variable index into the specified object. The "real" class
* and index are pass in to provide functional access.
*
* @param self the object into which to set the variable
* @param realClass the "real" class for the object
* @param index the index of the variable
* @param value the variable's value
*/
public static void setVariable(RubyBasicObject self, RubyClass realClass, int index, Object value) {
while (true) {
int currentStamp = self.varTableStamp;
// spin-wait if odd
if((currentStamp & 0x01) != 0)
continue;
Object[] currentTable = (Object[]) UnsafeHolder.U.getObjectVolatile(self, RubyBasicObject.VAR_TABLE_OFFSET);
if (currentTable == null || index >= currentTable.length) {
if (!createTableUnsafe(self, currentStamp, realClass, currentTable, index, value)) continue;
} else {
if (!updateTableUnsafe(self, currentStamp, currentTable, index, value)) continue;
}
break;
}
}
/**
* Create or exapand a table for the given object, using Unsafe CAS and
* ordering operations to ensure visibility.
*
* @param self the object into which to set the variable
* @param currentStamp the current variable table stamp
* @param realClass the "real" class for the object
* @param currentTable the current table
* @param index the index of the variable
* @param value the variable's value
* @return whether the update was successful, for CAS retrying
*/
private static boolean createTableUnsafe(RubyBasicObject self, int currentStamp, RubyClass realClass, Object[] currentTable, int index, Object value) {
// try to acquire exclusive access to the varTable field
if (!UnsafeHolder.U.compareAndSwapInt(self, RubyBasicObject.STAMP_OFFSET, currentStamp, ++currentStamp)) {
return false;
}
Object[] newTable = new Object[realClass.getVariableTableSizeWithExtras()];
if(currentTable != null) {
System.arraycopy(currentTable, 0, newTable, 0, currentTable.length);
}
newTable[index] = value;
UnsafeHolder.U.putOrderedObject(self, RubyBasicObject.VAR_TABLE_OFFSET, newTable);
// release exclusive access
self.varTableStamp = currentStamp + 1;
return true;
}
/**
* Update the given table table for the given object, using Unsafe fence or
* volatile operations to ensure visibility.
*
* @param self the object into which to set the variable
* @param currentStamp the current variable table stamp
* @param currentTable the current table
* @param index the index of the variable
* @param value the variable's value
* @return whether the update was successful, for CAS retrying
*/
private static boolean updateTableUnsafe(RubyBasicObject self, int currentStamp, Object[] currentTable, int index, Object value) {
// shared access to varTable field.
if(UnsafeHolder.SUPPORTS_FENCES) {
currentTable[index] = value;
UnsafeHolder.fullFence();
} else {
// TODO: maybe optimize by read and checking current value before setting
UnsafeHolder.U.putObjectVolatile(currentTable, UnsafeHolder.ARRAY_OBJECT_BASE_OFFSET + UnsafeHolder.ARRAY_OBJECT_INDEX_SCALE * index, value);
}
// validate stamp. redo on concurrent modification
return self.varTableStamp == currentStamp;
}
Decoding compiled method 0x000000010cd7ff50:
Code:
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} {0x0000000122708588} 'setVariable' '(Lorg/jruby/RubyBasicObject;Lorg/jruby/RubyClass;ILjava/lang/Object;)V' in 'org/jruby/runtime/ivars/StampedVariableAccessor'
# parm0: rsi:rsi = 'org/jruby/RubyBasicObject'
# parm1: rdx:rdx = 'org/jruby/RubyClass'
# parm2: rcx = int
# parm3: r8:r8 = 'java/lang/Object'
# [sp+0x80] (sp of caller)
0x000000010cd800c0: mov [esp-0x14000], eax
0x000000010cd800c7: push ebp
0x000000010cd800c8: dec eax
0x000000010cd800c9: sub esp, 0x0000000000000070
;*synchronization entry
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@-1 (line 89)
0x000000010cd800cc: les eax, ecx
0x000000010cd800ce: stc
0x000000010cd800cf: outs dl, ds:[esi]
0x000000010cd800d0: rol ah, 0x00000000000000e1
0x000000010cd800d3: stc
0x000000010cd800d4: outs dl, ds:[esi]
0x000000010cd800d5: into
0x000000010cd800d6: inc esp ; implicit exception: dispatches to 0x000000010cd80540
0x000000010cd800d7: mov edx, [esi+0x10]
0x000000010cd800da: inc esp
0x000000010cd800db: mov [esp+0x20], edx ;*getfield varTableStamp
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@1 (line 89)
0x000000010cd800df: inc ecx
0x000000010cd800e0: mov ebp, edx
0x000000010cd800e2: and ebp, 1 ;*iand
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@9 (line 91)
0x000000010cd800e5: test ebp, ebp
0x000000010cd800e7: jnz 0x000000000cd80435
0x000000010cd800ed: dec esp
0x000000010cd800ee: mov edx, esi
0x000000010cd800f0: dec ecx
0x000000010cd800f1: add edx, 0x0000000000000018
0x000000010cd800f4: inc ecx
0x000000010cd800f5: mov ebx, [edx] ;*invokevirtual getObjectVolatile
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@23 (line 94)
0x000000010cd800f7: dec ecx
0x000000010cd800f8: shr eax, 3 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@10 (line 154)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
0x000000010cd800fb: dec esp
0x000000010cd800fc: arpl cx, si
0x000000010cd800fe: dec ecx
0x000000010cd800ff: shl esi, 2 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@49 (line 130)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80102: test ebx, ebx
0x000000010cd80104: jz 0x000000000cd80168 ;*ifnull
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@36 (line 96)
0x000000010cd80106: inc ecx
0x000000010cd80107: mov edi, [esp+ebx*8+0xC] ;*arraylength
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@42 (line 96)
0x000000010cd8010b: inc esp
0x000000010cd8010c: mov ebx, ecx
0x000000010cd8010e: cmp ecx, edi
0x000000010cd80110: jge 0x000000000cd8016b ;*if_icmplt
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@43 (line 96)
0x000000010cd80112: cmp ecx, edi
0x000000010cd80114: jnc 0x000000000cd8039e
0x000000010cd8011a: inc ebp
0x000000010cd8011b: mov edx, [esp+ebx*8+0x8]
0x000000010cd8011f: inc ecx ; {metadata('java/lang/Object'[])}
0x000000010cd80120: cmp edx, 0x00000000f80022ee
0x000000010cd80126: jnz 0x000000000cd803d9 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@10 (line 154)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
0x000000010cd8012c: dec ebp
0x000000010cd8012d: lea edx, [esp+ebx*8] ;*invokevirtual getObjectVolatile
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@23 (line 94)
0x000000010cd80130: dec edi
0x000000010cd80131: lea edx, [edx+esi+0x10]
0x000000010cd80135: inc ebp
0x000000010cd80136: mov [edx], eax
0x000000010cd80138: dec ecx
0x000000010cd80139: shr edx, 9
0x000000010cd8013c: dec ecx
0x000000010cd8013d: mov eax, 0x0000000017c26000
0x000000010cd80142: add [eax], eax
0x000000010cd80144: add [eax], al
0x000000010cd80146: inc edi
0x000000010cd80147: mov [eax+edx], ah
0x000000010cd8014a: lock add [esp], 0x00 ;*invokevirtual fullFence
; - org.jruby.util.unsafe.UnsafeHolder::fullFence@3 (line 96)
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@11 (line 155)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
0x000000010cd8014f: mov ebp, [esi+0x10] ;*getfield varTableStamp
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@37 (line 162)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
0x000000010cd80152: cmp ebp, [esp+0x20]
0x000000010cd80156: jnz 0x000000000cd80411 ;*ifne
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@57 (line 97)
0x000000010cd8015c: dec eax
0x000000010cd8015d: add esp, 0x0000000000000070
0x000000010cd80160: pop ebp
0x000000010cd80161: test [-0x29C2167], eax ; {poll_return}
0x000000010cd80167: ret
0x000000010cd80168: inc esp
0x000000010cd80169: mov ebx, ecx ;*invokevirtual compareAndSwapInt
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@12 (line 120)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd8016b: mov ebp, [esp+0x20]
0x000000010cd8016f: inc ebp ;*iinc
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@8 (line 120)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80171: mov eax, [esp+0x20]
0x000000010cd80175: lock cmpxchg [esi+0x10], ebp
0x000000010cd8017a: inc ecx
0x000000010cd8017b: setz cl
0x000000010cd8017e: inc ebp
0x000000010cd8017f: movzx ecx, cl ;*invokevirtual compareAndSwapInt
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@12 (line 120)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80182: inc ebp
0x000000010cd80183: test ecx, ecx
0x000000010cd80185: jz 0x000000000cd80459 ;*ifne
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@15 (line 120)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd8018b: dec esp
0x000000010cd8018c: mov ebp, edx
0x000000010cd8018e: inc esp ; implicit exception: dispatches to 0x000000010cd80551
0x000000010cd8018f: mov ecx, [edx+0xC4] ;*getfield variableTableManager
; - org.jruby.RubyClass::getVariableTableSizeWithExtras@1 (line 299)
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80195: inc ebx ; implicit exception: dispatches to 0x000000010cd80561
0x000000010cd80196: mov ecx, [esp+ecx*8+0x1C] ;*getfield variableNames
; - org.jruby.runtime.ivars.VariableTableManager::getVariableTableSizeWithExtras@1 (line 327)
; - org.jruby.RubyClass::getVariableTableSizeWithExtras@4 (line 299)
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd8019a: inc ecx ; implicit exception: dispatches to 0x000000010cd80571
0x000000010cd8019b: mov esi, [esp+ecx*8+0xC] ;*arraylength
; - org.jruby.runtime.ivars.VariableTableManager::getVariableTableSizeWithExtras@4 (line 327)
; - org.jruby.RubyClass::getVariableTableSizeWithExtras@4 (line 299)
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd8019f: cmp esi, 0x0000000000040000
0x000000010cd801a5: ja 0x000000000cd80305
0x000000010cd801ab: dec eax
0x000000010cd801ac: arpl si, cx
0x000000010cd801ae: dec eax
0x000000010cd801af: shl ecx, 2
0x000000010cd801b2: dec eax
0x000000010cd801b3: add ecx, 0x0000000000000017
0x000000010cd801b6: dec eax
0x000000010cd801b7: mov edi, ecx
0x000000010cd801b9: dec eax
0x000000010cd801ba: and edi, 0x00000000000000f8
0x000000010cd801bd: dec ecx
0x000000010cd801be: mov edx, [edi+0x60]
0x000000010cd801c1: dec esp
0x000000010cd801c2: mov ecx, edx
0x000000010cd801c4: dec esp
0x000000010cd801c5: add ecx, edi
0x000000010cd801c7: dec ebp
0x000000010cd801c8: cmp ecx, [edi+0x70]
0x000000010cd801cb: jnc 0x000000000cd80305
0x000000010cd801d1: dec ebp
0x000000010cd801d2: mov [edi+0x60], ecx
0x000000010cd801d5: inc ecx
0x000000010cd801d6: prefetchnta [ecx+0xC0]
0x000000010cd801dd: dec eax
0x000000010cd801de: mov [edx], 1
0x000000010cd801e4: inc ecx
0x000000010cd801e5: prefetchnta [ecx+0x100]
0x000000010cd801ec: mov [edx+0x8], 0x00000000f80022ee
; {metadata('java/lang/Object'[])}
0x000000010cd801f3: mov [edx+0xC], esi
0x000000010cd801f6: inc ecx
0x000000010cd801f7: prefetchnta [ecx+0x140]
0x000000010cd801fe: dec eax
0x000000010cd801ff: mov edi, edx
0x000000010cd80201: dec eax
0x000000010cd80202: add edi, 0x0000000000000010
0x000000010cd80205: inc ecx
0x000000010cd80206: prefetchnta [ecx+0x180]
0x000000010cd8020d: dec eax
0x000000010cd8020e: shr ecx, 3
0x000000010cd80211: dec eax
0x000000010cd80212: add ecx, 0x00000000000000fe
0x000000010cd80215: dec eax
0x000000010cd80216: xor eax, eax
0x000000010cd80218: repz dec eax
0x000000010cd8021a: stos es:[edi], eax ;*anewarray
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@24 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd8021b: test ebx, ebx
0x000000010cd8021d: jz 0x000000000cd802aa ;*ifnull
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@30 (line 126)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80223: inc ebp
0x000000010cd80224: mov ecx, [esp+ebx*8+0xC] ;*arraylength
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@39 (line 127)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80228: dec ecx
0x000000010cd80229: lea ecx, [esp+ebx*8] ;*invokevirtual getObjectVolatile
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@23 (line 94)
0x000000010cd8022c: inc ecx
0x000000010cd8022d: cmp esi, ecx
0x000000010cd8022f: jc 0x000000000cd804a9
0x000000010cd80235: inc ebp
0x000000010cd80236: test ecx, ecx
0x000000010cd80238: jle 0x000000000cd802aa
0x000000010cd8023a: mov [esp+0x24], esi
0x000000010cd8023e: dec esp
0x000000010cd8023f: mov [esp+0x28], esi
0x000000010cd80243: inc esp
0x000000010cd80244: mov [esp+0x14], eax
0x000000010cd80248: dec esp
0x000000010cd80249: mov [esp+0x18], edx
0x000000010cd8024d: lds edi, ebx
0x000000010cd8024f: adc [esp+0x8], eax
0x000000010cd80253: dec esp
0x000000010cd80254: mov [esp], ebp
0x000000010cd80257: inc ebp
0x000000010cd80258: mov esi, ebx
0x000000010cd8025a: les eax, ecx
0x000000010cd8025c: stc
0x000000010cd8025d: jle 0x000000000cd8022c
0x000000010cd8025f: dec eax
0x000000010cd80260: mov esi, edx
0x000000010cd80262: dec eax
0x000000010cd80263: add esi, 0x0000000000000010
0x000000010cd80266: dec eax
0x000000010cd80267: mov [esp+0x30], edx
0x000000010cd8026b: dec ecx
0x000000010cd8026c: lea edi, [esp+ebx*8+0x10]
0x000000010cd80270: dec ecx
0x000000010cd80271: arpl cx, dx
0x000000010cd80273: dec ecx
0x000000010cd80274: mov edx, 0x000000000c5be780
0x000000010cd80279: add [eax], eax
0x000000010cd8027b: add [eax], al
0x000000010cd8027d: inc ecx
0x000000010cd8027e: call edx ;*invokestatic arraycopy
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@40 (line 127)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80280: les eax, ecx
0x000000010cd80282: stc
0x000000010cd80283: outs dl, ds:[esi]
0x000000010cd80284: int 0x0000000000000045
0x000000010cd80286: mov ebx, esi
0x000000010cd80288: dec esp
0x000000010cd80289: mov ebp, [esp]
0x000000010cd8028c: lds edi, ebx
0x000000010cd8028e: adc [esp+0x8], al
0x000000010cd80292: dec esp
0x000000010cd80293: mov edx, [esp+0x18]
0x000000010cd80297: inc esp
0x000000010cd80298: mov eax, [esp+0x14]
0x000000010cd8029c: dec esp
0x000000010cd8029d: mov esi, [esp+0x28]
0x000000010cd802a1: mov esi, [esp+0x24]
0x000000010cd802a5: dec eax
0x000000010cd802a6: mov edx, [esp+0x30] ;*aload
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@43 (line 130)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd802aa: inc esp
0x000000010cd802ab: cmp ebx, esi
0x000000010cd802ad: jnc 0x000000000cd8047d
0x000000010cd802b3: dec esi
0x000000010cd802b4: lea ebx, [edx+esi+0x10]
0x000000010cd802b8: inc ebp
0x000000010cd802b9: mov [ebx], eax ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@49 (line 130)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd802bb: inc esp
0x000000010cd802bc: mov eax, [esp+0x20]
0x000000010cd802c0: inc ecx
0x000000010cd802c1: add eax, 2
0x000000010cd802c4: dec esp
0x000000010cd802c5: mov ecx, edx
0x000000010cd802c7: dec ecx
0x000000010cd802c8: shr ecx, 3 ;*invokevirtual putOrderedObject
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@59 (line 132)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd802cb: dec ecx
0x000000010cd802cc: shr ebx, 9
0x000000010cd802cf: dec eax
0x000000010cd802d0: mov ecx, 0x0000000017c26000
0x000000010cd802d5: add [eax], eax
0x000000010cd802d7: add [eax], al
0x000000010cd802d9: inc esi
0x000000010cd802da: mov [ecx+ebx], ah
0x000000010cd802dd: inc ebp
0x000000010cd802de: mov [edx], ecx
0x000000010cd802e0: dec ecx
0x000000010cd802e1: shr edx, 9
0x000000010cd802e4: dec ecx
0x000000010cd802e5: mov ebx, 0x0000000017c26000
0x000000010cd802ea: add [eax], eax
0x000000010cd802ec: add [eax], al
0x000000010cd802ee: inc edi
0x000000010cd802ef: mov [ebx+edx], ah
0x000000010cd802f2: les eax, ecx
0x000000010cd802f4: stc
0x000000010cd802f5: jle 0x000000000cd802c1
0x000000010cd802f7: inc ebp
0x000000010cd802f8: mov [edx+0x10], eax
0x000000010cd802fb: lock add [esp], 0x00 ;*putfield varTableStamp
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@66 (line 135)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80300: jmp 0x000000000cd8015c
0x000000010cd80305: mov [esp+0x34], esi
0x000000010cd80309: dec esp
0x000000010cd8030a: mov [esp+0x38], esi
0x000000010cd8030e: inc esp
0x000000010cd8030f: mov [esp+0x30], eax
0x000000010cd80313: mov [esp+0x24], ebx
0x000000010cd80317: dec esp
0x000000010cd80318: mov [esp+0x28], edx
0x000000010cd8031c: dec eax
0x000000010cd8031d: mov [esp-0x8], eax
0x000000010cd80321: mov eax, [esp+0x20]
0x000000010cd80325: mov [esp+0xC], eax
0x000000010cd80329: dec eax
0x000000010cd8032a: mov eax, [esp-0x8]
0x000000010cd8032e: lds edi, ebx
0x000000010cd80330: adc [esp+0x18], eax
0x000000010cd80334: dec esp
0x000000010cd80335: mov [esp+0x10], ebp
0x000000010cd80339: inc esp
0x000000010cd8033a: mov [esp+0x8], ebx
0x000000010cd8033e: lds edi, ebx
0x000000010cd80340: adc [esp], ecx
0x000000010cd80343: dec eax ; {metadata('java/lang/Object'[])}
0x000000010cd80344: mov esi, 0x00000000c0011770
0x000000010cd80349: pop es
0x000000010cd8034a: add [eax], al
0x000000010cd8034c: add [ebx+0x66342454], cl
0x000000010cd80352: nop
0x000000010cd80353: call 0x000000000c66db60 ; OopMap{[0]=Oop [16]=Oop [24]=Oop [36]=NarrowOop [40]=Derived_oop_[0] [48]=NarrowOop off=664}
;*anewarray
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@24 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd80358: lds edi, ebx
0x000000010cd8035a: adc [esp], cl
0x000000010cd8035d: inc esp
0x000000010cd8035e: mov ebx, [esp+0x8]
0x000000010cd80362: dec esp
0x000000010cd80363: mov ebp, [esp+0x10]
0x000000010cd80367: lds edi, ebx
0x000000010cd80369: adc [esp+0x18], al
0x000000010cd8036d: dec eax
0x000000010cd8036e: mov [esp-0x8], eax
0x000000010cd80372: mov eax, [esp+0xC]
0x000000010cd80376: mov [esp+0x20], eax
0x000000010cd8037a: dec eax
0x000000010cd8037b: mov eax, [esp-0x8]
0x000000010cd8037f: dec esp
0x000000010cd80380: mov edx, [esp+0x28]
0x000000010cd80384: mov ebx, [esp+0x24]
0x000000010cd80388: inc esp
0x000000010cd80389: mov eax, [esp+0x30]
0x000000010cd8038d: dec esp
0x000000010cd8038e: mov esi, [esp+0x38]
0x000000010cd80392: mov esi, [esp+0x34]
0x000000010cd80396: dec eax
0x000000010cd80397: mov edx, eax
0x000000010cd80399: jmp 0x000000000cd8021b
0x000000010cd8039e: mov esi, 0x00000000ffffffe4
0x000000010cd803a3: les esp, ecx
0x000000010cd803a5: stc
0x000000010cd803a6: jle 0x000000000cd80375
0x000000010cd803a8: dec eax
0x000000010cd803a9: mov [esp], edx
0x000000010cd803ac: dec eax
0x000000010cd803ad: mov [esp-0x8], eax
0x000000010cd803b1: mov eax, [esp+0x20]
0x000000010cd803b5: mov [esp+0xC], eax
0x000000010cd803b9: dec eax
0x000000010cd803ba: mov eax, [esp-0x8]
0x000000010cd803be: mov [esp+0x20], ecx
0x000000010cd803c2: lds edi, ebx
0x000000010cd803c4: adc [esp+0x28], eax
0x000000010cd803c8: mov [esp+0x24], ebx
0x000000010cd803cc: nop
0x000000010cd803cf: call 0x000000000c5711a0 ; OopMap{rbp=Oop [0]=Oop [36]=NarrowOop [40]=Oop off=788}
;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@10 (line 154)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
; {runtime_call}
0x000000010cd803d4: call 0x000000000b86a158 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@10 (line 154)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
; {runtime_call}
0x000000010cd803d9: mov esi, 0x00000000ffffffd6
0x000000010cd803de: les esp, ecx
0x000000010cd803e0: stc
0x000000010cd803e1: jle 0x000000000cd803b0
0x000000010cd803e3: dec eax
0x000000010cd803e4: mov [esp], edx
0x000000010cd803e7: dec eax
0x000000010cd803e8: mov [esp-0x8], eax
0x000000010cd803ec: mov eax, [esp+0x20]
0x000000010cd803f0: mov [esp+0xC], eax
0x000000010cd803f4: dec eax
0x000000010cd803f5: mov eax, [esp-0x8]
0x000000010cd803f9: mov [esp+0x20], ecx
0x000000010cd803fd: lds edi, ebx
0x000000010cd803ff: adc [esp+0x28], eax
0x000000010cd80403: mov [esp+0x24], ebx
0x000000010cd80407: call 0x000000000c5711a0 ; OopMap{rbp=Oop [0]=Oop [36]=NarrowOop [40]=Oop off=844}
;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@10 (line 154)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
; {runtime_call}
0x000000010cd8040c: call 0x000000000b86a158 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@10 (line 154)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
; {runtime_call}
0x000000010cd80411: mov esi, 0x00000000ffffff65
0x000000010cd80416: lds edi, ebx
0x000000010cd80418: adc [esp], ecx
0x000000010cd8041b: dec eax
0x000000010cd8041c: mov [esp+0x8], edx
0x000000010cd80420: mov [esp+0x10], ecx
0x000000010cd80424: lds edi, ebx
0x000000010cd80426: adc [esp+0x18], eax
0x000000010cd8042a: nop
0x000000010cd8042b: call 0x000000000c5711a0 ; OopMap{[0]=Oop [8]=Oop [24]=Oop off=880}
;*if_icmpne
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@41 (line 162)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
; {runtime_call}
0x000000010cd80430: call 0x000000000b86a158 ;*if_icmpne
; - org.jruby.runtime.ivars.StampedVariableAccessor::updateTableUnsafe@41 (line 162)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@70 (line 99)
; {runtime_call}
0x000000010cd80435: mov esi, 0x00000000ffffff65
0x000000010cd8043a: lds edi, ebx
0x000000010cd8043c: adc [esp], ecx
0x000000010cd8043f: dec eax
0x000000010cd80440: mov [esp+0x8], edx
0x000000010cd80444: mov [esp+0x10], ecx
0x000000010cd80448: dec esp
0x000000010cd80449: mov [esp+0x18], eax
0x000000010cd8044d: nop
0x000000010cd8044f: call 0x000000000c5711a0 ; OopMap{[0]=Oop [8]=Oop [24]=Oop off=916}
;*ifeq
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@10 (line 91)
; {runtime_call}
0x000000010cd80454: call 0x000000000b86a158 ;*ifeq
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@10 (line 91)
; {runtime_call}
0x000000010cd80459: mov esi, 0x00000000ffffff65
0x000000010cd8045e: les esp, ecx
0x000000010cd80460: stc
0x000000010cd80461: jle 0x000000000cd80430
0x000000010cd80463: dec eax
0x000000010cd80464: mov [esp], edx
0x000000010cd80467: inc esp
0x000000010cd80468: mov [esp+0x8], ebx
0x000000010cd8046c: lds edi, ebx
0x000000010cd8046e: adc [esp+0x10], eax
0x000000010cd80472: nop
0x000000010cd80473: call 0x000000000c5711a0 ; OopMap{rbp=Oop [0]=Oop [16]=Oop off=952}
;*ifne
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@57 (line 97)
; {runtime_call}
0x000000010cd80478: call 0x000000000b86a158 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@49 (line 130)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd8047d: mov esi, 0x00000000ffffffe4
0x000000010cd80482: dec esp
0x000000010cd80483: mov [esp+0x8], ebp
0x000000010cd80487: lds edi, ebx
0x000000010cd80489: adc [esp+0x20], ecx
0x000000010cd8048d: inc esp
0x000000010cd8048e: mov [esp+0x14], ebx
0x000000010cd80492: lds edi, ebx
0x000000010cd80494: adc [esp+0x28], eax
0x000000010cd80498: dec eax
0x000000010cd80499: mov [esp+0x38], edx
0x000000010cd8049d: nop
0x000000010cd8049f: call 0x000000000c5711a0 ; OopMap{[8]=Oop [32]=Oop [40]=Oop [56]=Oop off=996}
;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@49 (line 130)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd804a4: call 0x000000000b86a158 ;*aastore
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@49 (line 130)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd804a9: dec eax
0x000000010cd804aa: mov [esp+0x40], edx
0x000000010cd804ae: mov [esp+0x38], esi
0x000000010cd804b2: dec esp
0x000000010cd804b3: mov [esp+0x30], esi
0x000000010cd804b7: inc esp
0x000000010cd804b8: mov [esp+0x24], eax
0x000000010cd804bc: dec esp
0x000000010cd804bd: mov [esp+0x28], edx
0x000000010cd804c1: dec eax
0x000000010cd804c2: mov [esp-0x8], eax
0x000000010cd804c6: mov eax, [esp+0x20]
0x000000010cd804ca: mov [esp+0xC], eax
0x000000010cd804ce: dec eax
0x000000010cd804cf: mov eax, [esp-0x8]
0x000000010cd804d3: lds edi, ebx
0x000000010cd804d5: adc [esp+0x18], eax
0x000000010cd804d9: dec esp
0x000000010cd804da: mov [esp+0x10], ebp
0x000000010cd804de: inc esp
0x000000010cd804df: mov [esp+0x8], ebx
0x000000010cd804e3: lds edi, ebx
0x000000010cd804e5: adc [esp], ecx
0x000000010cd804e8: dec eax
0x000000010cd804e9: mov esi, ecx
0x000000010cd804eb: xor edx, edx
0x000000010cd804ed: dec eax
0x000000010cd804ee: mov ecx, [esp+0x40]
0x000000010cd804f2: inc ebp
0x000000010cd804f3: xor eax, eax
0x000000010cd804f5: nop
0x000000010cd804f7: call 0x000000000c66d3a0 ; OopMap{[0]=Oop [16]=Oop [24]=Oop [36]=NarrowOop [40]=Derived_oop_[0] [64]=Oop off=1084}
;*invokestatic arraycopy
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@40 (line 127)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd804fc: lds edi, ebx
0x000000010cd804fe: adc [esp], cl
0x000000010cd80501: inc esp
0x000000010cd80502: mov ebx, [esp+0x8]
0x000000010cd80506: dec esp
0x000000010cd80507: mov ebp, [esp+0x10]
0x000000010cd8050b: lds edi, ebx
0x000000010cd8050d: adc [esp+0x18], al
0x000000010cd80511: dec eax
0x000000010cd80512: mov [esp-0x8], eax
0x000000010cd80516: mov eax, [esp+0xC]
0x000000010cd8051a: mov [esp+0x20], eax
0x000000010cd8051e: dec eax
0x000000010cd8051f: mov eax, [esp-0x8]
0x000000010cd80523: dec esp
0x000000010cd80524: mov edx, [esp+0x28]
0x000000010cd80528: inc esp
0x000000010cd80529: mov eax, [esp+0x24]
0x000000010cd8052d: dec esp
0x000000010cd8052e: mov esi, [esp+0x30]
0x000000010cd80532: mov esi, [esp+0x38]
0x000000010cd80536: dec eax
0x000000010cd80537: mov edx, [esp+0x40]
0x000000010cd8053b: jmp 0x000000000cd802aa
0x000000010cd80540: mov esi, 0x00000000fffffff6
0x000000010cd80545: nop
0x000000010cd80547: call 0x000000000c5711a0 ; OopMap{off=1164}
;*getfield varTableStamp
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@1 (line 89)
; {runtime_call}
0x000000010cd8054c: call 0x000000000b86a158 ;*getfield varTableStamp
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@1 (line 89)
; {runtime_call}
0x000000010cd80551: mov esi, 0x00000000fffffff6
0x000000010cd80556: nop
0x000000010cd80557: call 0x000000000c5711a0 ; OopMap{off=1180}
;*invokevirtual getVariableTableSizeWithExtras
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd8055c: call 0x000000000b86a158 ;*invokevirtual getVariableTableSizeWithExtras
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd80561: mov esi, 0x00000000fffffff6
0x000000010cd80566: nop
0x000000010cd80567: call 0x000000000c5711a0 ; OopMap{off=1196}
;*invokevirtual getVariableTableSizeWithExtras
; - org.jruby.RubyClass::getVariableTableSizeWithExtras@4 (line 299)
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd8056c: call 0x000000000b86a158 ;*invokevirtual getVariableTableSizeWithExtras
; - org.jruby.RubyClass::getVariableTableSizeWithExtras@4 (line 299)
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd80571: mov esi, 0x00000000fffffff6
0x000000010cd80576: nop
0x000000010cd80577: call 0x000000000c5711a0 ; OopMap{off=1212}
;*arraylength
; - org.jruby.runtime.ivars.VariableTableManager::getVariableTableSizeWithExtras@4 (line 327)
; - org.jruby.RubyClass::getVariableTableSizeWithExtras@4 (line 299)
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@21 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd8057c: call 0x000000000b86a158 ;*invokestatic arraycopy
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@40 (line 127)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd80581: dec eax
0x000000010cd80582: mov esi, eax
0x000000010cd80584: jmp 0x000000000cd80589 ;*anewarray
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@24 (line 124)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
0x000000010cd80586: dec eax
0x000000010cd80587: mov esi, eax
0x000000010cd80589: dec eax
0x000000010cd8058a: add esp, 0x0000000000000070
0x000000010cd8058d: pop ebp
0x000000010cd8058e: jmp 0x000000000c66dd60 ;*invokestatic arraycopy
; - org.jruby.runtime.ivars.StampedVariableAccessor::createTableUnsafe@40 (line 127)
; - org.jruby.runtime.ivars.StampedVariableAccessor::setVariable@54 (line 97)
; {runtime_call}
0x000000010cd80593: hlt
0x000000010cd80594: hlt
0x000000010cd80595: hlt
0x000000010cd80596: hlt
0x000000010cd80597: hlt
0x000000010cd80598: hlt
0x000000010cd80599: hlt
0x000000010cd8059a: hlt
0x000000010cd8059b: hlt
0x000000010cd8059c: hlt
0x000000010cd8059d: hlt
0x000000010cd8059e: hlt
0x000000010cd8059f: hlt
[Exception Handler]
[Stub Code]
0x000000010cd805a0: jmp 0x000000000c5d83a0 ; {no_reloc}
[Deopt Handler Code]
0x000000010cd805a5: call 0x000000000cd805aa
0x000000010cd805aa: dec eax
0x000000010cd805ab: sub [esp], 5
0x000000010cd805af: jmp 0x000000000c5b33c0 ; {runtime_call}
0x000000010cd805b4: hlt
0x000000010cd805b5: hlt
0x000000010cd805b6: hlt
0x000000010cd805b7: hlt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment