8253457: Remove unimplemented register stack functions

Reviewed-by: iklam, dholmes, shade
This commit is contained in:
Coleen Phillimore 2020-09-23 11:29:58 +00:00
parent e4d0e5af4d
commit b8ea80af33
12 changed files with 10 additions and 175 deletions

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -35,16 +35,6 @@
frame pd_last_frame();
public:
void set_base_of_stack_pointer(intptr_t* base_sp) {}
intptr_t* base_of_stack_pointer() { return NULL; }
void record_base_of_stack_pointer() {}
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext,
bool isInJava);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@ -37,19 +37,10 @@
intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); }
void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); }
void set_base_of_stack_pointer(intptr_t* base_sp) {
}
static ByteSize last_Java_fp_offset() {
return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset();
}
intptr_t* base_of_stack_pointer() {
return NULL;
}
void record_base_of_stack_pointer() {
}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext,
bool isInJava);
@ -58,12 +49,5 @@
private:
bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava);
public:
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_BSD_X86_THREAD_BSD_X86_HPP

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -60,15 +60,6 @@
return byte_offset_of(JavaThread, _top_zero_frame);
}
public:
void record_base_of_stack_pointer() {
assert(top_zero_frame() == NULL, "junk on stack prior to Java call");
}
void set_base_of_stack_pointer(intptr_t* base_sp) {
assert(base_sp == NULL, "should be");
assert(top_zero_frame() == NULL, "junk on stack after Java call");
}
public:
void set_last_Java_frame() {
set_last_Java_frame(top_zero_frame(), zero_stack()->sp());
@ -110,10 +101,4 @@
return false;
}
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_BSD_ZERO_THREAD_BSD_ZERO_HPP

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -48,19 +48,10 @@
intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); }
void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); }
void set_base_of_stack_pointer(intptr_t* base_sp) {
}
static ByteSize last_Java_fp_offset() {
return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset();
}
intptr_t* base_of_stack_pointer() {
return NULL;
}
void record_base_of_stack_pointer() {
}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext,
bool isInJava);
@ -71,10 +62,4 @@ public:
static Thread *aarch64_get_thread_helper();
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_LINUX_AARCH64_THREAD_LINUX_AARCH64_HPP

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2020, 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
@ -48,18 +48,6 @@
return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset();
}
void set_base_of_stack_pointer(intptr_t* base_sp) {
// Nothing to do
}
intptr_t* base_of_stack_pointer() {
return NULL;
}
void record_base_of_stack_pointer() {
// Nothing to do
}
static ByteSize heap_top_addr_offset() { return byte_offset_of(JavaThread, _heap_top_addr); }
static ByteSize card_table_base_offset() { return byte_offset_of(JavaThread, _card_table_base); }
@ -78,10 +66,4 @@ private:
bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava);
public:
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_LINUX_ARM_THREAD_LINUX_ARM_HPP

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -37,16 +37,6 @@
public:
void set_base_of_stack_pointer(intptr_t* base_sp) {}
intptr_t* base_of_stack_pointer() { return NULL; }
void record_base_of_stack_pointer() {}
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava);
bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -36,16 +36,6 @@
frame pd_last_frame();
public:
void set_base_of_stack_pointer(intptr_t* base_sp) {}
intptr_t* base_of_stack_pointer() { return NULL; }
void record_base_of_stack_pointer() {}
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava);
bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava);

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, 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
@ -37,19 +37,10 @@
intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); }
void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); }
void set_base_of_stack_pointer(intptr_t* base_sp) {
}
static ByteSize last_Java_fp_offset() {
return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset();
}
intptr_t* base_of_stack_pointer() {
return NULL;
}
void record_base_of_stack_pointer() {
}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext,
bool isInJava);
@ -58,10 +49,4 @@ private:
bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava);
public:
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_LINUX_X86_THREAD_LINUX_X86_HPP

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -60,15 +60,6 @@
return byte_offset_of(JavaThread, _top_zero_frame);
}
public:
void record_base_of_stack_pointer() {
assert(top_zero_frame() == NULL, "junk on stack prior to Java call");
}
void set_base_of_stack_pointer(intptr_t* base_sp) {
assert(base_sp == NULL, "should be");
assert(top_zero_frame() == NULL, "junk on stack after Java call");
}
public:
void set_last_Java_frame() {
set_last_Java_frame(top_zero_frame(), zero_stack()->sp());
@ -117,11 +108,4 @@
return false; // silence compile warning
}
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_LINUX_ZERO_THREAD_LINUX_ZERO_HPP

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, 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
@ -44,16 +44,10 @@
intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); }
void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); }
void set_base_of_stack_pointer(intptr_t* base_sp) {}
static ByteSize last_Java_fp_offset() {
return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset();
}
intptr_t* base_of_stack_pointer() { return NULL; }
void record_base_of_stack_pointer() {}
bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext,
bool isInJava);
@ -64,11 +58,4 @@
private:
bool pd_get_top_frame(frame* fr_addr, void* ucontext, bool isInJava);
public:
// These routines are only used on cpu architectures that
// have separate register stacks (Itanium).
static bool register_stack_overflow() { return false; }
static void enable_register_stack_guard() {}
static void disable_register_stack_guard() {}
#endif // OS_CPU_WINDOWS_X86_THREAD_WINDOWS_X86_HPP

