[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-distro-pkg-dev
Subject:    /hg/icedtea: 10 new changesets
From:       andrew () icedtea ! classpath ! org (andrew at icedtea ! classpath ! org)
Date:       2009-10-29 9:25:21
Message-ID: hg.9661c5e2d77b.1256808321.-6899778133799504387 () icedtea ! classpath ! org
[Download RAW message or body]

changeset 9661c5e2d77b in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9661c5e2d77b
author: Gary Benson <gbenson at redhat.com>
date: Thu Aug 13 08:01:04 2009 -0400

	2009-08-13 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/sharkEntry.hpp
	(SharkEntry::_function): New field. (SharkEntry::function):
	New method. (SharkEntry::set_function): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp
	(SharkCompiler::free_compiled_method): New method.
		* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
	(SharkCompiler::free_compiled_method): New method.
	(SharkCompiler::compile_method): Store a pointer to the LLVM
	function in the method's SharkEntry.

	 * patches/hotspot/default/icedtea-shark.patch
	(nmethod::flush): Add code to free Shark methods.

	 * ports/hotspot/src/share/vm/includeDB_shark: Updated.


changeset 9b80f24b4ff6 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=9b80f24b4ff6
author: Gary Benson <gbenson at redhat.com>
date: Fri Aug 14 06:12:14 2009 -0400

	2009-08-14 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/sharkFunction.hpp
	(SharkFunction::CreateStoreLastJavaSP): Removed.
	(SharkFunction::set_last_Java_frame): Likewise.
	(SharkFunction::reset_last_Java_frame): Likewise.
	(SharkFunction::CreateGetVMResult): Likewise.
	(SharkFunction::pending_exception_address): Likewise.
	(SharkFunction::CreateGetPendingException): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp
	(SharkTopLevelBlock::pending_exception_address): New method.
	(SharkTopLevelBlock::get_pending_exception): Likewise.
	(SharkTopLevelBlock::clear_pending_exception): Likewise.
	(SharkTopLevelBlock::set_last_Java_frame): Likewise.
	(SharkTopLevelBlock::reset_last_Java_frame): Likewise.
	(SharkTopLevelBlock::get_vm_result): Likewise.
	(SharkTopLevelBlock::call_vm): Updated.

	 * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
	(SharkTopLevelBlock::zero_check_value): Updated.
	(SharkTopLevelBlock::check_bounds): Likewise.
	(SharkTopLevelBlock::check_pending_exception): Likewise.
	(SharkTopLevelBlock::handle_return): Likewise.
	(SharkTopLevelBlock::do_new): Likewise.
	(SharkTopLevelBlock::do_newarray): Likewise.
	(SharkTopLevelBlock::do_anewarray): Likewise.
	(SharkTopLevelBlock::do_multianewarray): Likewise.


changeset a5835d58e919 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=a5835d58e919
author: Xerxes R?nby <xerxes at zafena.se>
date: Thu Aug 20 12:22:56 2009 +0200

	Adjust Shark to LLVM 2.6svn rev 79521.

	 * ports/hotspot/src/share/vm/shark/llvmValue.hpp
	(LLVMValue::jfloat_constant): Push LLVMContexts through the
	llvm::Type APIs to handle LLVM 2.6svn API change.
	(LLVMValue::jdouble_constant): Likewise.
	(LLVMValue::bit_constant): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkType.cpp
	(SharkType::initialize): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkType.hpp
	(SharkType::intptr_type): Likewise.
	(SharkType::jboolean_type): Likewise.
	(SharkType::jbyte_type): Likewise. (SharkType::jchar_type):
	Likewise. (SharkType::jshort_type): Likewise.
	(SharkType::jint_type): Likewise. (SharkType::jlong_type):
	Likewise. (SharkType::jfloat_type): Likewise.
	(SharkType::jdouble_type): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
	(SharkBuilder::make_type): Likewise.
	(SharkBuilder::CreateBlock): Push LLVMContexts through the
	BasicBlock::Create APIs to handle LLVM 2.6svn API change.

	 * ports/hotspot/src/share/vm/shark/sharkFunction.hpp
	(SharkFunction::CreateBlock): Likewise.


changeset 39216c0ef8bc in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=39216c0ef8bc
author: Xerxes R?nby <xerxes at zafena.se>
date: Fri Aug 21 14:56:13 2009 +0200

	2009-08-21 Xerxes R?nby <xerxes at zafena.se>

	 *ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
	(zero_cmpxchg_int): Updated method to match current Shark
	and LLVM atomic calling convention. Fixes compilation error
	and logic for ARM. (zero_cmpxchg_ptr): Likewise.


changeset 5c88e6546ce4 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5c88e6546ce4
author: Gary Benson <gbenson at redhat.com>
date: Fri Aug 28 11:01:49 2009 +0100

	2009-08-28 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/sharkState.cpp
	(SharkEntryState::SharkEntryState): Handle T_NULL.


changeset 2bb5c8fd9e83 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2bb5c8fd9e83
author: Gary Benson <gbenson at redhat.com>
date: Fri Aug 28 09:18:57 2009 -0400

	2009-08-28 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
	(SharkBuilder::osr_migration_end): New method.
		* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
	(SharkBuilder::osr_migration_end): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkType.hpp
	(SharkType::_osr_entry_point_type): New field.
	(SharkType::osr_entry_point_type): New method.
		* ports/hotspot/src/share/vm/shark/sharkType.cpp
	(SharkType::_osr_entry_point_type): New field.
	(SharkType::initialize): Initialize the above.

	 * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
	(SharkCacher::process_local_slot): Made virtual.
	(SharkNormalEntryCacher): New class. (SharkOSREntryCacher):
	Likewise.
		* ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp
	(SharkOSREntryCacher::CreateAddressOfOSRBufEntry): New method.
	(SharkOSREntryCacher::process_monitor): Likewise.
	(SharkOSREntryCacher::process_local_slot): Likewise.

	 * ports/hotspot/src/share/vm/shark/sharkState.hpp
	(SharkEntryState): Renamed as... (SharkNormalEntryState):
	...this. (SharkOSREntryState::SharkOSREntryState): New
	class.
		* ports/hotspot/src/share/vm/shark/sharkState.cpp
	(SharkEntryState::SharkEntryState): Renamed as...
	(SharkNormalEntryState::SharkNormalEntryState): ...this.
	(SharkOSREntryState::SharkOSREntryState): New method.

	 * ports/hotspot/src/share/vm/shark/sharkFunction.hpp
	(SharkFunction::is_osr): New method.
	(SharkFunction::entry_point_type): Likewise.
		* ports/hotspot/src/share/vm/shark/sharkFunction.cpp
	(SharkFunction::initialize): Handle OSR typeflows.

	 * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp
	(SharkCompiler::supports_osr): Return true instead of false.
		* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
	(SharkCompiler::compile_method): Remove method-isn't-OSR
	assertion, and add code to generate OSR typeflows.


changeset 4442abcf2ff5 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=4442abcf2ff5
author: Gary Benson <gbenson at redhat.com>
date: Fri Sep 04 07:14:31 2009 -0400

	2009-09-04 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
	(SharkCompiler::compile_method): Updated cast.

	 * ports/hotspot/src/share/vm/shark/sharkEntry.hpp
	(SharkEntry::code_start): Removed cast.


changeset 1e9e68b48fbb in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=1e9e68b48fbb
author: Xerxes R?nby <xerxes at zafena.se>
date: Thu Sep 17 13:18:45 2009 +0200

	2009-09-17 Xerxes R?nby <xerxes at zafena.se>

	 * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
	(SharkBuilder::CreateDump): Make Shark debug code LLVM 2.6
	API compatible.


changeset e883c3f9b582 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=e883c3f9b582
author: Gary Benson <gbenson at redhat.com>
date: Fri Sep 25 05:35:49 2009 -0400

	2009-09-25 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp:
	Replaced references to deoptimizer frame with fake stub frame.


changeset 15bb2a9fc989 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=15bb2a9fc989
author: Gary Benson <gbenson at redhat.com>
date: Mon Oct 12 06:54:47 2009 -0400

	2009-10-12 Gary Benson <gbenson at redhat.com>

	 * ports/hotspot/src/share/vm/shark/shark_globals.hpp:
	Removed SharkStartAt, SharkStopAfter and SharkOnlyCompile.
		* ports/hotspot/src/share/vm/shark/shark_globals.hpp
	(SharkCompiler::compile_method): Likewise.


diffstat:

21 files changed, 619 insertions(+), 153 deletions(-)
ChangeLog                                               |  164 +++++++++++++++
patches/hotspot/default/icedtea-shark.patch             |   14 +
ports/hotspot/src/share/vm/includeDB_shark              |    2 
ports/hotspot/src/share/vm/shark/llvmValue.hpp          |    4 
ports/hotspot/src/share/vm/shark/sharkBuilder.cpp       |   35 ++-
ports/hotspot/src/share/vm/shark/sharkBuilder.hpp       |    1 
ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp  |   48 ++++
ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp  |   45 +++-
ports/hotspot/src/share/vm/shark/sharkCompiler.cpp      |   39 +--
ports/hotspot/src/share/vm/shark/sharkCompiler.hpp      |    5 
ports/hotspot/src/share/vm/shark/sharkEntry.hpp         |   18 +
ports/hotspot/src/share/vm/shark/sharkFunction.cpp      |   44 ++--
ports/hotspot/src/share/vm/shark/sharkFunction.hpp      |   71 +-----
ports/hotspot/src/share/vm/shark/sharkRuntime.cpp       |   12 -
ports/hotspot/src/share/vm/shark/sharkState.cpp         |   51 ++++
ports/hotspot/src/share/vm/shark/sharkState.hpp         |   20 +
ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp |   35 +--
ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp |   55 ++++-
ports/hotspot/src/share/vm/shark/sharkType.cpp          |   58 ++++-
ports/hotspot/src/share/vm/shark/sharkType.hpp          |   42 +++
ports/hotspot/src/share/vm/shark/shark_globals.hpp      |    9 

diffs (truncated from 1338 to 500 lines):

diff -r c2763f965b2d -r 15bb2a9fc989 ChangeLog
--- a/ChangeLog	Wed Oct 28 23:07:25 2009 +0000
+++ b/ChangeLog	Mon Oct 12 06:54:47 2009 -0400
@@ -1,3 +1,167 @@ 2009-10-28  Andrew John Hughes  <ahughes
+2009-10-12  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/shark_globals.hpp:
+	Removed SharkStartAt, SharkStopAfter and SharkOnlyCompile.
+	* ports/hotspot/src/share/vm/shark/shark_globals.hpp
+	(SharkCompiler::compile_method): Likewise.
+
+2009-09-25  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkRuntime.cpp:
+	Replaced references to deoptimizer frame with fake stub frame.
+
+2009-09-17  Xerxes R??nby  <xerxes at zafena.se>
+
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
+	(SharkBuilder::CreateDump):
+	Make Shark debug code LLVM 2.6 API compatible.
+
+2009-09-04  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::compile_method): Updated cast.
+
+	* ports/hotspot/src/share/vm/shark/sharkEntry.hpp
+	(SharkEntry::code_start): Removed cast.
+
+
+2009-08-28  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
+	(SharkBuilder::osr_migration_end): New method.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
+	(SharkBuilder::osr_migration_end): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkType.hpp
+	(SharkType::_osr_entry_point_type): New field.
+	(SharkType::osr_entry_point_type): New method.
+	* ports/hotspot/src/share/vm/shark/sharkType.cpp
+	(SharkType::_osr_entry_point_type): New field.
+	(SharkType::initialize): Initialize the above.
+	
+	* ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
+	(SharkCacher::process_local_slot): Made virtual.
+	(SharkNormalEntryCacher): New class.
+	(SharkOSREntryCacher): Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp
+	(SharkOSREntryCacher::CreateAddressOfOSRBufEntry): New method.
+	(SharkOSREntryCacher::process_monitor): Likewise.
+	(SharkOSREntryCacher::process_local_slot): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkState.hpp
+	(SharkEntryState): Renamed as...
+	(SharkNormalEntryState): ...this.
+	(SharkOSREntryState::SharkOSREntryState): New class.
+	* ports/hotspot/src/share/vm/shark/sharkState.cpp
+	(SharkEntryState::SharkEntryState): Renamed as...
+	(SharkNormalEntryState::SharkNormalEntryState): ...this.
+	(SharkOSREntryState::SharkOSREntryState): New method.
+
+	* ports/hotspot/src/share/vm/shark/sharkFunction.hpp
+	(SharkFunction::is_osr): New method.
+	(SharkFunction::entry_point_type): Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkFunction.cpp
+	(SharkFunction::initialize): Handle OSR typeflows.
+	
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.hpp
+	(SharkCompiler::supports_osr): Return true instead of false.
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::compile_method): Remove method-isn't-OSR
+	assertion, and add code to generate OSR typeflows.
+
+2009-08-28  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkState.cpp
+	(SharkEntryState::SharkEntryState): Handle T_NULL.
+
+2009-08-21  Xerxes R??nby  <xerxes at zafena.se>
+
+	*ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
+	(zero_cmpxchg_int): Updated method to match current Shark
+	and LLVM atomic calling convention.
+	Fixes compilation error and logic for ARM.
+	(zero_cmpxchg_ptr): Likewise.
+
+2009-08-20  Xerxes R??nby  <xerxes at zafena.se>
+
+	Adjust Shark to LLVM 2.6svn rev 79521.
+
+	* ports/hotspot/src/share/vm/shark/llvmValue.hpp
+	(LLVMValue::jfloat_constant): Push LLVMContexts through the
+	llvm::Type APIs to handle LLVM 2.6svn API change.
+	(LLVMValue::jdouble_constant): Likewise.
+	(LLVMValue::bit_constant): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkType.cpp
+	(SharkType::initialize): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkType.hpp
+	(SharkType::intptr_type): Likewise.
+	(SharkType::jboolean_type): Likewise.
+	(SharkType::jbyte_type): Likewise.
+	(SharkType::jchar_type): Likewise.
+	(SharkType::jshort_type): Likewise.
+	(SharkType::jint_type): Likewise.
+	(SharkType::jlong_type): Likewise.
+	(SharkType::jfloat_type): Likewise.
+	(SharkType::jdouble_type): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
+	(SharkBuilder::make_type): Likewise.
+	(SharkBuilder::CreateBlock): Push LLVMContexts through the
+	BasicBlock::Create APIs to handle LLVM 2.6svn API change.
+
+	* ports/hotspot/src/share/vm/shark/sharkFunction.hpp
+	(SharkFunction::CreateBlock): Likewise.
+
+2009-08-14  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkFunction.hpp
+	(SharkFunction::CreateStoreLastJavaSP): Removed.
+	(SharkFunction::set_last_Java_frame): Likewise.
+	(SharkFunction::reset_last_Java_frame): Likewise.
+	(SharkFunction::CreateGetVMResult): Likewise.
+	(SharkFunction::pending_exception_address): Likewise.
+	(SharkFunction::CreateGetPendingException): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp
+	(SharkTopLevelBlock::pending_exception_address): New method.
+	(SharkTopLevelBlock::get_pending_exception): Likewise.
+	(SharkTopLevelBlock::clear_pending_exception): Likewise.
+	(SharkTopLevelBlock::set_last_Java_frame): Likewise.
+	(SharkTopLevelBlock::reset_last_Java_frame): Likewise.
+	(SharkTopLevelBlock::get_vm_result): Likewise.
+	(SharkTopLevelBlock::call_vm): Updated.
+
+	* ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp
+	(SharkTopLevelBlock::zero_check_value): Updated.
+	(SharkTopLevelBlock::check_bounds): Likewise.
+	(SharkTopLevelBlock::check_pending_exception): Likewise.
+	(SharkTopLevelBlock::handle_return): Likewise.
+	(SharkTopLevelBlock::do_new): Likewise.
+	(SharkTopLevelBlock::do_newarray): Likewise.
+	(SharkTopLevelBlock::do_anewarray): Likewise.
+	(SharkTopLevelBlock::do_multianewarray): Likewise.
+
+2009-08-13  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkEntry.hpp
+	(SharkEntry::_function): New field.
+	(SharkEntry::function): New method.
+	(SharkEntry::set_function): Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.hpp
+	(SharkCompiler::free_compiled_method): New method.	
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::free_compiled_method): New method.
+	(SharkCompiler::compile_method): Store a pointer to
+	the LLVM function in the method's SharkEntry.
+
+	* patches/hotspot/default/icedtea-shark.patch
+	(nmethod::flush): Add code to free Shark methods.
+
+	* ports/hotspot/src/share/vm/includeDB_shark: Updated.
+
 2009-10-28  Andrew John Hughes  <ahughes at redhat.com>
 
 	* Makefile.am:
