Print this page
rev 1839 : 6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/os/linux/vm/vmError_linux.cpp
          +++ new/src/os/linux/vm/vmError_linux.cpp
   1    1  /*
   2      - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
        2 + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 21 lines elided ↑ open up ↑
  34   34  void VMError::show_message_box(char *buf, int buflen) {
  35   35    bool yes;
  36   36    do {
  37   37      error_string(buf, buflen);
  38   38      int len = (int)strlen(buf);
  39   39      char *p = &buf[len];
  40   40  
  41   41      jio_snprintf(p, buflen - len,
  42   42                 "\n\n"
  43   43                 "Do you want to debug the problem?\n\n"
  44      -               "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT "\n"
       44 +               "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
  45   45                 "Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
  46   46                 "Otherwise, press RETURN to abort...",
  47   47                 os::current_process_id(), os::current_process_id(),
  48      -               os::current_thread_id());
       48 +               os::current_thread_id(), os::current_thread_id());
  49   49  
  50   50      yes = os::message_box("Unexpected Error", buf);
  51   51  
  52   52      if (yes) {
  53   53        // yes, user asked VM to launch debugger
  54   54        jio_snprintf(buf, buflen, "gdb /proc/%d/exe %d",
  55   55                     os::current_process_id(), os::current_process_id());
  56   56  
  57   57        os::fork_and_exec(buf);
  58   58        yes = false;
↓ open down ↓ 54 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX