diff -u openjdk/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
--- openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2011-07-05 14:31:05.000000000 -0400
+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2011-11-15 15:15:30.705973617 -0500
@@ -237,6 +238,19 @@
   return buf;
 }
 
+#ifdef PRODUCT
+extern "C" void ps() {
+  fdStream out(defaultStream::output_fd());
+  JavaThread* thread = JavaThread::active();
+  char *buf = new char[1024*1024];
+  VMError err(thread, "", 0, "", "");
+
+  err.print_stack_trace(&out, thread, buf, 1024*1024, true);
+
+  delete[] buf;
+}
+#endif // PRODUCT
+
 void VMError::print_stack_trace(outputStream* st, JavaThread* jt,
                                 char* buf, int buflen, bool verbose) {
 #ifdef ZERO
diff -u openjdk/hotspot/src/share/vm/utilities/vmError.hpp openjdk/hotspot/src/share/vm/utilities/vmError.hpp
--- openjdk/hotspot/src/share/vm/utilities/vmError.hpp	2011-07-05 14:31:05.000000000 -0400
+++ openjdk/hotspot/src/share/vm/utilities/vmError.hpp	2011-11-15 15:15:30.631987981 -0500
@@ -30,6 +30,10 @@
 
 class VM_ReportJavaOutOfMemory;
 
+#ifdef PRODUCT
+extern "C" void ps();
+#endif // PRODUCT
+
 class VMError : public StackObj {
   friend class VM_ReportJavaOutOfMemory;
 
@@ -89,6 +93,10 @@
   const char* detail_msg() const { return _detail_msg; }
   bool should_report_bug(unsigned int id) { return id != oom_error; }
 
+#ifdef PRODUCT
+  friend void ps();
+#endif // PRODUCT
+
 public:
   // Constructor for crashes
   VMError(Thread* thread, unsigned int sig, address pc, void* siginfo,
