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

default CompilerThreadStackSize computation too small in 64bit sparc VM

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.2_05
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      05
    • CPU:
      sparc
    • OS:
      solaris_8

      Backports

        Description

        Name: cl74495 Date: 05/15/2003


        In a 64 bit VM built from 1.4.1.02 sources, I am running out of thread
        stack in PhaseCFG::set_pinned , with a recursion depth of about 2800

        In the 1.4.1.02 hotspot sources, in os_solaris.cpp there is this code

            768 #ifdef COMPILER2
            769 // Compiler2 requires a large stack size to handle recursive routines.
            770 else if (thr_type == compiler_thread) {
            771 // stack size in units of Kbytes; 2M total needed as default.
            772 int default_size = (CompilerThreadStackSize > 0) ? CompilerThreadStackSize : 2 * K;
            773 stack_size = MAX2((size_t)(default_size * K), os::Solaris::min_stack_allowed);
            774 }
            775 #endif


        I think the default_size computation
        needs adjustment for 64 bit VMs, if you intend for a 64 bit compiler2 to
        be able to have as many levels of recursion as a 32 bit compiler2 .

        Perhaps something like this:
             
        #ifdef _LP64
             int default_size = (CompilerThreadStackSize > 0) ? CompilerThreadStackSize : 4 * K;
        #else
             int default_size = (CompilerThreadStackSize > 0) ? CompilerThreadStackSize : 2 * K;
        endif

        The 1.4.2 beta 22 sources appear to have the same code in this area and
        would need the same fix.
        (Review ID: 185729)
        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  kvn Vladimir Kozlov
                  Reporter:
                  clucasius Carlos Lucasius (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: