Hi Xu Li,

This line is a little tricky.  Three months ago we spent some time to understand this part, but i forget the exact meaning now.
I only remember in each exception handler, they extended the stack to reserve some space.  384 might be a magic number.

However, this part of codes have one problem.   If a program repeated be trapped into this handler, the stack will be used up
very quickly.  This is because:

sp = (long unsigned int *)stackLimit - 384;
stackLimit -= VM_Constants_STACK_SIZE_GUARD;

And they never added this SIZE_GUARD back to stack limit.

If you want the same exception to be entered multiple times (we need this weird function), this is the place you
need to change.

Yours,
Yan Tang


On 10/26/07, xu li <super.lixu@gmail.com> wrote:
1,In the function of hardwareTrapHandler(int signo, siginfo_t *si, void *context) of libvm.c (ia32)
  the line fo 579, there is "stackLimit - 384"
 line  579  sp = (long unsigned int *)stackLimit - 384;
 line  580 stackLimit -= VM_Constants_STACK_SIZE_GUARD;
 why stacklimit minus 384,
2 also In the function of hardwareTrapHandler(int signo, siginfo_t *si, void *context) of libvm.c(ia32)
line 560 /* Advance ESP to the guard region of the stack.
     * Enables opt compiler to have ESP point to somewhere
     * other than the bottom of the frame at a PEI (see bug 2570).
     *
     * We'll execute the entire code sequence for
     * VM_Runtime.deliverHardwareException et al. in the guard region of the
     * stack to avoid bashing stuff in the bottom opt-frame.
     */
    sp = (long unsigned int *) IA32_ESP(context);
what's the bug of 2570,i can't find it.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers