src/hotspot/share/code/exceptionHandlerTable.cpp
changeset 54960 e46fe26d7f77
parent 47216 71c04702a3d5
child 55293 d19dc5b10fbb
equal deleted inserted replaced
54959:00425a850a2f 54960:e46fe26d7f77
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   183       return *(adr(i)+1);
   183       return *(adr(i)+1);
   184   return 0;                     // Failed to find any execption offset
   184   return 0;                     // Failed to find any execption offset
   185 }
   185 }
   186 
   186 
   187 void ImplicitExceptionTable::print(address base) const {
   187 void ImplicitExceptionTable::print(address base) const {
   188   tty->print("{");
   188   const uint n = len();
   189   for( uint i=0; i<len(); i++ )
   189   if (n > 0) {
   190     tty->print("< " INTPTR_FORMAT ", " INTPTR_FORMAT " > ", p2i(base + *adr(i)), p2i(base + *(adr(i)+1)));
   190     const uint items_per_line = 3;
   191   tty->print_cr("}");
   191     uint i;
       
   192     tty->print_cr("ImplicitExceptionTable (size = %d entries, %d bytes):", n, size_in_bytes());
       
   193     tty->print("{");
       
   194     for (i = 0; i < n; i++) {
       
   195       if (i%items_per_line == 0) {
       
   196         tty->cr();
       
   197         tty->fill_to(3);
       
   198       }
       
   199       tty->print("< " INTPTR_FORMAT ", " INTPTR_FORMAT " > ", p2i(base + *adr(i)), p2i(base + *(adr(i)+1)));
       
   200     }
       
   201     tty->bol();
       
   202     tty->print_cr("}");
       
   203   } else {
       
   204     tty->print_cr("ImplicitExceptionTable is empty");
       
   205   }
   192 }
   206 }
   193 
   207 
   194 ImplicitExceptionTable::ImplicitExceptionTable(const nmethod* nm) {
   208 ImplicitExceptionTable::ImplicitExceptionTable(const nmethod* nm) {
   195   if (nm->nul_chk_table_size() == 0) {
   209   if (nm->nul_chk_table_size() == 0) {
   196     _len = 0;
   210     _len = 0;