Mercurial > hg > graal-jvmci-8
comparison src/share/vm/interpreter/invocationCounter.cpp @ 5163:8d18583cf5f7
reset invocation counter to 1 when method is queued for compilation, this leads to fewer unsuccessful re-enqueues.
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 28 Mar 2012 17:46:14 +0200 |
parents | f95d63e2154a |
children | e1e681a5558e |
comparison
equal
deleted
inserted
replaced
5162:3ac351ed7270 | 5163:8d18583cf5f7 |
---|---|
45 set_carry_flag(); | 45 set_carry_flag(); |
46 // The carry bit now indicates that this counter had achieved a very | 46 // The carry bit now indicates that this counter had achieved a very |
47 // large value. Now reduce the value, so that the method can be | 47 // large value. Now reduce the value, so that the method can be |
48 // executed many more times before re-entering the VM. | 48 // executed many more times before re-entering the VM. |
49 int old_count = count(); | 49 int old_count = count(); |
50 #ifdef GRAAL | |
51 int new_count = 1; | |
52 #else | |
50 int new_count = MIN2(old_count, (int) (CompileThreshold / 2)); | 53 int new_count = MIN2(old_count, (int) (CompileThreshold / 2)); |
54 #endif | |
51 // prevent from going to zero, to distinguish from never-executed methods | 55 // prevent from going to zero, to distinguish from never-executed methods |
52 if (new_count == 0) new_count = 1; | 56 if (new_count == 0) new_count = 1; |
53 if (old_count != new_count) set(state(), new_count); | 57 if (old_count != new_count) set(state(), new_count); |
54 } | 58 } |
55 | 59 |