changeset 1441:f8ab19e5acae

Fix oop relocation for static stub calls.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Wed, 03 Nov 2010 16:40:38 +0100
parents 4d1d3bd140f9
children 50ff0b5b971b
files c1x4hotspotsrc/hotspot/hotspot SciMark.launch domake src/share/vm/c1x/c1x_CodeInstaller.cpp src/share/vm/c1x/c1x_VMExits.hpp src/share/vm/runtime/sharedRuntime.cpp
diffstat 5 files changed, 38 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/hotspot/hotspot SciMark.launch	Mon Nov 01 23:50:37 2010 +0100
+++ b/c1x4hotspotsrc/hotspot/hotspot SciMark.launch	Wed Nov 03 16:40:38 2010 +0100
@@ -1,24 +1,48 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <launchConfiguration type="org.eclipse.cdt.launch.applicationLaunchType">
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.AUTO_SOLIB" value="true"/>
+<listAttribute key="org.eclipse.cdt.debug.mi.core.AUTO_SOLIB_LIST"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="gdb"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEV" value="/dev/ttyS0"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEV_SPEED" value="115200"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.GDB_INIT" value=".gdbinit"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.HOST" value="localhost"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.PORT" value="10000"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.REMOTE_TCP" value="false"/>
+<listAttribute key="org.eclipse.cdt.debug.mi.core.SOLIB_PATH"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.STOP_ON_SOLIB_EVENTS" value="false"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.breakpointsFullPath" value="false"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="org.eclipse.cdt.debug.mi.core.standardLinuxCommandFactory"/>
+<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
 <booleanAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB" value="true"/>
 <listAttribute key="org.eclipse.cdt.dsf.gdb.AUTO_SOLIB_LIST"/>
 <stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="gdb"/>
 <stringAttribute key="org.eclipse.cdt.dsf.gdb.GDB_INIT" value=".gdbinit"/>
 <booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
 <booleanAttribute key="org.eclipse.cdt.dsf.gdb.REVERSE" value="false"/>
-<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH"/>
+<listAttribute key="org.eclipse.cdt.dsf.gdb.SOLIB_PATH">
+<listEntry value="/home/tw/Projects/jre1.7.0/lib/amd64/client"/>
+</listAttribute>
 <booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
 <booleanAttribute key="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
 <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
 <stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="gdb"/>
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_ID" value="org.eclipse.cdt.debug.mi.core.CDebuggerNew"/>
+<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
-<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
+<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="false"/>
 <stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-client -XX:+UseC1X -XX:+PrintGC -Xms1g -Xmx1g -Xbootclasspath/p:${workspace_loc:hotspot}/../../../maxine/C1X/bin:${workspace_loc:hotspot}/../../../maxine/CRI/bin:${workspace_loc:hotspot}/../../../maxine/Base/bin:${workspace_loc:hotspot}/../../../maxine/Assembler/bin:${workspace_loc:hotspot}/../HotSpotVM/bin -Xbootclasspath/a:/home/tw/Benchmarks/scimark/ -classpath &quot;/home/tw/Benchmarks/scimark&quot; -C1X:+PrintCompilation -XX:+BackgroundCompilation -C1X:-PrintAssembly -C1X:+PrintTimers jnt.scimark2.commandline"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="java"/>
+<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_REGISTER_BOOKKEEPING" value="false"/>
+<booleanAttribute key="org.eclipse.cdt.launch.ENABLE_VARIABLE_BOOKKEEPING" value="false"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList/&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;globalVariableList/&gt;&#10;"/>
+<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList/&gt;&#10;"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-client -XX:+UseC1X -XX:+PrintGC -Xms1g -Xmx1g -Xbootclasspath/p:${workspace_loc:hotspot}/../../../maxine/C1X/bin:${workspace_loc:hotspot}/../../../maxine/CRI/bin:${workspace_loc:hotspot}/../../../maxine/Base/bin:${workspace_loc:hotspot}/../../../maxine/Assembler/bin:${workspace_loc:hotspot}/../HotSpotVM/bin -Xbootclasspath/a:/home/tw/Benchmarks/scimark/ -classpath &quot;/home/tw/Benchmarks/scimark&quot; -Dc1x.debug -C1X:-PrintAssembly -XX:+PrintCompilation -C1X:+PrintCompilation -XX:+BackgroundCompilation -C1X:+PrintTimers jnt.scimark2.commandline"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="/home/tw/Projects/jre1.7.0/bin/java"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="hotspot"/>
 <stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.solaris.base.945602881"/>
+<booleanAttribute key="org.eclipse.cdt.launch.ui.ApplicationCDebuggerTab.DEFAULTS_SET" value="true"/>
 <booleanAttribute key="org.eclipse.cdt.launch.use_terminal" value="true"/>
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
 <listEntry value="/hotspot"/>
@@ -26,5 +50,8 @@
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
 <listEntry value="4"/>
 </listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+</mapAttribute>
 <stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#10;"/>
 </launchConfiguration>
--- a/domake	Mon Nov 01 23:50:37 2010 +0100
+++ b/domake	Wed Nov 03 16:40:38 2010 +0100
@@ -19,6 +19,7 @@
 
 pushd $(dirname "$me")/make
 ALT_BOOTDIR=/usr/lib/jvm/java-6-openjdk/ LANG=C ARCH_DATA_MODEL=64 HOTSPOT_BUILD_JOBS=2 make jvmg1
+echo "Copying binaries to JRE7 directory $JRE7"
 cp ../build/linux/linux_amd64_compiler1/jvmg/libjvm.so $JRE7/lib/amd64/client
 cp ../build/linux/linux_amd64_compiler1/jvmg/libjsig.so $JRE7/lib/amd64/client
 popd
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Mon Nov 01 23:50:37 2010 +0100
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Wed Nov 03 16:40:38 2010 +0100
@@ -591,6 +591,7 @@
         oop ref = ((oop*) references->base(T_OBJECT))[0];
         address call_pc = _instructions->start() + CiTargetMethod_Site::pcOffset(ref);
         _instructions->relocate(instruction, static_stub_Relocation::spec(call_pc));
+        _instructions->relocate(instruction, oop_Relocation::spec_for_immediate(), Assembler::imm_operand);
         break;
       }
       case MARK_INVOKE_INVALID:
--- a/src/share/vm/c1x/c1x_VMExits.hpp	Mon Nov 01 23:50:37 2010 +0100
+++ b/src/share/vm/c1x/c1x_VMExits.hpp	Wed Nov 03 16:40:38 2010 +0100
@@ -80,8 +80,10 @@
 };
 
 inline void check_pending_exception(const char* message) {
-  if (Thread::current()->has_pending_exception()) {
-    Thread::current()->pending_exception()->print();
+  Thread* THREAD = Thread::current();
+  if (THREAD->has_pending_exception()) {
+    java_lang_Throwable::print(PENDING_EXCEPTION, tty);
+    java_lang_Throwable::print_stack_trace(PENDING_EXCEPTION, tty);
     fatal(message);
   }
 }
--- a/src/share/vm/runtime/sharedRuntime.cpp	Mon Nov 01 23:50:37 2010 +0100
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Wed Nov 03 16:40:38 2010 +0100
@@ -612,7 +612,6 @@
           _implicit_null_throws++;
 #endif
           if (UseC1X) {
-            tty->print("implicit null at %08x%08x", ((long)pc) >> 32, pc);
             target_pc = Runtime1::entry_for(Runtime1::c1x_global_implicit_null_id);
           } else {
             target_pc = nm->continuation_for_implicit_exception(pc);