diff -r c2763f965b2d -r 15bb2a9fc989 patches/hotspot/default/icedtea-shark.patch
--- a/patches/hotspot/default/icedtea-shark.patch	Wed Oct 28 23:07:25 2009 +0000
+++ b/patches/hotspot/default/icedtea-shark.patch	Mon Oct 12 06:54:47 2009 -0400
@@ -124,6 +124,20 @@ diff -Nru openjdk.orig/hotspot/src/share
    address       native_entry();
    address       interpreter_entry();
  
+diff -r 0d80af392e67 openjdk/hotspot/src/share/vm/code/nmethod.cpp
+--- openjdk/hotspot/src/share/vm/code/nmethod.cpp	Thu Jul 30 10:00:04 2009 +0100
++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	Fri Jul 31 15:39:43 2009 +0100
+@@ -1296,6 +1296,10 @@
+     ec = next;
+   }
+ 
++#ifdef SHARK
++  ((SharkCompiler *) compiler())->free_compiled_method(instructions_begin());
++#endif // SHARK
++  
+   ((CodeBlob*)(this))->flush();
+ 
+   CodeCache::free(this);
 diff -Nru openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp \
                openjdk/hotspot/src/share/vm/code/nmethod.cpp
 --- openjdk.orig/hotspot/src/share/vm/code/nmethod.cpp	2009-09-21 17:12:24.000000000 \
