Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8290704

x86: TemplateTable::_new should not call eden_allocate() without contiguous allocs enabled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 20
    • hotspot
    • None
    • b08

      I have been doing the thread register verification patches for better Loom debugging, and one of the failures it caught is calling `eden_allocate` with garbage thread register. That method actually shortcuts:

      ```
      void BarrierSetAssembler::eden_allocate(MacroAssembler* masm,
                                              Register thread, Register obj,
                                              Register var_size_in_bytes,
                                              int con_size_in_bytes,
                                              Register t1,
                                              Label& slow_case) {
        ...
        if (!Universe::heap()->supports_inline_contig_alloc()) {
          __ jmp(slow_case);
      ```

      ...and does not use the thread. But it is still confusing. Other ports gate the calls to `eden_allocate` with `allow_shared_alloc`, x86 should do the same.

      (This thing would be cleaner when/if we remove the support for contiguous inline allocs altogether, see JDK-8290706).

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: