changeset 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 3ac351ed7270
children 597eade2394e
files src/share/vm/interpreter/invocationCounter.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/interpreter/invocationCounter.cpp	Wed Mar 28 13:56:41 2012 +0200
+++ b/src/share/vm/interpreter/invocationCounter.cpp	Wed Mar 28 17:46:14 2012 +0200
@@ -47,7 +47,11 @@
   // large value.  Now reduce the value, so that the method can be
   // executed many more times before re-entering the VM.
   int old_count = count();
+#ifdef GRAAL
+  int new_count = 1;
+#else
   int new_count = MIN2(old_count, (int) (CompileThreshold / 2));
+#endif
   // prevent from going to zero, to distinguish from never-executed methods
   if (new_count == 0)  new_count = 1;
   if (old_count != new_count)  set(state(), new_count);