PatchSet 7762 Date: 2008/02/19 03:33:30 Author: robilad Branch: HEAD Tag: (none) Log: jit fixes for arm linux
2008-02-18 Dalibor Topic <[EMAIL PROTECTED]> JIT fixes for ARM. * kaffe/kaffevm/exception.c (vmExcept_setJNIFrame): Removed unnecessary assert. * kaffe/kaffevm/stackTrace.c (buildStackTrace): Check if a frame shows up twice on the stack and abort when it does. Members: ChangeLog:1.5262->1.5263 kaffe/kaffevm/exception.c:1.110->1.111 kaffe/kaffevm/stackTrace.c:1.55->1.56 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.5262 kaffe/ChangeLog:1.5263 --- kaffe/ChangeLog:1.5262 Sun Feb 17 13:17:59 2008 +++ kaffe/ChangeLog Tue Feb 19 03:33:30 2008 @@ -1,3 +1,12 @@ +2008-02-18 Dalibor Topic <[EMAIL PROTECTED]> + + JIT fixes for ARM. + + * kaffe/kaffevm/exception.c (vmExcept_setJNIFrame): Removed unnecessary assert. + + * kaffe/kaffevm/stackTrace.c (buildStackTrace): Check if a frame shows up twice + on the stack and abort when it does. + 2008-02-17 Dalibor Topic <[EMAIL PROTECTED]> * kaffe/kaffevm/fp.c (doubleDivide): Follow the spec more closely. Index: kaffe/kaffe/kaffevm/exception.c diff -u kaffe/kaffe/kaffevm/exception.c:1.110 kaffe/kaffe/kaffevm/exception.c:1.111 --- kaffe/kaffe/kaffevm/exception.c:1.110 Sat Jan 19 15:13:39 2008 +++ kaffe/kaffe/kaffevm/exception.c Tue Feb 19 03:33:32 2008 @@ -89,7 +89,6 @@ assert(eh != NULL); assert(eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER); assert(fp != (JNIFrameAddress)0); - return (eh->frame.jni.fp == fp); } @@ -97,7 +96,6 @@ vmExcept_setJNIFrame(VmExceptHandler* eh, JNIFrameAddress fp) { assert(eh != NULL); - assert(fp != (JNIFrameAddress)0); eh->meth = VMEXCEPTHANDLER_KAFFEJNI_HANDLER; eh->frame.jni.fp = fp; Index: kaffe/kaffe/kaffevm/stackTrace.c diff -u kaffe/kaffe/kaffevm/stackTrace.c:1.55 kaffe/kaffe/kaffevm/stackTrace.c:1.56 --- kaffe/kaffe/kaffevm/stackTrace.c:1.55 Sat Sep 22 17:36:13 2007 +++ kaffe/kaffe/kaffevm/stackTrace.c Tue Feb 19 03:33:32 2008 @@ -52,23 +52,43 @@ Hjava_lang_Object* buildStackTrace(struct _exceptionFrame* base) { - int cnt; struct _stackTrace trace; stackTraceInfo* info; struct _exceptionFrame orig; +#ifdef TRANSLATOR + struct _exceptionFrame* previousframe; +#else + VmExceptHandler* previousframe; +#endif + int cnt; + int elements; (void) orig; /* avoid compiler warning in intrp */ DBG(STACKTRACE, dprintf("STACKTRACEINIT(trace, %p, %p, orig);\n", base, base); ); STACKTRACEINIT(trace, base, base, orig); cnt = 0; + previousframe = trace.frame; + while(STACKTRACEFRAME(trace) && KTHREAD(on_current_stack) ((void *)STACKTRACEFP(trace))) { +#ifdef TRANSLATOR + DBG(STACKTRACE, + dprintf("STACKTRACESTEP(%d, fp=%p, nextframe=%p);\n", + cnt, (void *) FPFRAME(trace.frame), (void *) NEXTFRAME(trace.frame)); ); +#endif cnt++; STACKTRACESTEP(trace); + /* break out of the frame counting loop if + * we start looping frames. */ + if (previousframe == trace.frame) + break; + else + previousframe = trace.frame; } + elements = cnt; /* Build an array of stackTraceInfo */ - info = gc_malloc(sizeof(stackTraceInfo) * (cnt+1), KGC_ALLOC_NOWALK); + info = gc_malloc(sizeof(stackTraceInfo) * (elements+1), KGC_ALLOC_NOWALK); if (!info) { dprintf("buildStackTrace(%p): can't allocate stackTraceInfo\n", base); @@ -81,7 +101,7 @@ dprintf("STACKTRACEINIT(trace, &orig, %p, orig);\n", base); ); STACKTRACEINIT(trace, &orig, base, orig); - while (STACKTRACEFRAME(trace) && KTHREAD(on_current_stack) ((void *)STACKTRACEFP(trace))) { + while (cnt < elements) { info[cnt].pc = STACKTRACEPC(trace); info[cnt].fp = STACKTRACEFP(trace); info[cnt].meth = stacktraceFindMethod (info[cnt].fp, info[cnt].pc); _______________________________________________ kaffe mailing list kaffe@kaffe.org http://kaffe.org/cgi-bin/mailman/listinfo/kaffe