code: public static long firstFieldOffset(Class clazz) {
      long minSize = roundUpTo8(headerSize(clazz));
  
      // Find the min offset for all the classes, up the class hierarchy.
      while (clazz != Object.class) {
        for (Field f : clazz.getDeclaredFields()) {
          if ((f.getModifiers() & Modifier.STATIC) == 0) {
            long offset = unsafe.objectFieldOffset(f);
            if (offset < minSize) {
              minSize = offset;
            }
          }
        }
        clazz = clazz.getSuperclass();
      }
  
      return minSize;
    }
docs: Returns the offset of the first field in the range [headerSize, sizeOf].
  
  @param clazz
  @return