• b09

      pahole reports the following C2 IR nodes are optimizeable with rearranging fields:

      ```
      class ArrayPointer {
              const bool _is_valid; /* 0 1 */
              /* XXX 7 bytes hole, try to pack */
              const class Node * _pointer; /* 8 8 */
              const class Node * _base; /* 16 8 */
              const jlong _constant_offset; /* 24 8 */
              const class Node * _int_offset; /* 32 8 */
              const jint _int_offset_shift; /* 40 4 */
              /* XXX 4 bytes hole, try to pack */
              const class GrowableArray<Node*> * _other_offsets; /* 48 8 */

              /* size: 56, cachelines: 1, members: 7 */
              /* sum members: 45, holes: 2, sum holes: 11 */
              /* last cacheline: 56 bytes */
      };
      ```

      ```
      class CallJavaNode : public CallNode {
              /* class CallNode <ancestor>; */ /* 0 128 */
              bool _optimized_virtual; /* 128 1 */
              bool _method_handle_invoke; /* 129 1 */
              bool _override_symbolic_info; /* 130 1 */
              /* XXX 5 bytes hole, try to pack */
              class ciMethod * _method; /* 136 8 */
              bool _arg_escape; /* 144 1 */

              /* size: 152, cachelines: 3, members: 6 */
              /* sum members: 12, holes: 1, sum holes: 5 */
              /* padding: 7 */
              /* last cacheline: 24 bytes */
      };
      ```

      ```
      class VectorSet : public AnyObj {
              /* class AnyObj <ancestor>; */ /* 0 0 */
              /* XXX last struct has 1 byte of padding */
              static const uint word_bits = 5; /* 0 0 */
              static const uint bit_mask = 31; /* 0 0 */
              uint _size; /* 0 4 */
              /* XXX 4 bytes hole, try to pack */
              uint32_t * _data; /* 8 8 */
              uint _data_size; /* 16 4 */
              /* XXX 4 bytes hole, try to pack */
              class Arena * _set_arena; /* 24 8 */
              /* size: 32, cachelines: 1, members: 5, static members: 2 */
              /* sum members: 24, holes: 2, sum holes: 8 */
              /* paddings: 1, sum paddings: 1 */
              /* last cacheline: 32 bytes */
      };
      ```

      ```
      class C2Access : public StackObj {
              /* class StackObj <ancestor>; */ /* 0 0 */
              /* XXX last struct has 1 byte of padding */
              int ()(void) * * _vptr.C2Access; /* 0 8 */
              DecoratorSet _decorators; /* 8 8 */
              enum BasicType _type; /* 16 1 */
              /* XXX 7 bytes hole, try to pack */
              class Node * _base; /* 24 8 */
              class C2AccessValuePtr & _addr; /* 32 8 */
              class Node * _raw_access; /* 40 8 */
              uint8_t _barrier_data; /* 48 1 */

              /* size: 56, cachelines: 1, members: 8 */
              /* sum members: 42, holes: 1, sum holes: 7 */
              /* padding: 7 */
              /* paddings: 1, sum paddings: 1 */
              /* last cacheline: 56 bytes */
      };
      ```

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

              Created:
              Updated:
              Resolved: