|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
/hg/icedtea6: 2009-11-11 Gary Benson <gbenson@redhat.com>changeset 1ff24bb0fdf2 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=1ff24bb0fdf2 author: Gary Benson <gbenson@...> date: Wed Nov 11 16:06:45 2009 +0000 2009-11-11 Gary Benson <gbenson@...> * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp (CppInterpreter::native_entry): Add invocation counting for non-synchronized native methods. * ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp (SharedRuntime::generate_native_wrapper): Implemented. * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp (SharkFrame): Made friendly with SharkStack. Snubbed SharkFunction. * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp (SharkBuilder::SharkBuilder): Removed module argument. (SharkBuilder::_module): Removed. (SharkBuilder::module): Likewise. (SharkBuilder::check_special_condition_for_native_trans): New method. (SharkBuilder::CreateInlineOop): New method with jobject argument. * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp (SharkBuilder::SharkBuilder): Removed module argument, and changed to use Shark context instead of global context. (SharkBuilder::make_type): Updated for new SharkType. (SharkBuilder::make_function): Use SharkContext for resolution. (SharkBuilder::check_special_condition_for_native_trans): New method. (SharkBuilder::CreateDump): Removed support for LLVM < 2.6. (SharkBuilder::CreateBlock): Likewise. (SharkBuilder::CreateInlineOop): Changed object argument type. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp (SharkDecacher::oopmap_slot_munge): Defer to SharkStack method. (SharkDecacher::slot2reg): Likewise. * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp (SharkDecacher::start_frame): Use new SharkStack code. (SharkDecacher::start_stack): Likewise. (SharkDecacher::process_pc_slot): Likewise. (SharkOSREntryCacher::process_monitor): Likewise. (SharkDecacher::write_value_to_frame): Likewise. (SharkCacher::read_value_from_frame): Likewise. * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp (SharkCodeBuffer::SharkCodeBuffer): Wrap a MacroAssembler instead of creating one along with a CodeBuffer. (SharkCodeBuffer::_cb): Removed. (SharkCodeBuffer::_cb): Likewise. (SharkCodeBuffer::inline_oop): Changed object argument type. * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp (SharkCompiler::supports_native): Return true instead of false. (SharkCompiler::generate_native_wrapper): New method. (SharkCompiler::_module): Removed. (SharkCompiler::module): Likewise. (SharkCompiler::_normal_context): New field. (SharkCompiler::_native_context): Likewise. (SharkCompiler::_execution_engine_lock): Likewise. (SharkCompiler::context): New method. (SharkCompiler::execution_engine_lock): Likewise. (SharkCompiler::memory_manager): Added assertion. (SharkCompiler::execution_engine): Likewise. (SharkCompiler::compiler): New method. (SharkCompiler::generate_native_code): Likewise. (SharkCompiler::free_queued_methods): Likewise. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::SharkCompiler): Create the lock and the two contexts. Removed support for LLVM < 2.6. (SharkCompiler::compile_method): Create the HotSpot code buffer and macro assembler, and defer native code generation to new method SharkCompiler::generate_native_code(). (SharkCompiler::generate_native_wrapper): New method. (SharkCompiler::generate_native_code): Likewise. (SharkCompiler::free_compiled_method): New implementation. (SharkCompiler::free_queued_methods): New method. * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::_context): New field. (SharkEntry::context): New method. (SharkEntry::set_context): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.hpp (SharkFunction::build): Removed compiler argument. (SharkFunction::SharkFunction): Likewise. (SharkFunction::_stack): New field. (SharkFunction::stack): New method. (SharkFunction::CreateBlock): Removed support for LLVM < 2.6. (SharkFunction::_zero_stack_base): Removed. (SharkFunction::_zero_stack_pointer_addr): Likewise. (SharkFunction::_zero_frame_pointer_addr): Likewise. (SharkFunction::zero_stack_base): Likewise. (SharkFunction::zero_stack_pointer_addr): Likewise. (SharkFunction::zero_frame_pointer_addr): Likewise. (SharkFunction::CreateInitZeroStack): Likewise. (SharkFunction::CreateLoadZeroStackPointer): Likewise. (SharkFunction::CreateStoreZeroStackPointer): Likewise. (SharkFunction::CreateLoadZeroFramePointer): Likewise. (SharkFunction::CreateStoreZeroFramePointer): Likewise. (SharkFunction::CreateStackOverflowCheck): Likewise. (SharkFunction::CreatePushFrame): Likewise. (SharkFunction::CreatePopFrame): Likewise. (SharkFunction::_frame): Likewise. (SharkFunction::CreateAddressOfFrameEntry): Likewise. (SharkFunction::CreateBuildFrame): Likewise. (SharkFunction::_extended_frame_size): Likewise. (SharkFunction::_stack_slots_offset): Likewise. (SharkFunction::_monitors_slots_offset): Likewise. (SharkFunction::_oop_tmp_slot_offset): Likewise. (SharkFunction::_method_slot_offset): Likewise. (SharkFunction::_pc_slot_offset): Likewise. (SharkFunction::_locals_slots_offset): Likewise. (SharkFunction::extended_frame_size): Likewise. (SharkFunction::oopmap_frame_size): Likewise. (SharkFunction::stack_slots_offset): Likewise. (SharkFunction::monitors_slots_offset): Likewise. (SharkFunction::oop_tmp_slot_offset): Likewise. (SharkFunction::method_slot_offset): Likewise. (SharkFunction::pc_slot_offset): Likewise. (SharkFunction::locals_slots_offset): Likewise. (SharkFunction::monitor_offset): Likewise. (SharkFunction::monitor_object_offset): Likewise. (SharkFunction::monitor_header_offset): Likewise. (SharkFunction::monitor_addr): Likewise. (SharkFunction::monitor_object_addr): Likewise. (SharkFunction::monitor_header_addr): Likewise. * ports/hotspot/src/share/vm/shark/sharkFunction.cpp (SharkFunction::initialize): Defer stack frame creation to new SharkStack code. (SharkFunction::CreateInitZeroStack): Removed. (SharkFunction::CreateStackOverflowCheck): Likewise. (SharkFunction::CreatePushFrame): Likewise. (SharkFunction::CreatePopFrame): Likewise. (SharkFunction::CreateBuildFrame): Likewise. (SharkFunction::CreateAddressOfFrameEntry): Likewise. * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp (SharkCompileInvariants::SharkCompileInvariants): Removed compiler argument. (SharkTargetInvariants::SharkTargetInvariants): Likewise. (SharkCompileInvariants::_compiler): Removed. (SharkCompileInvariants::env): Added assertion. * ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp (SharkStateScanner::SharkStateScanner): Updated. (SharkStateScanner::_function): Removed. (SharkStateScanner::function): Likewise. (SharkStateScanner::_stack): New field. (SharkStateScanner::stack): New method. * ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp (SharkStateScanner::scan): Use new SharkStack code. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp (SharkTopLevelBlock::stack): New method. (SharkTopLevelBlock::set_last_Java_frame): Removed. (SharkTopLevelBlock::reset_last_Java_frame): Likewise. (SharkTopLevelBlock::call_vm): Use new SharkStack code. * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp (SharkTopLevelBlock::handle_return): Likewise. (SharkTopLevelBlock::do_multianewarray): Likewise. (SharkTopLevelBlock::acquire_lock): Likewise. (SharkTopLevelBlock::release_lock): Likewise. * ports/hotspot/src/share/vm/shark/sharkType.hpp: Defer everything to new SharkContext code. * ports/hotspot/src/share/vm/shark/sharkType.cpp: Removed. * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Removed support for LLVM < 2.6. * ports/hotspot/src/share/vm/shark/llvmValue.hpp (LLVMValue::jfloat_constant): Likewise. (LLVMValue::jdouble_constant): Likewise. (LLVMValue::bit_constant): Likewise. * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::parse_bytecode): Likewise. * ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkContext.hpp: New file. * ports/hotspot/src/share/vm/shark/sharkContext.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkNativeWrapper.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkStack.hpp: Likewise. * ports/hotspot/src/share/vm/shark/sharkStack.cpp: Likewise. * ports/hotspot/src/share/vm/includeDB_shark: Updated. diffstat: 32 files changed, 2162 insertions(+), 801 deletions(-) ChangeLog | 183 +++++++ ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp | 14 ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp | 7 ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp | 4 ports/hotspot/src/share/vm/includeDB_shark | 58 ++ ports/hotspot/src/share/vm/shark/llvmHeaders.hpp | 4 ports/hotspot/src/share/vm/shark/llvmValue.hpp | 18 ports/hotspot/src/share/vm/shark/sharkBlock.cpp | 32 - ports/hotspot/src/share/vm/shark/sharkBuilder.cpp | 48 -- ports/hotspot/src/share/vm/shark/sharkBuilder.hpp | 29 - ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp | 24 - ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp | 8 ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp | 20 ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | 274 ++++++----- ports/hotspot/src/share/vm/shark/sharkCompiler.hpp | 70 ++ ports/hotspot/src/share/vm/shark/sharkContext.cpp | 185 +++++++ ports/hotspot/src/share/vm/shark/sharkContext.hpp | 208 ++++++++ ports/hotspot/src/share/vm/shark/sharkEntry.hpp | 11 ports/hotspot/src/share/vm/shark/sharkFunction.cpp | 155 ------ ports/hotspot/src/share/vm/shark/sharkFunction.hpp | 178 ------- ports/hotspot/src/share/vm/shark/sharkInvariants.hpp | 35 - ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp | 8 ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp | 5 ports/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp | 352 +++++++++++++++ ports/hotspot/src/share/vm/shark/sharkNativeWrapper.hpp | 204 ++++++++ ports/hotspot/src/share/vm/shark/sharkStack.cpp | 239 ++++++++++ ports/hotspot/src/share/vm/shark/sharkStack.hpp | 292 ++++++++++++ ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp | 14 ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp | 8 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp | 18 ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp | 31 - ports/hotspot/src/share/vm/shark/sharkType.hpp | 227 +++------ diffs (truncated from 3780 to 500 lines): diff -r b3d03017bdef -r 1ff24bb0fdf2 ChangeLog --- a/ChangeLog Wed Nov 11 10:50:38 2009 -0500 +++ b/ChangeLog Wed Nov 11 16:06:45 2009 +0000 @@ -1,3 +1,186 @@ 2009-11-11 Gary Benson <gbenson@redhat +2009-11-11 Gary Benson <gbenson@...> + + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp + (CppInterpreter::native_entry): Add invocation counting for + non-synchronized native methods. + + * ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp + (SharedRuntime::generate_native_wrapper): Implemented. + + * ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp + (SharkFrame): Made friendly with SharkStack. Snubbed + SharkFunction. + + * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp + (SharkBuilder::SharkBuilder): Removed module argument. + (SharkBuilder::_module): Removed. + (SharkBuilder::module): Likewise. + (SharkBuilder::check_special_condition_for_native_trans): New method. + (SharkBuilder::CreateInlineOop): New method with jobject argument. + * ports/hotspot/src/share/vm/shark/sharkBuilder.cpp + (SharkBuilder::SharkBuilder): Removed module argument, and changed + to use Shark context instead of global context. + (SharkBuilder::make_type): Updated for new SharkType. + (SharkBuilder::make_function): Use SharkContext for resolution. + (SharkBuilder::check_special_condition_for_native_trans): New method. + (SharkBuilder::CreateDump): Removed support for LLVM < 2.6. + (SharkBuilder::CreateBlock): Likewise. + (SharkBuilder::CreateInlineOop): Changed object argument type. + + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp + (SharkDecacher::oopmap_slot_munge): Defer to SharkStack method. + (SharkDecacher::slot2reg): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp + (SharkDecacher::start_frame): Use new SharkStack code. + (SharkDecacher::start_stack): Likewise. + (SharkDecacher::process_pc_slot): Likewise. + (SharkOSREntryCacher::process_monitor): Likewise. + (SharkDecacher::write_value_to_frame): Likewise. + (SharkCacher::read_value_from_frame): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp + (SharkCodeBuffer::SharkCodeBuffer): Wrap a MacroAssembler + instead of creating one along with a CodeBuffer. + (SharkCodeBuffer::_cb): Removed. + (SharkCodeBuffer::_cb): Likewise. + (SharkCodeBuffer::inline_oop): Changed object argument type. + + * ports/hotspot/src/share/vm/shark/sharkCompiler.hpp + (SharkCompiler::supports_native): Return true instead of false. + (SharkCompiler::generate_native_wrapper): New method. + (SharkCompiler::_module): Removed. + (SharkCompiler::module): Likewise. + (SharkCompiler::_normal_context): New field. + (SharkCompiler::_native_context): Likewise. + (SharkCompiler::_execution_engine_lock): Likewise. + (SharkCompiler::context): New method. + (SharkCompiler::execution_engine_lock): Likewise. + (SharkCompiler::memory_manager): Added assertion. + (SharkCompiler::execution_engine): Likewise. + (SharkCompiler::compiler): New method. + (SharkCompiler::generate_native_code): Likewise. + (SharkCompiler::free_queued_methods): Likewise. + * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp + (SharkCompiler::SharkCompiler): Create the lock and the two + contexts. Removed support for LLVM < 2.6. + (SharkCompiler::compile_method): Create the HotSpot code buffer + and macro assembler, and defer native code generation to new + method SharkCompiler::generate_native_code(). + (SharkCompiler::generate_native_wrapper): New method. + (SharkCompiler::generate_native_code): Likewise. + (SharkCompiler::free_compiled_method): New implementation. + (SharkCompiler::free_queued_methods): New method. + + * ports/hotspot/src/share/vm/shark/sharkEntry.hpp + (SharkEntry::_context): New field. + (SharkEntry::context): New method. + (SharkEntry::set_context): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkFunction.hpp + (SharkFunction::build): Removed compiler argument. + (SharkFunction::SharkFunction): Likewise. + (SharkFunction::_stack): New field. + (SharkFunction::stack): New method. + (SharkFunction::CreateBlock): Removed support for LLVM < 2.6. + (SharkFunction::_zero_stack_base): Removed. + (SharkFunction::_zero_stack_pointer_addr): Likewise. + (SharkFunction::_zero_frame_pointer_addr): Likewise. + (SharkFunction::zero_stack_base): Likewise. + (SharkFunction::zero_stack_pointer_addr): Likewise. + (SharkFunction::zero_frame_pointer_addr): Likewise. + (SharkFunction::CreateInitZeroStack): Likewise. + (SharkFunction::CreateLoadZeroStackPointer): Likewise. + (SharkFunction::CreateStoreZeroStackPointer): Likewise. + (SharkFunction::CreateLoadZeroFramePointer): Likewise. + (SharkFunction::CreateStoreZeroFramePointer): Likewise. + (SharkFunction::CreateStackOverflowCheck): Likewise. + (SharkFunction::CreatePushFrame): Likewise. + (SharkFunction::CreatePopFrame): Likewise. + (SharkFunction::_frame): Likewise. + (SharkFunction::CreateAddressOfFrameEntry): Likewise. + (SharkFunction::CreateBuildFrame): Likewise. + (SharkFunction::_extended_frame_size): Likewise. + (SharkFunction::_stack_slots_offset): Likewise. + (SharkFunction::_monitors_slots_offset): Likewise. + (SharkFunction::_oop_tmp_slot_offset): Likewise. + (SharkFunction::_method_slot_offset): Likewise. + (SharkFunction::_pc_slot_offset): Likewise. + (SharkFunction::_locals_slots_offset): Likewise. + (SharkFunction::extended_frame_size): Likewise. + (SharkFunction::oopmap_frame_size): Likewise. + (SharkFunction::stack_slots_offset): Likewise. + (SharkFunction::monitors_slots_offset): Likewise. + (SharkFunction::oop_tmp_slot_offset): Likewise. + (SharkFunction::method_slot_offset): Likewise. + (SharkFunction::pc_slot_offset): Likewise. + (SharkFunction::locals_slots_offset): Likewise. + (SharkFunction::monitor_offset): Likewise. + (SharkFunction::monitor_object_offset): Likewise. + (SharkFunction::monitor_header_offset): Likewise. + (SharkFunction::monitor_addr): Likewise. + (SharkFunction::monitor_object_addr): Likewise. + (SharkFunction::monitor_header_addr): Likewise. + * ports/hotspot/src/share/vm/shark/sharkFunction.cpp + (SharkFunction::initialize): Defer stack frame creation to new + SharkStack code. + (SharkFunction::CreateInitZeroStack): Removed. + (SharkFunction::CreateStackOverflowCheck): Likewise. + (SharkFunction::CreatePushFrame): Likewise. + (SharkFunction::CreatePopFrame): Likewise. + (SharkFunction::CreateBuildFrame): Likewise. + (SharkFunction::CreateAddressOfFrameEntry): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkInvariants.hpp + (SharkCompileInvariants::SharkCompileInvariants): Removed + compiler argument. + (SharkTargetInvariants::SharkTargetInvariants): Likewise. + (SharkCompileInvariants::_compiler): Removed. + (SharkCompileInvariants::env): Added assertion. + + * ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp + (SharkStateScanner::SharkStateScanner): Updated. + (SharkStateScanner::_function): Removed. + (SharkStateScanner::function): Likewise. + (SharkStateScanner::_stack): New field. + (SharkStateScanner::stack): New method. + * ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp + (SharkStateScanner::scan): Use new SharkStack code. + + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp + (SharkTopLevelBlock::stack): New method. + (SharkTopLevelBlock::set_last_Java_frame): Removed. + (SharkTopLevelBlock::reset_last_Java_frame): Likewise. + (SharkTopLevelBlock::call_vm): Use new SharkStack code. + * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp + (SharkTopLevelBlock::handle_return): Likewise. + (SharkTopLevelBlock::do_multianewarray): Likewise. + (SharkTopLevelBlock::acquire_lock): Likewise. + (SharkTopLevelBlock::release_lock): Likewise. + + * ports/hotspot/src/share/vm/shark/sharkType.hpp: + Defer everything to new SharkContext code. + * ports/hotspot/src/share/vm/shark/sharkType.cpp: Removed. + + * ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: + Removed support for LLVM < 2.6. + * ports/hotspot/src/share/vm/shark/llvmValue.hpp + (LLVMValue::jfloat_constant): Likewise. + (LLVMValue::jdouble_constant): Likewise. + (LLVMValue::bit_constant): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse_bytecode): Likewise. + * ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: Likewise. + + * ports/hotspot/src/share/vm/shark/sharkContext.hpp: New file. + * ports/hotspot/src/share/vm/shark/sharkContext.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkNativeWrapper.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkStack.hpp: Likewise. + * ports/hotspot/src/share/vm/shark/sharkStack.cpp: Likewise. + + * ports/hotspot/src/share/vm/includeDB_shark: Updated. + 2009-11-11 Gary Benson <gbenson@...> PR icedtea/324: diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Nov 11 16:06:45 2009 +0000 @@ -202,6 +202,20 @@ void CppInterpreter::native_entry(method if (stack_overflow_imminent(thread)) { CALL_VM_NOCHECK(InterpreterRuntime::throw_StackOverflowError(thread)); goto unwind_and_return; + } + + // Update the invocation counter + if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) { + thread->set_do_not_unlock(); + InvocationCounter *counter = method->invocation_counter(); + counter->increment(); + if (counter->reached_InvocationLimit()) { + CALL_VM_NOCHECK( + InterpreterRuntime::frequency_counter_overflow(thread, NULL)); + if (HAS_PENDING_EXCEPTION) + goto unwind_and_return; + } + thread->clr_do_not_unlock(); } // Lock if necessary diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp --- a/ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp Wed Nov 11 16:06:45 2009 +0000 @@ -61,7 +61,14 @@ nmethod *SharedRuntime::generate_native_ BasicType *in_sig_bt, VMRegPair *in_regs, BasicType ret_type) { +#ifdef SHARK + return SharkCompiler::compiler()->generate_native_wrapper(masm, + method, + in_sig_bt, + ret_type); +#else ShouldNotCallThis(); +#endif // SHARK } int Deoptimization::last_frame_adjust(int callee_parameters, diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp --- a/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp Wed Nov 11 16:06:45 2009 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 Red Hat, Inc. + * Copyright 2008, 2009 Red Hat, Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,7 @@ // | ... | class SharkFrame : public ZeroFrame { - friend class SharkFunction; + friend class SharkStack; private: SharkFrame() : ZeroFrame() { diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/share/vm/includeDB_shark --- a/ports/hotspot/src/share/vm/includeDB_shark Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/share/vm/includeDB_shark Wed Nov 11 16:06:45 2009 +0000 @@ -48,6 +48,8 @@ ciTypeFlow.hpp ciTypeFlow.hpp ciKlass.hpp ciTypeFlow.hpp ciMethodBlocks.hpp +cppInterpreter_<arch>.cpp shark_globals.hpp + compileBroker.cpp sharkCompiler.hpp globals.hpp shark_globals_<arch>.hpp @@ -55,9 +57,13 @@ globals.cpp globals.cpp shark_globals.hpp llvmValue.hpp llvmHeaders.hpp +llvmValue.hpp sharkContext.hpp llvmValue.hpp sharkType.hpp nmethod.cpp sharkCompiler.hpp + +sharedRuntime_<arch>.cpp compileBroker.hpp +sharedRuntime_<arch>.cpp sharkCompiler.hpp shark_globals.cpp shark_globals.hpp @@ -95,7 +101,7 @@ sharkBuilder.cpp sharkBuilder.cpp resourceArea.hpp sharkBuilder.cpp llvmHeaders.hpp sharkBuilder.cpp sharkBuilder.hpp -sharkBuilder.cpp sharkCompiler.hpp +sharkBuilder.cpp sharkContext.hpp sharkBuilder.cpp sharkRuntime.hpp sharkBuilder.cpp synchronizer.hpp sharkBuilder.cpp thread.hpp @@ -108,7 +114,6 @@ sharkBuilder.hpp sharkBuilder.hpp llvmValue.hpp sharkBuilder.hpp sizes.hpp sharkBuilder.hpp sharkCodeBuffer.hpp -sharkBuilder.hpp sharkCompiler.hpp sharkBuilder.hpp sharkType.hpp sharkBuilder.hpp sharkValue.hpp sharkBuilder.hpp sharkEntry.hpp @@ -145,16 +150,29 @@ sharkCompiler.cpp sharkCompiler.cpp sharkBuilder.hpp sharkCompiler.cpp sharkCodeBuffer.hpp sharkCompiler.cpp sharkCompiler.hpp +sharkCompiler.cpp sharkContext.hpp sharkCompiler.cpp sharkEntry.hpp sharkCompiler.cpp sharkFunction.hpp sharkCompiler.cpp sharkMemoryManager.hpp +sharkCompiler.cpp sharkNativeWrapper.hpp sharkCompiler.hpp abstractCompiler.hpp sharkCompiler.hpp ciEnv.hpp sharkCompiler.hpp ciMethod.hpp +sharkCompiler.hpp compileBroker.hpp sharkCompiler.hpp llvmHeaders.hpp sharkCompiler.hpp sharkMemoryManager.hpp +sharkContext.cpp arrayOop.hpp +sharkContext.cpp globalDefinitions.hpp +sharkContext.cpp llvmHeaders.hpp +sharkContext.cpp oop.hpp +sharkContext.cpp sharkContext.hpp + +sharkContext.hpp llvmHeaders.hpp +sharkContext.hpp sharkCompiler.hpp + +sharkConstant.cpp ciInstance.hpp sharkConstant.cpp ciStreams.hpp sharkConstant.cpp sharkBuilder.hpp sharkConstant.cpp sharkConstant.hpp @@ -186,7 +204,9 @@ sharkFunction.hpp sharkFunction.hpp llvmHeaders.hpp sharkFunction.hpp llvmValue.hpp sharkFunction.hpp sharkBuilder.hpp +sharkFunction.hpp sharkContext.hpp sharkFunction.hpp sharkInvariants.hpp +sharkFunction.hpp sharkStack.hpp sharkInliner.cpp allocation.hpp sharkInliner.cpp bytecodes.hpp @@ -229,8 +249,6 @@ sharkInvariants.hpp sharkInvariants.hpp dependencies.hpp sharkInvariants.hpp llvmHeaders.hpp sharkInvariants.hpp sharkBuilder.hpp -sharkInvariants.hpp sharkCompiler.hpp -sharkInvariants.hpp sharkMemoryManager.hpp sharkMemoryManager.hpp llvmHeaders.hpp sharkMemoryManager.hpp sharkEntry.hpp @@ -238,6 +256,17 @@ sharkMemoryManager.cpp sharkMemoryManager.cpp llvmHeaders.hpp sharkMemoryManager.cpp sharkEntry.hpp sharkMemoryManager.cpp sharkMemoryManager.hpp + +sharkNativeWrapper.cpp llvmHeaders.hpp +sharkNativeWrapper.cpp sharkNativeWrapper.hpp +sharkNativeWrapper.cpp sharkType.hpp + +sharkNativeWrapper.hpp handles.hpp +sharkNativeWrapper.hpp llvmHeaders.hpp +sharkNativeWrapper.hpp sharkBuilder.hpp +sharkNativeWrapper.hpp sharkContext.hpp +sharkNativeWrapper.hpp sharkInvariants.hpp +sharkNativeWrapper.hpp sharkStack.hpp sharkRuntime.cpp biasedLocking.hpp sharkRuntime.cpp deoptimization.hpp @@ -248,8 +277,19 @@ sharkRuntime.cpp sharkRuntime.hpp allocation.hpp sharkRuntime.hpp llvmHeaders.hpp +sharkRuntime.hpp llvmValue.hpp sharkRuntime.hpp klassOop.hpp sharkRuntime.hpp thread.hpp + +sharkStack.cpp llvmHeaders.hpp +sharkStack.cpp sharkFunction.hpp +sharkStack.cpp sharkNativeWrapper.hpp +sharkStack.cpp sharkStack.hpp +sharkStack.cpp sharkType.hpp + +sharkStack.hpp llvmHeaders.hpp +sharkStack.hpp sharkInvariants.hpp +sharkStack.hpp sharkType.hpp sharkState.cpp allocation.hpp sharkState.cpp ciType.hpp @@ -279,6 +319,8 @@ sharkTopLevelBlock.cpp sharkTopLevelBlock.cpp allocation.hpp sharkTopLevelBlock.cpp bytecodes.hpp sharkTopLevelBlock.cpp ciField.hpp +sharkTopLevelBlock.cpp ciInstance.hpp +sharkTopLevelBlock.cpp ciObjArrayKlass.hpp sharkTopLevelBlock.cpp ciStreams.hpp sharkTopLevelBlock.cpp ciType.hpp sharkTopLevelBlock.cpp ciTypeFlow.hpp @@ -307,17 +349,11 @@ sharkTopLevelBlock.hpp sharkTopLevelBlock.hpp sharkState.hpp sharkTopLevelBlock.hpp sharkValue.hpp -sharkType.cpp arrayOop.hpp -sharkType.cpp globalDefinitions.hpp -sharkType.cpp llvmHeaders.hpp -sharkType.cpp oop.hpp -sharkType.cpp sharkEntry.hpp -sharkType.cpp sharkType.hpp - sharkType.hpp allocation.hpp sharkType.hpp ciType.hpp sharkType.hpp globalDefinitions.hpp sharkType.hpp llvmHeaders.hpp +sharkType.hpp sharkContext.hpp sharkValue.cpp ciType.hpp sharkValue.cpp llvmHeaders.hpp diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/share/vm/shark/llvmHeaders.hpp --- a/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/llvmHeaders.hpp Wed Nov 11 16:06:45 2009 +0000 @@ -32,16 +32,12 @@ #include <llvm/DerivedTypes.h> #include <llvm/ExecutionEngine/ExecutionEngine.h> #include <llvm/Instructions.h> -#if SHARK_LLVM_VERSION >= 26 #include <llvm/LLVMContext.h> -#endif #include <llvm/Module.h> #include <llvm/ModuleProvider.h> #include <llvm/Support/IRBuilder.h> -#if SHARK_LLVM_VERSION >= 26 #include <llvm/System/Threading.h> #include <llvm/Target/TargetSelect.h> -#endif #include <llvm/Type.h> #include <llvm/ExecutionEngine/JITMemoryManager.h> #if SHARK_LLVM_VERSION < 27 diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/share/vm/shark/llvmValue.hpp --- a/ports/hotspot/src/share/vm/shark/llvmValue.hpp Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/llvmValue.hpp Wed Nov 11 16:06:45 2009 +0000 @@ -39,19 +39,11 @@ class LLVMValue : public AllStatic { } static llvm::ConstantFP* jfloat_constant(jfloat value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); -#else - return llvm::ConstantFP::get(SharkType::jfloat_type(), value); -#endif + return llvm::ConstantFP::get(SharkContext::current(), llvm::APFloat(value)); } static llvm::ConstantFP* jdouble_constant(jdouble value) { -#if SHARK_LLVM_VERSION >= 26 - return llvm::ConstantFP::get(llvm::getGlobalContext(), llvm::APFloat(value)); -#else - return llvm::ConstantFP::get(SharkType::jdouble_type(), value); -#endif + return llvm::ConstantFP::get(SharkContext::current(), llvm::APFloat(value)); } static llvm::ConstantPointerNull* null() { @@ -61,11 +53,7 @@ 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 + return llvm::ConstantInt::get(SharkType::bit_type(), value, false); } static llvm::ConstantInt* intptr_constant(intptr_t value) { diff -r b3d03017bdef -r 1ff24bb0fdf2 ports/hotspot/src/share/vm/shark/sharkBlock.cpp --- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Nov 11 10:50:38 2009 -0500 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Wed Nov 11 16:06:45 2009 +0000 @@ -532,31 +532,19 @@ void SharkBlock::parse_bytecode(int star b = pop(); a = pop(); push(SharkValue::create_jfloat( -#if SHARK_LLVM_VERSION >= 26 builder()->CreateFAdd(a->jfloat_value(), b->jfloat_value()))); -#else - builder()->CreateAdd(a->jfloat_value(), b->jfloat_value()))); -#endif break; case Bytecodes::_fsub: b = pop(); a = pop(); push(SharkValue::create_jfloat( -#if SHARK_LLVM_VERSION >= 26 builder()->CreateFSub(a->jfloat_value(), b->jfloat_value()))); -#else - builder()->CreateSub(a->jfloat_value(), b->jfloat_value()))); -#endif break; case Bytecodes::_fmul: b = pop(); a = pop(); push(SharkValue::create_jfloat( -#if SHARK_LLVM_VERSION >= 26 builder()->CreateFMul(a->jfloat_value(), b->jfloat_value()))); -#else - builder()->CreateMul(a->jfloat_value(), b->jfloat_value()))); -#endif |
| Free embeddable forum powered by Nabble | Forum Help |