harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r633059 - in /harmony/enhanced/drlvm/trunk/vm/port/include: port_crash_handler.h port_frame_info.h
Date Mon, 03 Mar 2008 12:17:02 GMT
Author: gshimansky
Date: Mon Mar  3 04:17:01 2008
New Revision: 633059

URL: http://svn.apache.org/viewvc?rev=633059&view=rev
Log:
Applied patch 0007 from HARMONY-5504
[drlvm][port] Restructure DRLVM's sources to extract most of platform dependent code into
portlib


Added:
    harmony/enhanced/drlvm/trunk/vm/port/include/port_frame_info.h   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/port/include/port_crash_handler.h

Modified: harmony/enhanced/drlvm/trunk/vm/port/include/port_crash_handler.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/include/port_crash_handler.h?rev=633059&r1=633058&r2=633059&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/include/port_crash_handler.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/include/port_crash_handler.h Mon Mar  3 04:17:01
2008
@@ -23,10 +23,8 @@
  * @file Interface to signal handling and crash handling functions.
  */
 
-#include "open/types.h"
-// FIXME: needed for Register structure. Should be changed to another
-// header when Registers defition is moved to.
-#include "vm_core_types.h"
+#include "open/platform_types.h"
+#include "port_frame_info.h"
 
 #ifdef __cplusplus
 extern "C"
@@ -119,12 +117,15 @@
  * @param registrations - Pointer to an array of
  * <code>port_signal_handler_registration structures.
  * @param count - number of signal registrations. Zero is allowed
+ * @param unwind_callback - VM function for unwinding compiled
+ * stack frames.
  * @return <code>TRUE</code> if initalization is successful.
  * <code>FALSE</code> if initialization failed.
  */
 Boolean port_init_crash_handler(
     port_signal_handler_registration *registrations,
-    unsigned count);
+    unsigned count
+    port_unwind_compiled_frame unwind_callback);
 
 /**
  * Crash handler output flags.

Added: harmony/enhanced/drlvm/trunk/vm/port/include/port_frame_info.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/include/port_frame_info.h?rev=633059&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/include/port_frame_info.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/port/include/port_frame_info.h Mon Mar  3 04:17:01 2008
@@ -0,0 +1,82 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+#ifdef _PORT_FRAME_INFO_
+#define _PORT_FRAME_INFO_
+
+#include "open/platform_types.h"
+
+/**
+ * @file Interface to stack iteration from inside of port library
+ * subcomponents
+ */
+
+/**
+ * Structure describing stack frame information for stack iteration
+ */
+typedef struct {
+    /**
+     * Method class name executed at specified stack frame
+     */
+    char *method_class_name;
+    /**
+     * Method name executed at specified stack frame
+     */
+    char *method_name;
+    /**
+     * Method signature executed at specified stack frame
+     */
+    char *method_signature;
+    /**
+     * Method source file executed at specified stack frame
+     */
+    char *source_file_name;
+    /**
+     * Source line number
+     */
+    int source_line_number;
+    /**
+     * Stack iteration internal state. It should be initialized with
+     * NULL when structure is created. In case
+     * port_unwind_compiled_frame returns value greater than zero, it
+     * should be initialized with a pointer to a buffer of memory of
+     * this value size, and this buffer should be filled with
+     * zeroes. When iteration goes on, this buffer contains iteration
+     * internal data, like information about inlined methods depth.
+     */
+    void *iteration_state;
+} port_stack_frame_info;
+
+/**
+ * Callback function type for unwinding stack frames. Function is
+ * specific to the stack type and can unwind only the stack types of
+ * its component.
+ *
+ * @param regs - Register context of the current stack frame, function
+ * updates it to a new stack frame if unwinding succeeds.
+ * @param frame_info - Pointer to stack frame information structure,
+ * it is filled in with information for the current (not unwound!) stack
+ * frame.
+ * @return Positive number in case stack iterator buffer has to be
+ * allocated in frame_info->iteration_state. Zero if unwinding is
+ * successful and -1 if unwinding is not successful.
+ */
+typedef int (port_unwind_compiled_frame *)(Registers *regs,
+    port_stack_frame_info *frame_info);
+
+#endif // _PORT_FRAME_INFO_
+

Propchange: harmony/enhanced/drlvm/trunk/vm/port/include/port_frame_info.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message