Mercurial > hg > graal-compiler
diff src/share/vm/oops/methodDataOop.hpp @ 2252:72d6c57d0658
7017434: Tiered needs to support reprofiling
Summary: Tiered needs to support proper method reprofiling after deopts.
Reviewed-by: kvn
author | iveresov |
---|---|
date | Wed, 09 Feb 2011 16:34:34 -0800 |
parents | f95d63e2154a |
children | a97fd181b813 |
line wrap: on
line diff
--- a/src/share/vm/oops/methodDataOop.hpp Tue Feb 08 16:12:16 2011 -0800 +++ b/src/share/vm/oops/methodDataOop.hpp Wed Feb 09 16:34:34 2011 -0800 @@ -1224,6 +1224,9 @@ InvocationCounter _invocation_counter; // Same for backedges. InvocationCounter _backedge_counter; + // Counter values at the time profiling started. + int _invocation_counter_start; + int _backedge_counter_start; // Number of loops and blocks is computed when compiling the first // time with C1. It is used to determine if method is trivial. short _num_loops; @@ -1333,6 +1336,28 @@ return backedge_counter()->count(); } + int invocation_count_start() { + if (invocation_counter()->carry()) { + return 0; + } + return _invocation_counter_start; + } + + int backedge_count_start() { + if (backedge_counter()->carry()) { + return 0; + } + return _backedge_counter_start; + } + + int invocation_count_delta() { return invocation_count() - invocation_count_start(); } + int backedge_count_delta() { return backedge_count() - backedge_count_start(); } + + void reset_start_counters() { + _invocation_counter_start = invocation_count(); + _backedge_counter_start = backedge_count(); + } + InvocationCounter* invocation_counter() { return &_invocation_counter; } InvocationCounter* backedge_counter() { return &_backedge_counter; }