diff options
author | kvn <none@none> | 2010-01-29 09:27:22 -0800 |
---|---|---|
committer | kvn <none@none> | 2010-01-29 09:27:22 -0800 |
commit | f964acc64f436dfc90c587ea3b9624b5ed63efdc (patch) | |
tree | c88c393f5d9f8c48818d4846026daa6d64ce2e85 /src/share/vm/runtime/sweeper.hpp | |
parent | 522d662a50e30c07e59b16d648a0e974fcd22707 (diff) | |
download | jdk8u_hotspot-f964acc64f436dfc90c587ea3b9624b5ed63efdc.tar.gz |
4360113: Evict nmethods when code cache gets full
Summary: Speculatively unload the oldest nmethods when code cache gets full.
Reviewed-by: never, kvn
Contributed-by: eric.caspole@amd.com
Diffstat (limited to 'src/share/vm/runtime/sweeper.hpp')
-rw-r--r-- | src/share/vm/runtime/sweeper.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/share/vm/runtime/sweeper.hpp b/src/share/vm/runtime/sweeper.hpp index 1f7260cac..69b2e2056 100644 --- a/src/share/vm/runtime/sweeper.hpp +++ b/src/share/vm/runtime/sweeper.hpp @@ -38,6 +38,11 @@ class NMethodSweeper : public AllStatic { static int _locked_seen; // Number of locked nmethods encountered during the scan static int _not_entrant_seen_on_stack; // Number of not entrant nmethod were are still on stack + static bool _was_full; // remember if we did emergency unloading + static jint _advise_to_sweep; // flag to indicate code cache getting full + static jlong _last_was_full; // timestamp of last emergency unloading + static uint _highest_marked; // highest compile id dumped at last emergency unloading + static long _was_full_traversal; // trav number at last emergency unloading static void process_nmethod(nmethod *nm); public: @@ -51,4 +56,10 @@ class NMethodSweeper : public AllStatic { // changes to false at safepoint so we can never overwrite it with false. _rescan = true; } + + static void handle_full_code_cache(bool is_full); // Called by compilers who fail to allocate + static void speculative_disconnect_nmethods(bool was_full); // Called by vm op to deal with alloc failure + + static void set_was_full(bool state) { _was_full = state; } + static bool was_full() { return _was_full; } }; |