Re: [rvm-research] spare one bit from the object header
王晨曦 <[email protected]> Wed, 30 Sep 2015 16:13:45 +0800
| Newsgroups | gmane.comp.java.jikes.rvm.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, you are right ! I checked that just now, all the objects whose spared bit is set 1 , it’s Forwarding flag is true. Thank you very much. > 在 2015年9月30日,下午3:51,Robin Garner <[email protected]> 写道: > > OK, this may be obvious, but in a copying collector the status word is > also used to store the forwarding pointer, so its contents can only be > relied on until an object is copied. This is why the copy status bits > are always the low-order 2 bits. > > hth, > Robin > > On 29/09/15 21:36, 王晨曦 wrote: >> Hi, every one. >> >> I want to spare one bit as a flag to mark some particular object from the thin lock bits used in the object header. >> In the production configuration ,the ADDRESS_BASED_HASHING is true. >> so the object header looks like: >> * TTTT TTTT TTTT TTTT TTTT TOHH AAAA AAAA >> the bit marked by ‘O’ is the bit I want to spare. >> >> I modified the thin lock definitions: >> /** How many bits are allocated to a thin lock? */ >> public static final int NUM_THIN_LOCK_BITS = ADDRESS_BASED_HASHING ? 21 : 19; >> >> /** How many bits to shift to get the thin lock? */ >> public static final int THIN_LOCK_SHIFT = ADDRESS_BASED_HASHING ? 11 : 13; >> >> >> But ,In GenNurseryTraceLocal.java traceObject() method. >> I find that ,the spared bit ‘O’ can be set by something I don’t know. >> >> the check code in the traceObject(): >> >> Word objWordVal = VM.objectModel.readAvailableBitsWord(object); >> Log.write("object header word value:"); >> Log.writeln(objWordVal); >> >> >> and the the print info is : >> 1871 object header word value:0x6e00859f // …. 0101 1001 1111 >> >> 1876 object header word value:0x6e009dfb // …. 1101 1111 1011 >> >> we can see that the spared bit may be set by something. >> So,my question is who set this spared bit ? >> I checked that the thin lock count bits, it is reduced 1 bit, and I think the thin lock will not use this bit. >> >> Any response is helpful, thank you. >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Jikesrvm-researchers mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jikesrvm-researchers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers ------------------------------------------------------------------------------ _______________________________________________ Jikesrvm-researchers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers