comparison 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
comparison
equal deleted inserted replaced
2251:336d17dff7cc 2252:72d6c57d0658
1222 // We need those because in tiered a method can be concurrently 1222 // We need those because in tiered a method can be concurrently
1223 // executed at different levels. 1223 // executed at different levels.
1224 InvocationCounter _invocation_counter; 1224 InvocationCounter _invocation_counter;
1225 // Same for backedges. 1225 // Same for backedges.
1226 InvocationCounter _backedge_counter; 1226 InvocationCounter _backedge_counter;
1227 // Counter values at the time profiling started.
1228 int _invocation_counter_start;
1229 int _backedge_counter_start;
1227 // Number of loops and blocks is computed when compiling the first 1230 // Number of loops and blocks is computed when compiling the first
1228 // time with C1. It is used to determine if method is trivial. 1231 // time with C1. It is used to determine if method is trivial.
1229 short _num_loops; 1232 short _num_loops;
1230 short _num_blocks; 1233 short _num_blocks;
1231 // Highest compile level this method has ever seen. 1234 // Highest compile level this method has ever seen.
1329 int backedge_count() { 1332 int backedge_count() {
1330 if (backedge_counter()->carry()) { 1333 if (backedge_counter()->carry()) {
1331 return InvocationCounter::count_limit; 1334 return InvocationCounter::count_limit;
1332 } 1335 }
1333 return backedge_counter()->count(); 1336 return backedge_counter()->count();
1337 }
1338
1339 int invocation_count_start() {
1340 if (invocation_counter()->carry()) {
1341 return 0;
1342 }
1343 return _invocation_counter_start;
1344 }
1345
1346 int backedge_count_start() {
1347 if (backedge_counter()->carry()) {
1348 return 0;
1349 }
1350 return _backedge_counter_start;
1351 }
1352
1353 int invocation_count_delta() { return invocation_count() - invocation_count_start(); }
1354 int backedge_count_delta() { return backedge_count() - backedge_count_start(); }
1355
1356 void reset_start_counters() {
1357 _invocation_counter_start = invocation_count();
1358 _backedge_counter_start = backedge_count();
1334 } 1359 }
1335 1360
1336 InvocationCounter* invocation_counter() { return &_invocation_counter; } 1361 InvocationCounter* invocation_counter() { return &_invocation_counter; }
1337 InvocationCounter* backedge_counter() { return &_backedge_counter; } 1362 InvocationCounter* backedge_counter() { return &_backedge_counter; }
1338 1363