Mercurial > hg > truffle
comparison src/share/vm/runtime/sweeper.hpp @ 1538:bfe29ec02863
6950075: nmethod sweeper should operate concurrently
Reviewed-by: never, kvn
Contributed-by: eric.caspole@amd.com
author | never |
---|---|
date | Mon, 17 May 2010 16:50:07 -0700 |
parents | 5f24d0319e54 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1537:79bf863697eb | 1538:bfe29ec02863 |
---|---|
33 static int _seen; // Nof. nmethod we have currently processed in current pass of CodeCache | 33 static int _seen; // Nof. nmethod we have currently processed in current pass of CodeCache |
34 static int _invocations; // No. of invocations left until we are completed with this pass | 34 static int _invocations; // No. of invocations left until we are completed with this pass |
35 | 35 |
36 static bool _rescan; // Indicates that we should do a full rescan of the | 36 static bool _rescan; // Indicates that we should do a full rescan of the |
37 // of the code cache looking for work to do. | 37 // of the code cache looking for work to do. |
38 static bool _do_sweep; // Flag to skip the conc sweep if no stack scan happened | |
39 static jint _sweep_started; // Flag to control conc sweeper | |
38 static int _locked_seen; // Number of locked nmethods encountered during the scan | 40 static int _locked_seen; // Number of locked nmethods encountered during the scan |
39 static int _not_entrant_seen_on_stack; // Number of not entrant nmethod were are still on stack | 41 static int _not_entrant_seen_on_stack; // Number of not entrant nmethod were are still on stack |
40 | 42 |
41 static bool _was_full; // remember if we did emergency unloading | 43 static bool _was_full; // remember if we did emergency unloading |
42 static jint _advise_to_sweep; // flag to indicate code cache getting full | 44 static jint _advise_to_sweep; // flag to indicate code cache getting full |
46 | 48 |
47 static void process_nmethod(nmethod *nm); | 49 static void process_nmethod(nmethod *nm); |
48 public: | 50 public: |
49 static long traversal_count() { return _traversals; } | 51 static long traversal_count() { return _traversals; } |
50 | 52 |
51 static void sweep(); // Invoked at the end of each safepoint | 53 static void scan_stacks(); // Invoked at the end of each safepoint |
54 static void sweep_code_cache(); // Concurrent part of sweep job | |
55 static void possibly_sweep(); // Compiler threads call this to sweep | |
52 | 56 |
53 static void notify(nmethod* nm) { | 57 static void notify(nmethod* nm) { |
54 // Perform a full scan of the code cache from the beginning. No | 58 // Perform a full scan of the code cache from the beginning. No |
55 // need to synchronize the setting of this flag since it only | 59 // need to synchronize the setting of this flag since it only |
56 // changes to false at safepoint so we can never overwrite it with false. | 60 // changes to false at safepoint so we can never overwrite it with false. |