7098194: integrate macosx-port changes

Integrate bsd-port/hotspot and macosx-port/hotspot changes as of 2011.09.29.

Co-authored-by: Greg Lewis <glewis@eyesbeyond.com>
Co-authored-by: Kurt Miller <kurt@intricatesoftware.com>
Co-authored-by: Alexander Strange <astrange@apple.com>
Co-authored-by: Mike Swingler <swingler@apple.com>
Co-authored-by: Roger Hoover <rhoover@apple.com>
Co-authored-by: Victor Hernandez <vhernandez@apple.com>
Co-authored-by: Pratik Solanki <psolanki@apple.com>
Reviewed-by: kvn, dholmes, never, phh
This commit is contained in:
Christos Zoulas 2011-10-13 09:35:42 -07:00 committed by Daniel D. Daugherty
parent e9b8f2bab4
commit 32708baef1
70 changed files with 8298 additions and 225 deletions

View file

@ -209,7 +209,7 @@ bool error_is_suppressed(const char* file_name, int line_no) {
// Place-holder for non-existent suppression check:
#define error_is_suppressed(file_name, line_no) (false)
#endif //PRODUCT
#endif // !PRODUCT
void report_vm_error(const char* file, int line, const char* error_msg,
const char* detail_msg)
@ -264,7 +264,7 @@ void report_unimplemented(const char* file, int line) {
void report_untested(const char* file, int line, const char* message) {
#ifndef PRODUCT
warning("Untested: %s in %s: %d\n", message, file, line);
#endif // PRODUCT
#endif // !PRODUCT
}
void report_out_of_shared_space(SharedSpaceType shared_space) {
@ -309,9 +309,6 @@ void report_java_out_of_memory(const char* message) {
}
}
extern "C" void ps();
static bool error_reported = false;
// call this when the VM is dying--it might loosen some asserts
@ -366,11 +363,10 @@ void test_error_handler(size_t test_num)
default: ShouldNotReachHere();
}
}
#endif // #ifndef PRODUCT
#endif // !PRODUCT
// ------ helper functions for debugging go here ------------
#ifndef PRODUCT
// All debug entries should be wrapped with a stack allocated
// Command object. It makes sure a resource mark is set and
// flushes the logfile to prevent file sharing problems.
@ -391,11 +387,17 @@ class Command : public StackObj {
tty->print_cr("\"Executing %s\"", str);
}
~Command() { tty->flush(); Debugging = debug_save; level--; }
~Command() {
tty->flush();
Debugging = debug_save;
level--;
}
};
int Command::level = 0;
#ifndef PRODUCT
extern "C" void blob(CodeBlob* cb) {
Command c("blob");
cb->print();
@ -478,7 +480,7 @@ extern "C" void pp(void* p) {
oop obj = oop(p);
obj->print();
} else {
tty->print("%#p", p);
tty->print(PTR_FORMAT, p);
}
}
@ -487,7 +489,10 @@ extern "C" void pp(void* p) {
extern "C" void pa(intptr_t p) { ((AllocatedObj*) p)->print(); }
extern "C" void findpc(intptr_t x);
#endif // !PRODUCT
extern "C" void ps() { // print stack
if (Thread::current() == NULL) return;
Command c("ps");
@ -500,6 +505,11 @@ extern "C" void ps() { // print stack
if (p->has_last_Java_frame()) {
// If the last_Java_fp is set we are in C land and
// can call the standard stack_trace function.
#ifdef PRODUCT
p->print_stack();
} else {
tty->print_cr("Cannot find the last Java frame, printing stack disabled.");
#else // !PRODUCT
p->trace_stack();
} else {
frame f = os::current_frame();
@ -508,6 +518,7 @@ extern "C" void ps() { // print stack
tty->print("(guessing starting frame id=%#p based on current fp)\n", f.id());
p->trace_stack_from(vframe::new_vframe(&f, &reg_map, p));
pd_ps(f);
#endif // PRODUCT
}
}
@ -524,6 +535,8 @@ extern "C" void pfl() {
}
}
#ifndef PRODUCT
extern "C" void psf() { // print stack frames
{
Command c("psf");
@ -555,12 +568,15 @@ extern "C" void safepoints() {
SafepointSynchronize::print_state();
}
#endif // !PRODUCT
extern "C" void pss() { // print all stacks
if (Thread::current() == NULL) return;
Command c("pss");
Threads::print(true, true);
Threads::print(true, PRODUCT_ONLY(false) NOT_PRODUCT(true));
}
#ifndef PRODUCT
extern "C" void debug() { // to set things up for compiler debugging
Command c("debug");
@ -911,4 +927,4 @@ void get_debug_command()
}
#endif
#endif // PRODUCT
#endif // !PRODUCT