Mercurial > hg > truffle
diff src/share/vm/ci/ciMethodData.cpp @ 1783:d5d065957597
6953144: Tiered compilation
Summary: Infrastructure for tiered compilation support (interpreter + c1 + c2) for 32 and 64 bit. Simple tiered policy implementation.
Reviewed-by: kvn, never, phh, twisti
author | iveresov |
---|---|
date | Fri, 03 Sep 2010 17:51:07 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
line wrap: on
line diff
--- a/src/share/vm/ci/ciMethodData.cpp Thu Sep 02 11:40:02 2010 -0700 +++ b/src/share/vm/ci/ciMethodData.cpp Fri Sep 03 17:51:07 2010 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2010, 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 @@ -37,6 +37,8 @@ _data_size = 0; _extra_data_size = 0; _current_mileage = 0; + _invocation_counter = 0; + _backedge_counter = 0; _state = empty_state; _saw_free_extra_data = false; // Set an initial hint. Don't use set_hint_di() because @@ -56,6 +58,8 @@ _data_size = 0; _extra_data_size = 0; _current_mileage = 0; + _invocation_counter = 0; + _backedge_counter = 0; _state = empty_state; _saw_free_extra_data = false; // Set an initial hint. Don't use set_hint_di() because @@ -99,6 +103,8 @@ } // Note: Extra data are all BitData, and do not need translation. _current_mileage = methodDataOopDesc::mileage_of(mdo->method()); + _invocation_counter = mdo->invocation_count(); + _backedge_counter = mdo->backedge_count(); _state = mdo->is_mature()? mature_state: immature_state; _eflags = mdo->eflags(); @@ -253,6 +259,23 @@ } } +void ciMethodData::set_compilation_stats(short loops, short blocks) { + VM_ENTRY_MARK; + methodDataOop mdo = get_methodDataOop(); + if (mdo != NULL) { + mdo->set_num_loops(loops); + mdo->set_num_blocks(blocks); + } +} + +void ciMethodData::set_would_profile(bool p) { + VM_ENTRY_MARK; + methodDataOop mdo = get_methodDataOop(); + if (mdo != NULL) { + mdo->set_would_profile(p); + } +} + bool ciMethodData::has_escape_info() { return eflag_set(methodDataOopDesc::estimated); }