* vm/builtin.c (builtin_trace_exception) [__s390__]: Decrement TRACEJAVACALLINDENT...
authorpm <none@none>
Sun, 19 Aug 2007 09:27:03 +0000 (09:27 +0000)
committerpm <none@none>
Sun, 19 Aug 2007 09:27:03 +0000 (09:27 +0000)
* vm/jit/trace.h: Adapted file to coding conventions.
* vm/jit/trace.c: Likewise.
* vm/jit/s390/md.c (md_dump_context) Fixed printing of java method at failing address, (md_signal_handler_sigsegv) added missing default branch to switch.

src/vm/builtin.c
src/vm/jit/s390/md.c
src/vm/jit/trace.c
src/vm/jit/trace.h

index fe50010198f9eeb6f84974aa268ccb93638da071..190ea15e9c96bb5961dc3c05aec3379df64d9494 100644 (file)
@@ -28,7 +28,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 8330 2007-08-16 18:15:51Z twisti $
+   $Id: builtin.c 8348 2007-08-19 09:27:03Z pm $
 
 */
 
 #include "native/include/java_lang_Throwable.h"
 
 #include "threads/lock-common.h"
+#if defined(ENABLE_THREADS)
+#include "threads/native/threads.h"
+#else
+#include "threads/none/threads.h"
+#endif
 
 #include "toolbox/logging.h"
 #include "toolbox/util.h"
@@ -1187,7 +1192,11 @@ java_handle_t *builtin_trace_exception(java_handle_t *xptr,
 #endif
 
        if (opt_verbosecall && indent)
+#if defined(__S390__)
+               TRACEJAVACALLINDENT--;
+#else
                methodindent--;
+#endif
 
        /* calculate message length */
 
index b257a40355d7b01572fe7063a0e5f89571ffe8ef..e5d1c28caf5f3a3e21fd34fdf40a3a9fa63ebcb9 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8298 2007-08-12 18:49:16Z pm $
+   $Id: md.c 8348 2007-08-19 09:27:03Z pm $
 
 */
 
@@ -104,7 +104,7 @@ void md_dump_context(u1 *pc, mcontext_t *mc) {
                m = (*(codeinfo **)(pv + CodeinfoPointer))->m;
                log_println(
                        "Java method: class %s, method %s, descriptor %s.",
-                       utf_bytes(m->class->name), utf_bytes(m->name), utf_bytes(m->descriptor)
+                       m->class->name->text, m->name->text, m->descriptor->text
                );
        }
 
@@ -175,6 +175,9 @@ void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
                                is_null = 0;
                        }
                        break;
+               default:
+                       is_null = 0;
+                       break;
        }
 
        if (! is_null) {
index 238f439cfccc968805c9e1fc620a30ee6c60ead8..4e71f8d17963c71a0d7bb0ea1bfe4b7b7fb5fda9 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: trace.c 8317 2007-08-16 06:53:26Z pm $
+   $Id: trace.c 8348 2007-08-19 09:27:03Z pm $
 
 */
 
+#include "config.h"
+
 #include "arch.h"
 #include "md-abi.h"
 
@@ -248,6 +250,19 @@ static char *trace_java_call_print_argument(char *logtext, s4 *logtextlen,
        return logtext;
 }
 
+/* trace_java_call_enter ******************************************************
+   Traces an entry into a java method.
+
+   arg_regs: Array of size ARG_CNT containing all argument registers in
+   the same format as in asm_vm_call_method. The array is usually allocated
+   on the stack and used for restoring the argument registers later.
+
+   stack: Pointer to first on stack argument in the same format passed to 
+   asm_vm_call_method.
+
+*******************************************************************************/
+
 void trace_java_call_enter(methodinfo *m, uint64_t *arg_regs, uint64_t *stack) {
        methoddesc *md;
        paramdesc *pd;
@@ -367,6 +382,20 @@ void trace_java_call_enter(methodinfo *m, uint64_t *arg_regs, uint64_t *stack) {
 
 }
 
+/* trace_java_call_exit ********************************************************
+   Traces an exit form a java method.
+
+   return_regs: Array of size 3 containing return registers:
+     [0] : REG_RESULT
+        [1] : REG_RESULT2 (if available on architecture)
+        [2] : REG_FRESULT
+   The array is usually allocated on the stack and used for restoring the
+   registers later. The format of the array is the same as the format of 
+   register arguments passed to asm_vm_call_method.
+
+*******************************************************************************/
+
 void trace_java_call_exit(methodinfo *m, uint64_t *return_regs)
 {
        methoddesc *md;
@@ -452,3 +481,16 @@ void trace_java_call_exit(methodinfo *m, uint64_t *return_regs)
 
 #endif /* !defined(NDEBUG) */
 
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 971203e26ec8f34887f2629942b744ada8b4e9d2..1cfa6d5117849a8b991a0dbd4eac1c54fbe9dd8c 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: trace.h 8304 2007-08-14 19:57:20Z pm $
+   $Id: trace.h 8348 2007-08-19 09:27:03Z pm $
 
 */
 
 #ifndef _VM_JIT_TRACE_H
 #define _VM_JIT_TRACE_H
 
+#include "config.h"
+
 #include <stdint.h>
 
 #include "vmcore/method.h"
 
 #if !defined(NDEBUG)
 
-/* trace_java_call_enter ******************************************************
-   Traces an entry into a java method.
-
-   arg_regs: Array of size ARG_CNT containing all argument registers in
-   the same format as in asm_vm_call_method. The array is usually allocated
-   on the stack and used for restoring the argument registers later.
-
-   stack: Pointer to first on stack argument in the same format passed to 
-   asm_vm_call_method.
-
-*******************************************************************************/
-
 void trace_java_call_enter(methodinfo *m, uint64_t *arg_regs, uint64_t *stack);
 
-/* trace_java_call_exit ********************************************************
-   Traces an exit form a java method.
-
-   return_regs: Array of size 3 containing return registers:
-     [0] : REG_RESULT
-        [1] : REG_RESULT2 (if available on architecture)
-        [2] : REG_FRESULT
-   The array is usually allocated on the stack and used for restoring the
-   registers later. The format of the array is the same as the format of 
-   register arguments passed to asm_vm_call_method.
-
-*******************************************************************************/
-
 void trace_java_call_exit(methodinfo *m, uint64_t *return_regs);
 
 #endif /* !defined(NDEBUG) */
 
 #endif
 
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */