agent/src/share/classes/sun/jvm/hotspot/oops/GenerateOopMap.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2001, 2011, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 649,662 ****
initializeBB();
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);
}
// Then iterate through the code
BytecodeStream bcs = new BytecodeStream(_method);
int bytecode;
--- 649,663 ----
initializeBB();
boolean fellThrough = false; // False to get first BB marked.
// First mark all exception handlers as start of a basic-block
! 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
BytecodeStream bcs = new BytecodeStream(_method);
int bytecode;
*** 889,907 ****
final int[] change = new int[1];
change[0] = 1;
// 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();
}
BytecodeStream bcs = new BytecodeStream(_method);
// Iterate through all basic blocks until we reach a fixpoint
while (change[0] != 0) {
--- 890,909 ----
final int[] change = new int[1];
change[0] = 1;
// Mark entry basic block as alive and all exception handlers
_basic_blocks[0].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);
// Iterate through all basic blocks until we reach a fixpoint
while (change[0] != 0) {
*** 1466,1481 ****
break;
}
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);
if (start_pc <= bci && bci < end_pc) {
BasicBlock excBB = getBasicBlockAt(handler_pc);
CellTypeStateList excStk = excBB.stack();
CellTypeStateList cOpStck = stack();
--- 1468,1483 ----
break;
}
if (_has_exceptions) {
int bci = itr.bci();
! 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);
CellTypeStateList excStk = excBB.stack();
CellTypeStateList cOpStck = stack();
*** 2149,2159 ****
// Initialize values
_got_error = false;
_conflict = false;
_max_locals = (int) method().getMaxLocals();
_max_stack = (int) method().getMaxStack();
! _has_exceptions = (method().getExceptionTable().getLength() > 0);
_nof_refval_conflicts = 0;
_init_vars = new ArrayList(5); // There are seldom more than 5 init_vars
_report_result = false;
_report_result_for_send = false;
_report_for_exit_bci = -1;
--- 2151,2161 ----
// Initialize values
_got_error = false;
_conflict = false;
_max_locals = (int) method().getMaxLocals();
_max_stack = (int) method().getMaxStack();
! _has_exceptions = (method().hasExceptionTable());
_nof_refval_conflicts = 0;
_init_vars = new ArrayList(5); // There are seldom more than 5 init_vars
_report_result = false;
_report_result_for_send = false;
_report_for_exit_bci = -1;