1.1 --- a/src/share/vm/ci/ciMethodData.cpp Thu Sep 02 11:40:02 2010 -0700 1.2 +++ b/src/share/vm/ci/ciMethodData.cpp Fri Sep 03 17:51:07 2010 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -37,6 +37,8 @@ 1.11 _data_size = 0; 1.12 _extra_data_size = 0; 1.13 _current_mileage = 0; 1.14 + _invocation_counter = 0; 1.15 + _backedge_counter = 0; 1.16 _state = empty_state; 1.17 _saw_free_extra_data = false; 1.18 // Set an initial hint. Don't use set_hint_di() because 1.19 @@ -56,6 +58,8 @@ 1.20 _data_size = 0; 1.21 _extra_data_size = 0; 1.22 _current_mileage = 0; 1.23 + _invocation_counter = 0; 1.24 + _backedge_counter = 0; 1.25 _state = empty_state; 1.26 _saw_free_extra_data = false; 1.27 // Set an initial hint. Don't use set_hint_di() because 1.28 @@ -99,6 +103,8 @@ 1.29 } 1.30 // Note: Extra data are all BitData, and do not need translation. 1.31 _current_mileage = methodDataOopDesc::mileage_of(mdo->method()); 1.32 + _invocation_counter = mdo->invocation_count(); 1.33 + _backedge_counter = mdo->backedge_count(); 1.34 _state = mdo->is_mature()? mature_state: immature_state; 1.35 1.36 _eflags = mdo->eflags(); 1.37 @@ -253,6 +259,23 @@ 1.38 } 1.39 } 1.40 1.41 +void ciMethodData::set_compilation_stats(short loops, short blocks) { 1.42 + VM_ENTRY_MARK; 1.43 + methodDataOop mdo = get_methodDataOop(); 1.44 + if (mdo != NULL) { 1.45 + mdo->set_num_loops(loops); 1.46 + mdo->set_num_blocks(blocks); 1.47 + } 1.48 +} 1.49 + 1.50 +void ciMethodData::set_would_profile(bool p) { 1.51 + VM_ENTRY_MARK; 1.52 + methodDataOop mdo = get_methodDataOop(); 1.53 + if (mdo != NULL) { 1.54 + mdo->set_would_profile(p); 1.55 + } 1.56 +} 1.57 + 1.58 bool ciMethodData::has_escape_info() { 1.59 return eflag_set(methodDataOopDesc::estimated); 1.60 }