forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Independent object counting from GC #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
pf0n
wants to merge
10
commits into
test/shen-aggregate-closure
Choose a base branch
from
test/shen-pseudo-gc
base: test/shen-aggregate-closure
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
947a244
Independent object counting from GC
pf0n c849d25
Update ObjectCountEvent.java
pf0n fdd6ea3
Fixed GCId being undefined
pf0n f6aa11b
Merge branch 'test/shen-pseudo-gc' of https://github.com/pf0n/jdk int…
pf0n 606c2e8
Ended GC Phase Timing
pf0n adb492b
Renamed gcCause, added proper documentation to shenandoahJFRObjectCou…
pf0n 64db80e
Restructured ObjectCountEventSenderClosure functionality
pf0n ad1b068
Delete src/hotspot/share/gc/shenandoah/shenandoahJFRObjectCountGC.cpp
pf0n acc6630
Delete src/hotspot/share/gc/shenandoah/shenandoahJFRObjectCountGC.hpp
pf0n 3f550b1
Removed unnecessary line in delete_entry
pf0n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
src/hotspot/share/gc/shenandoah/shenandoahJfrObjectCountGC.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #include "gc/shenandoah/shenandoahHeap.inline.hpp" | ||
| #include "gc/shenandoah/shenandoahJfrObjectCountGC.hpp" | ||
| #include "prims/jvmtiTagMap.hpp" | ||
| #include "gc/shenandoah/shenandoahVerifier.hpp" | ||
| #include "gc/shenandoah/shenandoahPhaseTimings.hpp" | ||
| #include "gc/shenandoah/shenandoahUtils.hpp" | ||
|
|
||
| void ShenandoahJfrObjectCountGC::op_final_mark() { | ||
| ShenandoahHeap* const heap = ShenandoahHeap::heap(); | ||
| assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Should be at safepoint"); | ||
| assert(!heap->has_forwarded_objects(), "No forwarded objects on this path"); | ||
|
|
||
| if (ShenandoahVerify) { | ||
| heap->verifier()->verify_roots_no_forwarded(); | ||
| } | ||
|
|
||
| if (!heap->cancelled_gc()) { | ||
| _mark.finish_mark(); | ||
|
|
||
| // Notify JVMTI that the tagmap table will need cleaning. | ||
| JvmtiTagMap::set_needs_cleaning(); | ||
|
|
||
| if (ShenandoahVerify) { | ||
| ShenandoahTimingsTracker v(ShenandoahPhaseTimings::final_mark_verify); | ||
| heap->verifier()->verify_after_concmark(); | ||
| } | ||
| } | ||
|
|
||
| { | ||
| ShenandoahTimingsTracker timing(ShenandoahPhaseTimings::final_mark_propagate_gc_state); | ||
| heap->propagate_gc_state_to_all_threads(); | ||
| } | ||
| } | ||
|
|
||
| bool ShenandoahJfrObjectCountGC::collect(GCCause::Cause cause) { | ||
| ShenandoahHeap* const heap = ShenandoahHeap::heap(); | ||
|
|
||
| entry_reset(); | ||
|
|
||
| vmop_entry_init_mark(); | ||
|
|
||
| entry_scan_remembered_set(); | ||
|
|
||
| entry_mark_roots(); | ||
| if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_roots)) { | ||
| return false; | ||
| } | ||
|
|
||
| entry_mark(); | ||
| if (check_cancellation_and_abort(ShenandoahDegenPoint::_degenerated_mark)) { | ||
| return false; | ||
| } | ||
|
|
||
| vmop_entry_final_mark(); | ||
| entry_reset_after_collect(); | ||
| return true; | ||
| } |
25 changes: 25 additions & 0 deletions
25
src/hotspot/share/gc/shenandoah/shenandoahJfrObjectCountGC.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #ifndef SHARE_GC_SHENANDOAH_SHENANDOAHOBJECTCOUNTGC_HPP | ||
| #define SHARE_GC_SHENANDOAH_SHENANDOAHOBJECTCOUNTGC_HPP | ||
|
|
||
| #include "gc/shared/gcCause.hpp" | ||
| #include "gc/shenandoah/shenandoahConcurrentGC.hpp" | ||
| #include "gc/shenandoah/shenandoahConcurrentMark.hpp" | ||
| #include "gc/shenandoah/shenandoahGC.hpp" | ||
| #include "gc/shenandoah/shenandoahHeap.hpp" | ||
|
|
||
| // A pseudo Shenandoah GC where only the marking phase is initiated | ||
| // without any memory reclamation. This GC is used specifically for | ||
| // the Java Flight Recorder's ObjectCount event. | ||
| class ShenandoahJfrObjectCountGC : public ShenandoahConcurrentGC { | ||
| public: | ||
| ShenandoahJfrObjectCountGC(ShenandoahGeneration* generation, bool do_old_gc_bootstrap = false) | ||
| : ShenandoahConcurrentGC(generation, do_old_gc_bootstrap) {} | ||
|
|
||
| // Only make use of the mark phase in Shenandoah and does not reclaim any garbage | ||
| bool collect(GCCause::Cause cause) override; | ||
|
|
||
| protected: | ||
| void op_final_mark() override; | ||
| }; | ||
|
|
||
| #endif // SHARE_GC_SHENANDOAH_SHENANDOAHOBJECTCOUNTGC_HPP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.