changeset in /hg/icedtea6: 2008-04-10 Gary Benson <gbenson at red...
Gary Benson
gbenson at redhat.com
Thu Apr 10 02:33:13 PDT 2008
changeset a6ab5c3d9b22 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a6ab5c3d9b22
description:
2008-04-10 Gary Benson <gbenson at redhat.com>
* ports/hotspot/src/cpu/zero/vm/javaStack_zero.hpp: Renamed as...
* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: New file.
Renamed JavaStack as ZeroStack, JavaFrame as ZeroFrame, and
JavaStackPrinter as ZeroStackPrinter.
* patches/icedtea-zero.patch: Likewise.
* ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise.
* ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp: Likewise.
* ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp:
Likewise.
diffstat:
16 files changed, 240 insertions(+), 219 deletions(-)
ChangeLog | 21 +
patches/icedtea-zero.patch | 2
ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp | 2
ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp | 2
ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp | 24 -
ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp | 8
ports/hotspot/src/cpu/zero/vm/frame_zero.cpp | 2
ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp | 2
ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp | 8
ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp | 2
ports/hotspot/src/cpu/zero/vm/javaStack_zero.hpp | 159 ----------
ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp | 20 -
ports/hotspot/src/cpu/zero/vm/stack_zero.hpp | 159 ++++++++++
ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp | 14
ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp | 2
ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp | 32 +-
diffs (truncated from 784 to 500 lines):
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ChangeLog
--- a/ChangeLog Wed Apr 09 22:22:44 2008 +0200
+++ b/ChangeLog Thu Apr 10 05:33:07 2008 -0400
@@ -1,3 +1,24 @@ 2008-04-09 Dan Munckton <lists at munckfi
+2008-04-10 Gary Benson <gbenson at redhat.com>
+
+ * ports/hotspot/src/cpu/zero/vm/javaStack_zero.hpp: Renamed as...
+ * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: New file.
+ Renamed JavaStack as ZeroStack, JavaFrame as ZeroFrame, and
+ JavaStackPrinter as ZeroStackPrinter.
+ * patches/icedtea-zero.patch: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise.
+ * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp: Likewise.
+ * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp:
+ Likewise.
+
2008-04-09 Dan Munckton <lists at munckfish.net>
* patches/icedtea-xinerama.patch: Make Java Full Screen Exclusive Mode
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 patches/icedtea-zero.patch
--- a/patches/icedtea-zero.patch Wed Apr 09 22:22:44 2008 +0200
+++ b/patches/icedtea-zero.patch Thu Apr 10 05:33:07 2008 -0400
@@ -120,7 +120,7 @@ diff -ru openjdk/hotspot/src/share/vm/ut
JavaThread* jt = (JavaThread*)_thread;
+#ifdef ZERO
+ st->print_cr("Java stack:");
-+ JavaStackPrinter(st, buf, sizeof(buf)).print(jt);
++ ZeroStackPrinter(st, buf, sizeof(buf)).print(jt);
+#else
if (jt->has_last_Java_frame()) {
st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)");
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -67,4 +67,4 @@ address ShouldNotReachHereStub();
// Nothing to do with the assembler (or lack of),
// just a real convenient place to include these.
#include <ffi.h>
-#include <javaStack_zero.hpp>
+#include <stack_zero.hpp>
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -99,7 +99,7 @@
#define SET_LAST_JAVA_FRAME()
#define RESET_LAST_JAVA_FRAME()
-// JavaStack Implementation
+// ZeroStack Implementation
#undef STACK_INT
#undef STACK_FLOAT
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Thu Apr 10 05:33:07 2008 -0400
@@ -40,7 +40,7 @@ void CppInterpreter::normal_entry(method
void CppInterpreter::normal_entry(methodOop method, TRAPS)
{
JavaThread *thread = (JavaThread *) THREAD;
- JavaStack *stack = thread->java_stack();
+ ZeroStack *stack = thread->zero_stack();
// Adjust the caller's stack frame to accomodate any additional
// local variables we have contiguously with our parameters.
@@ -55,7 +55,7 @@ void CppInterpreter::normal_entry(method
// Allocate and initialize our frame.
InterpreterFrame *frame = InterpreterFrame::build(stack, method, thread);
- thread->push_Java_frame(frame);
+ thread->push_zero_frame(frame);
interpreterState istate = frame->interpreter_state();
intptr_t *result = NULL;
@@ -137,7 +137,7 @@ void CppInterpreter::normal_entry(method
}
// Unwind the current frame
- thread->pop_Java_frame();
+ thread->pop_zero_frame();
// Pop our local variables
stack->set_sp(stack->sp() + method->max_locals());
@@ -150,11 +150,11 @@ void CppInterpreter::native_entry(method
void CppInterpreter::native_entry(methodOop method, TRAPS)
{
JavaThread *thread = (JavaThread *) THREAD;
- JavaStack *stack = thread->java_stack();
+ ZeroStack *stack = thread->zero_stack();
// Allocate and initialize our frame
InterpreterFrame *frame = InterpreterFrame::build(stack, method, thread);
- thread->push_Java_frame(frame);
+ thread->push_zero_frame(frame);
interpreterState istate = frame->interpreter_state();
intptr_t *locals = istate->locals();
@@ -176,7 +176,7 @@ void CppInterpreter::native_entry(method
else {
CALL_VM_NOCHECK(InterpreterRuntime::monitorenter(thread, monitor));
if (HAS_PENDING_EXCEPTION) {
- thread->pop_Java_frame();
+ thread->pop_zero_frame();
return;
}
}
@@ -188,7 +188,7 @@ void CppInterpreter::native_entry(method
if (handlerAddr == NULL) {
CALL_VM_NOCHECK(InterpreterRuntime::prepare_native_call(thread, method));
if (HAS_PENDING_EXCEPTION) {
- thread->pop_Java_frame();
+ thread->pop_zero_frame();
return;
}
handlerAddr = method->signature_handler();
@@ -198,7 +198,7 @@ void CppInterpreter::native_entry(method
CALL_VM_NOCHECK(handlerAddr =
InterpreterRuntime::slow_signature_handler(thread, method, NULL, NULL));
if (HAS_PENDING_EXCEPTION) {
- thread->pop_Java_frame();
+ thread->pop_zero_frame();
return;
}
}
@@ -304,7 +304,7 @@ void CppInterpreter::native_entry(method
}
// Unwind the current activation
- thread->pop_Java_frame();
+ thread->pop_zero_frame();
// Pop our parameters
stack->set_sp(stack->sp() + method->size_of_parameters());
@@ -378,7 +378,7 @@ void CppInterpreter::accessor_entry(meth
void CppInterpreter::accessor_entry(methodOop method, TRAPS)
{
JavaThread *thread = (JavaThread *) THREAD;
- JavaStack *stack = thread->java_stack();
+ ZeroStack *stack = thread->zero_stack();
intptr_t *locals = stack->sp();
// Drop into the slow path if we need a safepoint check
@@ -509,7 +509,7 @@ void CppInterpreter::empty_entry(methodO
void CppInterpreter::empty_entry(methodOop method, TRAPS)
{
JavaThread *thread = (JavaThread *) THREAD;
- JavaStack *stack = thread->java_stack();
+ ZeroStack *stack = thread->zero_stack();
// Drop into the slow path if we need a safepoint check
if (SafepointSynchronize::do_call_back()) {
@@ -521,7 +521,7 @@ void CppInterpreter::empty_entry(methodO
stack->set_sp(stack->sp() + method->size_of_parameters());
}
-InterpreterFrame *InterpreterFrame::build(JavaStack* stack,
+InterpreterFrame *InterpreterFrame::build(ZeroStack* stack,
const methodOop method,
JavaThread* thread)
{
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -34,11 +34,11 @@
// +--------------------+ ------------------
// | ... |
-class EntryFrame : public JavaFrame {
- friend class JavaStackPrinter;
+class EntryFrame : public ZeroFrame {
+ friend class ZeroStackPrinter;
private:
- EntryFrame() : JavaFrame()
+ EntryFrame() : ZeroFrame()
{
ShouldNotCallThis();
}
@@ -50,7 +50,7 @@ class EntryFrame : public JavaFrame {
};
public:
- static EntryFrame *build(JavaStack* stack,
+ static EntryFrame *build(ZeroStack* stack,
const intptr_t* parameters,
int parameter_words,
JavaCallWrapper* call_wrapper);
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Thu Apr 10 05:33:07 2008 -0400
@@ -35,7 +35,7 @@ void RegisterMap::check_location_valid()
bool frame::is_interpreted_frame() const
{
- return ((JavaFrame *) sp())->is_interpreter_frame();
+ return ((ZeroFrame *) sp())->is_interpreter_frame();
}
frame frame::sender_for_entry_frame(RegisterMap *map) const
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -48,7 +48,7 @@ inline frame::frame(intptr_t* sp)
inline intptr_t* frame::sender_sp() const
{
- return (intptr_t *) ((JavaFrame *) sp())->next();
+ return (intptr_t *) ((ZeroFrame *) sp())->next();
}
inline intptr_t* frame::link() const
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -38,11 +38,11 @@
// +--------------------+ ------------------
// | ... |
-class InterpreterFrame : public JavaFrame {
- friend class JavaStackPrinter;
+class InterpreterFrame : public ZeroFrame {
+ friend class ZeroStackPrinter;
private:
- InterpreterFrame() : JavaFrame()
+ InterpreterFrame() : ZeroFrame()
{
ShouldNotCallThis();
}
@@ -56,7 +56,7 @@ class InterpreterFrame : public JavaFram
};
public:
- static InterpreterFrame *build(JavaStack* stack,
+ static InterpreterFrame *build(ZeroStack* stack,
const methodOop method,
JavaThread* thread);
public:
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp Thu Apr 10 05:33:07 2008 -0400
@@ -142,7 +142,7 @@ IRT_ENTRY(address,
methodOop method,
intptr_t* unused1,
intptr_t* unused2))
- JavaStack *stack = thread->java_stack();
+ ZeroStack *stack = thread->zero_stack();
int required_words =
(align_size_up(sizeof(ffi_cif), wordSize) >> LogBytesPerWord) +
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/javaStack_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/javaStack_zero.hpp Wed Apr 09 22:22:44 2008 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-/*
- * Copyright 2003-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 JavaStack {
- private:
- intptr_t *_base; // the last available word
- intptr_t *_top; // the word past the end of the stack
- intptr_t *_sp; // the top word on the stack
-
- public:
- JavaStack()
- : _base(NULL), _top(NULL), _sp(NULL) {}
-
- bool needs_setup() const
- {
- return _base == NULL;
- }
-
- void setup(void *mem, size_t size)
- {
- assert(needs_setup(), "already set up");
- assert(!(size & WordAlignmentMask), "unaligned");
-
- _base = (intptr_t *) mem;
- _top = _base + (size >> LogBytesPerWord);
- _sp = _top;
- }
-
- void teardown()
- {
- assert(!needs_setup(), "not set up");
- assert(_sp == _top, "stuff on stack at teardown");
-
- _base = NULL;
- _top = NULL;
- _sp = NULL;
- }
-
- intptr_t *sp() const
- {
- return _sp;
- }
-
- void set_sp(intptr_t *new_sp)
- {
- assert(_top >= new_sp && new_sp >= _base, "bad stack pointer");
- _sp = new_sp;
- }
-
- int available_words() const
- {
- return _sp - _base;
- }
-
- void push(intptr_t value)
- {
- assert(_sp > _base, "stack overflow");
- *(--_sp) = value;
- }
-
- intptr_t pop()
- {
- assert(_sp < _top, "stack underflow");
- return *(_sp++);
- }
-
- void *alloc(size_t size)
- {
- int count = align_size_up(size, wordSize) >> LogBytesPerWord;
- assert(count <= available_words(), "stack overflow");
- return _sp -= count;
- }
-};
-
-//
-// | ... |
-// +--------------------+ ------------------
-// | ... | low addresses
-// | frame_type |
-// | next_frame | high addresses
-// +--------------------+ ------------------
-// | ... |
-
-class JavaFrame {
- friend class JavaStackPrinter;
-
- protected:
- JavaFrame()
- {
- ShouldNotCallThis();
- }
-
- enum Layout {
- next_frame_off,
- frame_type_off,
- jf_header_words
- };
-
- enum FrameType {
- ENTRY_FRAME = 1,
- INTERPRETER_FRAME
- };
-
- protected:
- intptr_t *addr_of_word(int offset) const
- {
- return (intptr_t *) this - offset;
- }
-
- intptr_t value_of_word(int offset) const
- {
- return *addr_of_word(offset);
- }
-
- public:
- JavaFrame *next() const
- {
- return (JavaFrame *) value_of_word(next_frame_off);
- }
-
- protected:
- FrameType type() const
- {
- return (FrameType) value_of_word(frame_type_off);
- }
-
- public:
- bool is_entry_frame() const
- {
- return type() == ENTRY_FRAME;
- }
-
- bool is_interpreter_frame() const
- {
- return type() == INTERPRETER_FRAME;
- }
-};
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Wed Apr 09 22:22:44 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -23,20 +23,20 @@
*
*/
-class JavaStackPrinter {
+class ZeroStackPrinter {
private:
outputStream* _st;
char* _buf;
int _buflen;
public:
- JavaStackPrinter(outputStream *st, char *buf, int buflen)
+ ZeroStackPrinter(outputStream *st, char *buf, int buflen)
: _st(st), _buf(buf), _buflen(buflen) {}
void print(JavaThread *thread)
{
- intptr_t *lo_addr = thread->java_stack()->sp();
- intptr_t *hi_addr = (intptr_t *) thread->top_Java_frame();
+ intptr_t *lo_addr = thread->zero_stack()->sp();
+ intptr_t *hi_addr = (intptr_t *) thread->top_zero_frame();
assert(lo_addr, "stack not set up?");
assert(hi_addr, "no frames pushed?");
@@ -46,7 +46,7 @@ class JavaStackPrinter {
while (hi_addr) {
if (!top_frame)
_st->cr();
- JavaFrame *frame = (JavaFrame *) hi_addr;
+ ZeroFrame *frame = (ZeroFrame *) hi_addr;
for (intptr_t *addr = lo_addr; addr <= hi_addr; addr++)
print_word(frame, addr, top_frame);
lo_addr = hi_addr + 1;
@@ -56,23 +56,23 @@ class JavaStackPrinter {
}
private:
- void print_word(JavaFrame *frame, intptr_t *addr, bool top_frame)
+ void print_word(ZeroFrame *frame, intptr_t *addr, bool top_frame)
{
const char *field = NULL;
const char *value = NULL;
int word = (intptr_t *) frame - addr;
switch (word) {
- case JavaFrame::next_frame_off:
+ case ZeroFrame::next_frame_off:
field = "next_frame";
break;
- case JavaFrame::frame_type_off:
+ case ZeroFrame::frame_type_off:
field = "frame_type";
switch (*addr) {
- case JavaFrame::ENTRY_FRAME:
+ case ZeroFrame::ENTRY_FRAME:
value = "ENTRY_FRAME";
break;
- case JavaFrame::INTERPRETER_FRAME:
+ case ZeroFrame::INTERPRETER_FRAME:
value = "INTERPRETER_FRAME";
break;
}
diff -r 5d2b5714c8c2 -r a6ab5c3d9b22 ports/hotspot/src/cpu/zero/vm/stack_zero.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Thu Apr 10 05:33:07 2008 -0400
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2003-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.
+ *
More information about the distro-pkg-dev
mailing list