+0100  +++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	2009-09-23 \
                12:40:53.000000000 +0100
diff -r c2763f965b2d -r 15bb2a9fc989 ports/hotspot/src/share/vm/includeDB_shark
--- a/ports/hotspot/src/share/vm/includeDB_shark	Wed Oct 28 23:07:25 2009 +0000
+++ b/ports/hotspot/src/share/vm/includeDB_shark	Mon Oct 12 06:54:47 2009 -0400
@@ -57,7 +57,7 @@ llvmValue.hpp                           
 llvmValue.hpp                           llvmHeaders.hpp
 llvmValue.hpp                           sharkType.hpp
 
-methodOop.cpp                           sharkEntry.hpp
+nmethod.cpp                             sharkCompiler.hpp
 
 shark_globals.cpp                       shark_globals.hpp
 
diff -r c2763f965b2d -r 15bb2a9fc989 ports/hotspot/src/share/vm/shark/llvmValue.hpp
--- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp	Wed Oct 28 23:07:25 2009 +0000
+++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp	Mon Oct 12 06:54:47 2009 -0400
@@ -61,7 +61,11 @@ class LLVMValue : public AllStatic {
  public:
   static llvm::ConstantInt* bit_constant(int value)
   {
+#if SHARK_LLVM_VERSION >= 26
+    return llvm::ConstantInt::get(llvm::Type::getInt1Ty(llvm::getGlobalContext()), \
value, false); +#else
     return llvm::ConstantInt::get(llvm::Type::Int1Ty, value, false);
+#endif
   }
   static llvm::ConstantInt* intptr_constant(intptr_t value)
   {
diff -r c2763f965b2d -r 15bb2a9fc989 \
                ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp	Wed Oct 28 23:07:25 2009 \
                +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp	Mon Oct 12 06:54:47 2009 \
-0400 @@ -155,9 +155,17 @@ const Type* SharkBuilder::make_type(char
     // Miscellaneous
   case 'v':
     assert(void_ok, "should be");
+#if SHARK_LLVM_VERSION >= 26
+    return Type::getVoidTy(getGlobalContext());
+#else
     return Type::VoidTy;
+#endif
   case '1':
+#if SHARK_LLVM_VERSION >= 26
+    return Type::getInt1Ty(getGlobalContext());
+#else
     return Type::Int1Ty;
+#endif
 
   default:
     ShouldNotReachHere();
@@ -350,6 +358,11 @@ Value* SharkBuilder::unsafe_field_offset
 {
   extern jlong Unsafe_field_offset_to_byte_offset(jlong field_offset);
   return make_function((address) Unsafe_field_offset_to_byte_offset, "l", "l");
+}
+
+Value* SharkBuilder::osr_migration_end()
+{
+  return make_function((address) SharedRuntime::OSR_migration_end, "C", "v");
 }
 
 // Uncommon trap
@@ -377,9 +390,9 @@ Value* SharkBuilder::uncommon_trap()
 // perform these operations without delegating to a function.
 
 #ifdef ARM
-static jint zero_cmpxchg_int(volatile jint *ptr, jint *oldval, jint newval)
-{
-  return Atomic::cmpxchg(*newval, ptr, *oldval);
+static jint zero_cmpxchg_int(volatile jint *ptr, jint oldval, jint newval)
+{
+  return Atomic::cmpxchg(newval, ptr, oldval);
 }
 #endif // ARM
 
@@ -396,10 +409,10 @@ Value* SharkBuilder::cmpxchg_int()
 
 #ifdef ARM
 static intptr_t zero_cmpxchg_ptr(volatile intptr_t* ptr,
-                                 intptr_t*          oldval,
-                                 intptr_t*          newval)
-{
-  return Atomic::cmpxchg_ptr(*newval, ptr, *oldval);
+                                 intptr_t           oldval,
+                                 intptr_t           newval)
+{
+  return Atomic::cmpxchg_ptr(newval, ptr, oldval);
 }
 #endif // ARM
 
@@ -507,7 +520,11 @@ CallInst* SharkBuilder::CreateDump(Value
   const char *name;
   if (value->hasName())
     // XXX this leaks, but it's only debug code
+#if SHARK_LLVM_VERSION >= 26
+    name = strdup(value->getName().str().c_str());
+#else
     name = strdup(value->getName().c_str());
+#endif
   else
     name = "unnamed_value";
 
@@ -590,5 +607,9 @@ BasicBlock* SharkBuilder::GetBlockInsert
 
 BasicBlock* SharkBuilder::CreateBlock(BasicBlock* ip, const char* name) const
 {
+#if SHARK_LLVM_VERSION >= 26
+  return BasicBlock::Create(getGlobalContext(), name, GetInsertBlock()->getParent(), \
ip); +#else
   return BasicBlock::Create(name, GetInsertBlock()->getParent(), ip);
+#endif
 }  
diff -r c2763f965b2d -r 15bb2a9fc989 \
                ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp	Wed Oct 28 23:07:25 2009 \
                +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp	Mon Oct 12 06:54:47 2009 \
-0400 @@ -128,6 +128,7 @@ class SharkBuilder : public llvm::IRBuil
   llvm::Value* exp();
   llvm::Value* fabs();
   llvm::Value* unsafe_field_offset_to_byte_offset();
+  llvm::Value* osr_migration_end();
 
   // Intrinsics and external functions, part 3: Uncommon trap.
   //   This is a special case in that it is invoked like a non-VM
diff -r c2763f965b2d -r 15bb2a9fc989 \
                ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp	Wed Oct 28 23:07:25 2009 \
                +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp	Mon Oct 12 06:54:47 2009 \
-0400 @@ -185,6 +185,27 @@ void SharkCacher::process_stack_slot(int
   }
 }
 
+void SharkOSREntryCacher::process_monitor(int index,
+                                          int box_offset,
+                                          int obj_offset)
+{
+  if (max_monitors() > 1)
+    Unimplemented();   // XXX which order will they be in?
+
+  // Copy the monitor from the OSR buffer to the frame
+  int src_offset = max_locals() + index * 2;
+  builder()->CreateStore(
+    builder()->CreateLoad(
+      CreateAddressOfOSRBufEntry(src_offset, SharkType::intptr_type())),
+    function()->CreateAddressOfFrameEntry(
+      box_offset, SharkType::intptr_type()));
+  builder()->CreateStore(
+    builder()->CreateLoad(
+      CreateAddressOfOSRBufEntry(src_offset + 1, SharkType::oop_type())),
+    function()->CreateAddressOfFrameEntry(
+      obj_offset, SharkType::oop_type()));
+}
+
 void SharkCacher::process_oop_tmp_slot(Value** value, int offset)
 {
   // Cache the temporary oop
@@ -221,6 +242,33 @@ void SharkCacher::process_local_slot(int
   }
 }
 
+Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int         offset,
+                                                       const Type* type)
+{
+  Value *result = builder()->CreateStructGEP(osr_buf(), offset);
+  if (type != SharkType::intptr_type())
+    result = builder()->CreateBitCast(result, PointerType::getUnqual(type));
+  return result;
+}
+
+void SharkOSREntryCacher::process_local_slot(int          index,
+                                             SharkValue** addr,
+                                             int          offset)
+{
+  SharkValue *value = *addr;
+
+  // Read the value from the OSR buffer if necessary
+  if (local_slot_needs_read(index, value)) {
+    *addr = SharkValue::create_generic(
+      value->type(),
+      builder()->CreateLoad(
+        CreateAddressOfOSRBufEntry(
+          adjusted_offset(value, max_locals() - 1 - index),
+          SharkType::to_stackType(value->basic_type()))),
+      value->zero_checked());
+  }
+}
+
 void SharkDecacher::write_value_to_frame(const Type* type,
                                          Value*      value,
                                          int         offset)
diff -r c2763f965b2d -r 15bb2a9fc989 \
                ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp	Wed Oct 28 23:07:25 2009 \
                +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp	Mon Oct 12 06:54:47 2009 \
-0400 @@ -34,6 +34,8 @@
 //       - SharkJavaCallCacher
 //       - SharkVMCallCacher
 //       - SharkFunctionEntryCacher
+//         - SharkNormalEntryCacher
+//         - SharkOSREntryCacher
 
 class SharkCacherDecacher : public SharkStateScanner {
  protected:
@@ -329,7 +331,7 @@ class SharkCacher : public SharkCacherDe
   void process_oop_tmp_slot(llvm::Value** value, int offset);
   virtual void process_method_slot(llvm::Value** value, int offset);
 
-  void process_local_slot(int index, SharkValue** value, int offset);
+  virtual void process_local_slot(int index, SharkValue** value, int offset);
 
   // Stack slot helper
  protected:
@@ -410,8 +412,47 @@ class SharkFunctionEntryCacher : public 
 
   // Local slot helper
  protected:
-  virtual bool local_slot_needs_read(int index, SharkValue* value)
+  bool local_slot_needs_read(int index, SharkValue* value)
   {
     return value != NULL;
   }
 };
+
+class SharkNormalEntryCacher : public SharkFunctionEntryCacher {
+ public:
+  SharkNormalEntryCacher(SharkFunction* function, llvm::Value* method)
+    : SharkFunctionEntryCacher(function, method) {}
+};
+
+class SharkOSREntryCacher : public SharkFunctionEntryCacher {
+ public:
+  SharkOSREntryCacher(SharkFunction* function,
+                      llvm::Value*   method,
+                      llvm::Value*   osr_buf)
+    : SharkFunctionEntryCacher(function, method),
+      _osr_buf(
+        builder()->CreateBitCast(
+          osr_buf,
+          llvm::PointerType::getUnqual(
+            llvm::ArrayType::get(
+              SharkType::intptr_type(),
+              max_locals() + max_monitors() * 2)))) {}
+
+ private:
+  llvm::Value* _osr_buf;
+
+ private:
+  llvm::Value* osr_buf() const
+  {
+    return _osr_buf;
+  }
+
+  // Callbacks
+ protected:
+  void process_monitor(int index, int box_offset, int obj_offset);
+  void process_local_slot(int index, SharkValue** value, int offset);
+
+  // Helper
+ private:
+  llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type);
+};
diff -r c2763f965b2d -r 15bb2a9fc989 \
                ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Wed Oct 28 23:07:25 2009 \
                +0000
+++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Mon Oct 12 06:54:47 2009 \
-0400 @@ -90,34 +90,16 @@ void SharkCompiler::compile_method(ciEnv
 void SharkCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci)
 {
   assert(is_initialized(), "should be");
-  assert(entry_bci == InvocationEntryBci, "OSR is not supported");
 
   ResourceMark rm;
   const char *name = methodname(target);
 
-#ifndef PRODUCT
-  // Skip methods if requested
-  static uintx methods_seen = 0;
-  methods_seen++;
-  if (methods_seen < SharkStartAt) {
-    env->record_method_not_compilable("methods_seen < SharkStartAt");
-    return;
-  }
-  else if (methods_seen > SharkStopAfter) {
-    while (true)
-      sleep(1);
-  }
-#endif // !PRODUCT
-
-  if (SharkOnlyCompile != NULL) {
-    if (fnmatch(SharkOnlyCompile, name, 0)) {
-      env->record_method_not_compilable("does not match SharkOnlyCompile");
-      return;
-    }
-  }
-
   // Do the typeflow analysis
-  ciTypeFlow *flow = target->get_flow_analysis();
+  ciTypeFlow *flow;
+  if (entry_bci == InvocationEntryBci)
+    flow = target->get_flow_analysis();
+  else
+    flow = target->get_osr_flow_analysis(entry_bci);
   if (env->failing())
     return;
   if (SharkPrintTypeflowOf != NULL) {
@@ -146,6 +128,7 @@ void SharkCompiler::compile_method(ciEnv
     if (!fnmatch(SharkPrintBitcodeOf, name, 0))
       function->dump();
   }
+  entry->set_function(function);
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic