--- old/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java 2012-06-20 15:42:59.487246184 -0700 +++ new/agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java 2012-06-20 15:42:59.406997088 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2012, 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 @@ -651,10 +651,11 @@ boolean fellThrough = false; // False to get first BB marked. // First mark all exception handlers as start of a basic-block - TypeArray excps = method().getExceptionTable(); - for(int i = 0; i < excps.getLength(); i += 4) { - int handler_pc_idx = i+2; - markBB(excps.getIntAt(handler_pc_idx), null); + if (method().hasExceptionTable()) { + ExceptionTableElement[] excps = method().getExceptionTable(); + for(int i = 0; i < excps.length; i++) { + markBB(excps[i].getHandlerPC(), null); + } } // Then iterate through the code @@ -891,14 +892,15 @@ // Mark entry basic block as alive and all exception handlers _basic_blocks[0].markAsAlive(); - TypeArray excps = method().getExceptionTable(); - for(int i = 0; i < excps.getLength(); i += 4) { - int handler_pc_idx = i+2; - BasicBlock bb = getBasicBlockAt(excps.getIntAt(handler_pc_idx)); - // If block is not already alive (due to multiple exception handlers to same bb), then - // make it alive - if (bb.isDead()) - bb.markAsAlive(); + if (method().hasExceptionTable()) { + ExceptionTableElement[] excps = method().getExceptionTable(); + for(int i = 0; i < excps.length; i ++) { + BasicBlock bb = getBasicBlockAt(excps[i].getHandlerPC()); + // If block is not already alive (due to multiple exception handlers to same bb), then + // make it alive + if (bb.isDead()) + bb.markAsAlive(); + } } BytecodeStream bcs = new BytecodeStream(_method); @@ -1468,12 +1470,12 @@ if (_has_exceptions) { int bci = itr.bci(); - TypeArray exct = method().getExceptionTable(); - for(int i = 0; i< exct.getLength(); i+=4) { - int start_pc = exct.getIntAt(i); - int end_pc = exct.getIntAt(i+1); - int handler_pc = exct.getIntAt(i+2); - int catch_type = exct.getIntAt(i+3); + ExceptionTableElement[] exct = method().getExceptionTable(); + for(int i = 0; i< exct.length; i++) { + int start_pc = exct[i].getStartPC(); + int end_pc = exct[i].getEndPC(); + int handler_pc = exct[i].getHandlerPC(); + int catch_type = exct[i].getCatchTypeIndex(); if (start_pc <= bci && bci < end_pc) { BasicBlock excBB = getBasicBlockAt(handler_pc); @@ -2151,7 +2153,7 @@ _conflict = false; _max_locals = (int) method().getMaxLocals(); _max_stack = (int) method().getMaxStack(); - _has_exceptions = (method().getExceptionTable().getLength() > 0); + _has_exceptions = (method().hasExceptionTable()); _nof_refval_conflicts = 0; _init_vars = new ArrayList(5); // There are seldom more than 5 init_vars _report_result = false;