Mercurial > hg > release > icedtea-1.10
changeset 1700:edf6c7397cc7
2009-03-03 Gary Benson <gbenson@redhat.com>
* ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp:
Removed.
* ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp:
Likewise.
* ports/hotspot/src/share/vm/includeDB_shark:
Removed references to the above.
* ports/hotspot/src/share/vm/shark/sharkRuntime.cpp
(SharkRuntime::_trace_bytecode): Removed.
(SharkRuntime::initialize): Remove initialization for the above.
(SharkRuntime::trace_bytecode_C): Removed.
* ports/hotspot/src/share/vm/shark/sharkRuntime.hpp
(SharkRuntime::_trace_bytecode): Likewise.
(SharkRuntime::trace_bytecode): Likewise.
(SharkRuntime::trace_bytecode_C): Likewise.
* ports/hotspot/src/share/vm/shark/sharkBlock.cpp
(SharkBlock::parse): Remove bytecode tracer code.
(transplanted from 24cb346d989c4bed56dc13e3e3a1dd3d420b3dae)
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Tue, 03 Mar 2009 09:18:36 +0000 |
parents | 4c8900e76d94 |
children | f09bd84e1703 |
files | ChangeLog ports/hotspot/src/share/vm/includeDB_shark ports/hotspot/src/share/vm/shark/sharkBlock.cpp ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp ports/hotspot/src/share/vm/shark/sharkRuntime.cpp ports/hotspot/src/share/vm/shark/sharkRuntime.hpp |
diffstat | 7 files changed, 19 insertions(+), 214 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Feb 27 16:09:25 2009 +0000 +++ b/ChangeLog Tue Mar 03 09:18:36 2009 +0000 @@ -1,3 +1,22 @@ +2009-03-03 Gary Benson <gbenson@redhat.com> + + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp: + Removed. + * ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp: + Likewise. + * ports/hotspot/src/share/vm/includeDB_shark: + Removed references to the above. + * ports/hotspot/src/share/vm/shark/sharkRuntime.cpp + (SharkRuntime::_trace_bytecode): Removed. + (SharkRuntime::initialize): Remove initialization for the above. + (SharkRuntime::trace_bytecode_C): Removed. + * ports/hotspot/src/share/vm/shark/sharkRuntime.hpp + (SharkRuntime::_trace_bytecode): Likewise. + (SharkRuntime::trace_bytecode): Likewise. + (SharkRuntime::trace_bytecode_C): Likewise. + * ports/hotspot/src/share/vm/shark/sharkBlock.cpp + (SharkBlock::parse): Remove bytecode tracer code. + 2009-03-03 Andrew John Hughes <ahughes@redhat.com> * patches/ecj/icedtea-hotspot-original.patch,
--- a/ports/hotspot/src/share/vm/includeDB_shark Fri Feb 27 16:09:25 2009 +0000 +++ b/ports/hotspot/src/share/vm/includeDB_shark Tue Mar 03 09:18:36 2009 +0000 @@ -74,7 +74,6 @@ sharkBlock.cpp shark_globals.hpp sharkBlock.cpp sharkBlock.hpp sharkBlock.cpp sharkBuilder.hpp -sharkBlock.cpp sharkBytecodeTracer.hpp sharkBlock.cpp sharkConstantPool.hpp sharkBlock.cpp sharkRuntime.hpp sharkBlock.cpp sharkState.inline.hpp @@ -114,14 +113,6 @@ sharkBuilder.hpp sharkValue.inline.hpp sharkBuilder.hpp sharkEntry.hpp -sharkBytecodeTracer.cpp sharkBytecodeTracer.hpp -sharkBytecodeTracer.cpp sharkState.inline.hpp -sharkBytecodeTracer.cpp sharkValue.hpp - -sharkBytecodeTracer.hpp allocation.hpp -sharkBytecodeTracer.hpp llvmHeaders.hpp -sharkBytecodeTracer.hpp sharkState.hpp - sharkCacheDecache.cpp ciMethod.hpp sharkCacheDecache.cpp debugInfoRec.hpp sharkCacheDecache.cpp sharkBuilder.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Fri Feb 27 16:09:25 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp Tue Mar 03 09:18:36 2009 +0000 @@ -121,15 +121,6 @@ while (iter()->next() != ciBytecodeStream::EOBC() && bci() < limit()) { NOT_PRODUCT(a = b = c = d = NULL); - if (TraceBytecodes) { - Value *tos, *tos2; - SharkBytecodeTracer::decode(builder(), current_state(), &tos, &tos2); - call_vm( - SharkRuntime::trace_bytecode(), - LLVMValue::jint_constant(bci()), - tos, tos2); - } - if (SharkTraceBytecodes) tty->print_cr("%4d: %s", bci(), Bytecodes::name(bc()));
--- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.cpp Fri Feb 27 16:09:25 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_sharkBytecodeTracer.cpp.incl" - -using namespace llvm; - -void SharkBytecodeTracer::decode(SharkBuilder* builder, - const SharkState* state, - Value** tos, - Value** tos2) -{ - if (state->stack_depth() == 0) { - // nothing on the stack - *tos = *tos2 = LLVMValue::intptr_constant(EMPTY_SLOT); - } - else if (state->stack_depth() == 1) { - // one item on the stack - decode_one_word(builder, state, 0, tos); - *tos2 = LLVMValue::intptr_constant(EMPTY_SLOT); - } - else if (state->stack(0) == NULL) { - // two words of a two-word type - decode_two_word(builder, state, 0, tos, tos2); - } - else if (state->stack(1) == NULL) { - // a one-word type followed by half of a two-word type - decode_one_word(builder, state, 0, tos); - decode_two_word(builder, state, 1, tos2, NULL); - } - else { - // two one-word types - decode_one_word(builder, state, 0, tos); - decode_one_word(builder, state, 1, tos2); - } -} - -void SharkBytecodeTracer::decode_one_word(SharkBuilder* builder, - const SharkState* state, - int index, - Value** dst) -{ - SharkValue *value = state->stack(index); - assert(value && value->is_one_word(), "should be"); - switch (value->basic_type()) { - case T_BOOLEAN: - case T_BYTE: - case T_CHAR: - case T_SHORT: - case T_INT: -#ifdef _LP64 - *dst = builder->CreateIntCast( - value->jint_value(), SharkType::intptr_type(), false); -#else - *dst = value->jint_value(); -#endif // _LP64 - break; - - case T_FLOAT: - *dst = LLVMValue::intptr_constant(UNDECODABLE_SLOT); - break; - - case T_OBJECT: - case T_ARRAY: - *dst = value->intptr_value(builder); - break; - - case T_ADDRESS: - *dst = builder->pointer_constant((const void*)value->returnAddress_value()); - break; - - default: - tty->print_cr("Unhandled type %s", type2name(value->basic_type())); - ShouldNotReachHere(); - } -} - -void SharkBytecodeTracer::decode_two_word(SharkBuilder* builder, - const SharkState* state, - int index, - Value** dst, - Value** dst2) -{ - assert(state->stack(index) == NULL, "should be"); - SharkValue *value = state->stack(index + 1); - assert(value && value->is_two_word(), "should be"); - - *dst = LLVMValue::intptr_constant(UNDECODABLE_SLOT); - if (dst2) - *dst2 = LLVMValue::intptr_constant(UNDECODABLE_SLOT); -}
--- a/ports/hotspot/src/share/vm/shark/sharkBytecodeTracer.hpp Fri Feb 27 16:09:25 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - */ - -class SharkBytecodeTracer : public AllStatic { - public: - static void decode(SharkBuilder* builder, - const SharkState* state, - llvm::Value** tos, - llvm::Value** tos2); - public: - static const intptr_t EMPTY_SLOT = - NOT_LP64(0x23232323) LP64_ONLY(0x2323232323232323); - - static const intptr_t UNDECODABLE_SLOT = - NOT_LP64(0xdeadbabe) LP64_ONLY(0xdeadbabedeadbabe); - - private: - static void decode_one_word(SharkBuilder* builder, - const SharkState* state, - int index, - llvm::Value** dst); - static void decode_two_word(SharkBuilder* builder, - const SharkState* state, - int index, - llvm::Value** dst, - llvm::Value** dst2); -};
--- a/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Fri Feb 27 16:09:25 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.cpp Tue Mar 03 09:18:36 2009 +0000 @@ -42,7 +42,6 @@ Constant* SharkRuntime::_safepoint; Constant* SharkRuntime::_throw_ArrayIndexOutOfBoundsException; Constant* SharkRuntime::_throw_NullPointerException; -Constant* SharkRuntime::_trace_bytecode; Constant* SharkRuntime::_f2i; Constant* SharkRuntime::_f2l; @@ -162,16 +161,6 @@ FunctionType::get(Type::VoidTy, params, false), "SharkRuntime__throw_NullPointerException"); - params.clear(); - params.push_back(SharkType::thread_type()); - params.push_back(SharkType::jint_type()); - params.push_back(SharkType::intptr_type()); - params.push_back(SharkType::intptr_type()); - _trace_bytecode = builder->make_function( - (intptr_t) trace_bytecode_C, - FunctionType::get(Type::VoidTy, params, false), - "SharkRuntime__trace_bytecode"); - // Leaf calls params.clear(); params.push_back(SharkType::jfloat_type()); @@ -525,19 +514,6 @@ } JRT_END -JRT_ENTRY(void, SharkRuntime::trace_bytecode_C(JavaThread* thread, - int bci, - intptr_t tos, - intptr_t tos2)) -{ -#ifndef PRODUCT - methodHandle mh(thread, method(thread)); - //BytecodeCounter::_counter_value++; - BytecodeTracer::trace(mh, mh->code_base() + bci, tos, tos2); -#endif // !PRODUCT -} -JRT_END - // Non-VM calls // Nothing in these must ever GC!
--- a/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Fri Feb 27 16:09:25 2009 +0000 +++ b/ports/hotspot/src/share/vm/shark/sharkRuntime.hpp Tue Mar 03 09:18:36 2009 +0000 @@ -43,7 +43,6 @@ static llvm::Constant* _safepoint; static llvm::Constant* _throw_ArrayIndexOutOfBoundsException; static llvm::Constant* _throw_NullPointerException; - static llvm::Constant* _trace_bytecode; public: static llvm::Constant* find_exception_handler() @@ -102,10 +101,6 @@ { return _throw_NullPointerException; } - static llvm::Constant* trace_bytecode() - { - return _trace_bytecode; - } private: static int find_exception_handler_C(JavaThread* thread, @@ -141,10 +136,6 @@ static void throw_NullPointerException_C(JavaThread* thread, const char* file, int line); - static void trace_bytecode_C(JavaThread* thread, - int bci, - intptr_t tos, - intptr_t tos2); // Helpers for VM calls private: