From 482d20f301a8c7ff7c7ebdd3f3db3382b5686bea Mon Sep 17 00:00:00 2001 From: twisti Date: Fri, 11 Feb 2011 03:17:53 -0800 Subject: [PATCH] 7018673: Zero: 6953144, 6990754 and 7009756 made some changes which broke Zero Reviewed-by: kvn, chrisphi, twisti --- .../linux_zero/vm/atomic_linux_zero.inline.hpp | 18 ++++++++++++++++-- src/share/vm/compiler/compileBroker.cpp | 4 +++- .../vm/interpreter/bytecodeInterpreter.cpp | 6 +++--- src/share/vm/oops/methodOop.cpp | 2 +- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp b/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp index fcada2aa4..9bee2332f 100644 --- a/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp +++ b/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp @@ -1,6 +1,6 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2007, 2008 Red Hat, Inc. + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright 2007, 2008, 2011 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 @@ -300,4 +300,18 @@ inline void* Atomic::cmpxchg_ptr(void* exchange_value, (intptr_t) compare_value); } +inline jlong Atomic::load(volatile jlong* src) { + volatile jlong dest; + os::atomic_copy64(src, &dest); + return dest; +} + +inline void Atomic::store(jlong store_value, jlong* dest) { + os::atomic_copy64((volatile jlong*)&store_value, (volatile jlong*)dest); +} + +inline void Atomic::store(jlong store_value, volatile jlong* dest) { + os::atomic_copy64((volatile jlong*)&store_value, dest); +} + #endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP diff --git a/src/share/vm/compiler/compileBroker.cpp b/src/share/vm/compiler/compileBroker.cpp index b8f7ae473..39bb2f3b6 100644 --- a/src/share/vm/compiler/compileBroker.cpp +++ b/src/share/vm/compiler/compileBroker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -768,7 +768,9 @@ CompilerThread* CompileBroker::make_compiler_thread(const char* name, CompileQue // Initialize the compilation queue void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler_count) { EXCEPTION_MARK; +#ifndef ZERO assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?"); +#endif // !ZERO if (c2_compiler_count > 0) { _c2_method_queue = new CompileQueue("C2MethodQueue", MethodCompileQueue_lock); } diff --git a/src/share/vm/interpreter/bytecodeInterpreter.cpp b/src/share/vm/interpreter/bytecodeInterpreter.cpp index c214457b4..8abd80508 100644 --- a/src/share/vm/interpreter/bytecodeInterpreter.cpp +++ b/src/share/vm/interpreter/bytecodeInterpreter.cpp @@ -1936,7 +1936,7 @@ run: constantPoolOop constants = istate->method()->constants(); if (!constants->tag_at(index).is_unresolved_klass()) { // Make sure klass is initialized and doesn't have a finalizer - oop entry = (klassOop) *constants->obj_at_addr(index); + oop entry = constants->slot_at(index).get_oop(); assert(entry->is_klass(), "Should be resolved klass"); klassOop k_entry = (klassOop) entry; assert(k_entry->klass_part()->oop_is_instance(), "Should be instanceKlass"); @@ -2026,7 +2026,7 @@ run: if (METHOD->constants()->tag_at(index).is_unresolved_klass()) { CALL_VM(InterpreterRuntime::quicken_io_cc(THREAD), handle_exception); } - klassOop klassOf = (klassOop) *(METHOD->constants()->obj_at_addr(index)); + klassOop klassOf = (klassOop) METHOD->constants()->slot_at(index).get_oop(); klassOop objKlassOop = STACK_OBJECT(-1)->klass(); //ebx // // Check for compatibilty. This check must not GC!! @@ -2061,7 +2061,7 @@ run: if (METHOD->constants()->tag_at(index).is_unresolved_klass()) { CALL_VM(InterpreterRuntime::quicken_io_cc(THREAD), handle_exception); } - klassOop klassOf = (klassOop) *(METHOD->constants()->obj_at_addr(index)); + klassOop klassOf = (klassOop) METHOD->constants()->slot_at(index).get_oop(); klassOop objKlassOop = STACK_OBJECT(-1)->klass(); // // Check for compatibilty. This check must not GC!! diff --git a/src/share/vm/oops/methodOop.cpp b/src/share/vm/oops/methodOop.cpp index 42ffbec7f..3f55ed4a4 100644 --- a/src/share/vm/oops/methodOop.cpp +++ b/src/share/vm/oops/methodOop.cpp @@ -934,7 +934,7 @@ methodHandle methodOopDesc::make_invoke_method(KlassHandle holder, assert(m->signature() == signature, ""); assert(m->is_method_handle_invoke(), ""); #ifdef CC_INTERP - ResultTypeFinder rtf(signature()); + ResultTypeFinder rtf(signature); m->set_result_index(rtf.type()); #endif m->compute_size_of_parameters(THREAD); -- GitLab