@ -108,10 +108,6 @@ JavaCallWrapper::JavaCallWrapper(const methodHandle& callee_method, Handle recei
if(clear_pending_exception) {
_thread->clear_pending_exception();
}
if (_anchor.last_Java_sp() == NULL) {
_thread->record_base_of_stack_pointer();
}
}
@ -126,11 +122,6 @@ JavaCallWrapper::~JavaCallWrapper() {
debug_only(_thread->dec_java_call_counter());
if (_anchor.last_Java_sp() == NULL) {
_thread->set_base_of_stack_pointer(NULL);
}
// Old thread-local info. has been restored. We are not back in the VM.
ThreadStateTransition::transition_from_java(_thread, _thread_in_vm);

@ -1807,13 +1807,6 @@ bool JavaThread::reguard_stack(address cur_sp) {
return true; // Stack already guarded or guard pages not needed.
}
if (register_stack_overflow()) {
// For those architectures which have separate register and
// memory stacks, we must check the register stack to see if
// it has overflowed.
return false;
}
// Java code never executes within the yellow zone: the latter is only
// there to provoke an exception during stack banging. If java code
// is executing there, either StackShadowPages should be larger, or
@ -1942,13 +1935,6 @@ void JavaThread::run() {
// initialize thread-local alloc buffer related fields
this->initialize_tlab();
// Used to test validity of stack trace backs.
// This can't be moved into pre_run() else we invalidate
// the requirement that thread_main_inner is lower on
// the stack. Consequently all the initialization logic
// stays here in run() rather than pre_run().
this->record_base_of_stack_pointer();
this->create_stack_guard_pages();
this->cache_global_variables();
@ -2796,7 +2782,6 @@ void JavaThread::enable_stack_reserved_zone() {
} else {
warning("Attempt to guard stack reserved zone failed.");
}
enable_register_stack_guard();
}
void JavaThread::disable_stack_reserved_zone() {
@ -2814,7 +2799,6 @@ void JavaThread::disable_stack_reserved_zone() {
} else {
warning("Attempt to unguard stack reserved zone failed.");
}
disable_register_stack_guard();
}
void JavaThread::enable_stack_yellow_reserved_zone() {
@ -2833,7 +2817,6 @@ void JavaThread::enable_stack_yellow_reserved_zone() {
} else {
warning("Attempt to guard stack yellow zone failed.");
}
enable_register_stack_guard();
}
void JavaThread::disable_stack_yellow_reserved_zone() {
@ -2852,7 +2835,6 @@ void JavaThread::disable_stack_yellow_reserved_zone() {
} else {
warning("Attempt to unguard stack yellow zone failed.");
}
disable_register_stack_guard();
}
void JavaThread::enable_stack_red_zone() {