• b08

      pahole reports the following C1 classes might benefit from compaction:

      ```
      class Instruction : public CompilationResourceObj {
              /* class CompilationResourceObj <ancestor>; */ /* 0 0 */

              /* XXX last struct has 1 byte of padding */

              int ()(void) * * _vptr.Instruction; /* 0 8 */
              int _id; /* 8 4 */
              int _use_count; /* 12 4 */
              int _pin_state; /* 16 4 */
              
              /* XXX 4 bytes hole, try to pack */

              class ValueType * _type; /* 24 8 */
              class Instruction * _next; /* 32 8 */
              class Instruction * _subst; /* 40 8 */
              class LIR_Opr _operand; /* 48 8 */
              unsigned int _flags; /* 56 4 */
              
              /* XXX 4 bytes hole, try to pack */
              
              /* --- cacheline 1 boundary (64 bytes) --- */
              class ValueStack * _state_before; /* 64 8 */
              class ValueStack * _exception_state; /* 72 8 */
              class XHandlers * _exception_handlers; /* 80 8 */

              class BlockBegin * _block; /* 88 8 */

              /* size: 96, cachelines: 2, members: 14, static members: 1 */
              /* sum members: 88, holes: 2, sum holes: 8 */
              /* paddings: 1, sum paddings: 1 */
              /* last cacheline: 32 bytes */
      };
      ```

      ```
      class Intrinsic : public StateSplit {
              /* class StateSplit <ancestor>; */ /* 0 104 */
              /* --- cacheline 1 boundary (64 bytes) was 40 bytes ago --- */
              ID _id; /* 104 4 */

              /* XXX 4 bytes hole, try to pack */

              Values * _args; /* 112 8 */
              Value _recv; /* 120 8 */
              class ArgsNonNullState _nonnull_state; /* 128 4 */
              
              /* size: 136, cachelines: 3, members: 5 */
              /* sum members: 24, holes: 1, sum holes: 4 */
              /* padding: 4 */
              /* last cacheline: 8 bytes */
      };
      ```

      ```
      class LIR_Address : public LIR_OprPtr {
              /* class LIR_OprPtr <ancestor>; */ /* 0 8 */
              class LIR_Opr _base; /* 8 8 */
              class LIR_Opr _index; /* 16 8 */
              enum Scale _scale; /* 24 4 */
              
              /* XXX 4 bytes hole, try to pack */
              
              intx _disp; /* 32 8 */
              enum BasicType _type; /* 40 1 */
              
              /* size: 48, cachelines: 1, members: 6 */
              /* sum members: 29, holes: 1, sum holes: 4 */
              /* padding: 7 */
              /* last cacheline: 48 bytes */
      };
      ```

      ```
      class LIR_Op2 : public LIR_Op {
              /* class LIR_Op <ancestor>; */ /* 0 48 */
              int _fpu_stack_size; /* 48 4 */
              
              /* XXX 4 bytes hole, try to pack */
              
              class LIR_Opr _opr1; /* 56 8 */
              class LIR_Opr _opr2; /* 64 8 */
              enum BasicType _type; /* 72 1 */
              
              /* XXX 7 bytes hole, try to pack */
              
              class LIR_Opr _tmp1; /* 80 8 */
              class LIR_Opr _tmp2; /* 88 8 */
              class LIR_Opr _tmp3; /* 96 8 */
              class LIR_Opr _tmp4; /* 104 8 */
              class LIR_Opr _tmp5; /* 112 8 */
              enum LIR_Condition _condition; /* 120 4 */

              /* size: 128, cachelines: 2, members: 11 */
              /* sum members: 65, holes: 2, sum holes: 11 */
              /* padding: 4 */
      };

      ```
      class LIR_Op4 : public LIR_Op {
              /* class LIR_Op <ancestor>; */ /* 0 48 */
              
              class LIR_Opr _opr1; /* 48 8 */
              class LIR_Opr _opr2; /* 56 8 */
              /* --- cacheline 1 boundary (64 bytes) --- */
              class LIR_Opr _opr3; /* 64 8 */
              class LIR_Opr _opr4; /* 72 8 */
              enum BasicType _type; /* 80 1 */
              
              /* XXX 7 bytes hole, try to pack */

              class LIR_Opr _tmp1; /* 88 8 */
              class LIR_Opr _tmp2; /* 96 8 */
              class LIR_Opr _tmp3; /* 104 8 */
              class LIR_Opr _tmp4; /* 112 8 */
              class LIR_Opr _tmp5; /* 120 8 */
              enum LIR_Condition _condition; /* 128 4 */

              /* size: 136, cachelines: 3, members: 12 */
              /* sum members: 77, holes: 1, sum holes: 7 */
              /* padding: 4 */
              /* last cacheline: 8 bytes */
      };
      ```

      ```
      class LIR_OpAllocArray : public LIR_Op {
              /* class LIR_Op <ancestor>; */ /* 0 48 */
              class LIR_Opr _klass; /* 48 8 */
              class LIR_Opr _len; /* 56 8 */
              /* --- cacheline 1 boundary (64 bytes) --- */
              class LIR_Opr _tmp1; /* 64 8 */
              class LIR_Opr _tmp2; /* 72 8 */
              class LIR_Opr _tmp3; /* 80 8 */
              class LIR_Opr _tmp4; /* 88 8 */
              enum BasicType _type; /* 96 1 */

              /* XXX 7 bytes hole, try to pack */

              class CodeStub * _stub; /* 104 8 */
              bool _zero_array; /* 112 1 */

              /* size: 120, cachelines: 2, members: 10 */
              /* sum members: 58, holes: 1, sum holes: 7 */
              /* padding: 7 */
              /* last cacheline: 56 bytes */
      };
      ```

      ```
      class LIR_OpTypeCheck : public LIR_Op {
              /* class LIR_Op <ancestor>; */ /* 0 48 */
              class LIR_Opr _object; /* 48 8 */
              class LIR_Opr _array; /* 56 8 */
              class ciKlass * _klass; /* 64 8 */
              class LIR_Opr _tmp1; /* 72 8 */
              class LIR_Opr _tmp2; /* 80 8 */
              class LIR_Opr _tmp3; /* 88 8 */
              bool _fast_check; /* 96 1 */

              /* XXX 7 bytes hole, try to pack */

              class CodeEmitInfo * _info_for_patch; /* 104 8 */
              class CodeEmitInfo * _info_for_exception; /* 112 8 */
              class CodeStub * _stub; /* 120 8 */
              class ciMethod * _profiled_method; /* 128 8 */
              int _profiled_bci; /* 136 4 */
              bool _should_profile; /* 140 1 */

              /* size: 144, cachelines: 3, members: 14 */
              /* sum members: 86, holes: 1, sum holes: 7 */
              /* padding: 3 */
              /* last cacheline: 16 bytes */
      };
      ```

            nprasad Neethu Prasad
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: