forked from openjdk/jdk
-
Notifications
You must be signed in to change notification settings - Fork 0
[Draft] Test/shen aggregate closure #1
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
129
commits into
master
Choose a base branch
from
test/shen-aggregate-closure
base: master
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
129 commits
Select commit
Hold shift + click to select a range
469fd32
Testing ObjectCount event with Shenandoah
pf0n 73f2b17
Merge branch 'master' of https://github.com/pf0n/jdk
pf0n 48ab9c8
Revert "8358533: Improve performance of java.io.Reader.readAllLines"
pf0n 3da9f89
Testing ObjectCount event with Shenandoah collector
pf0n ec5ad1a
Created ObjectCount event tests for G1Full and ParallelOld
pf0n 354deee
Initiated GC for ObjectCount testing
pf0n 359caff
Removed unnecessary duplicate calls to ObjectCountEventVerifier in Ob…
pf0n adea2fc
ObjectCount event test with g1 full
pf0n c535645
Separated ObjectCount and ObjectCountAfterGC
pf0n a135b2d
Minimize code duplication by adding templates to ObjectCountEvent sender
pf0n 4826229
ObjectCount data will be emitted if ObjectCountAfterGC is sending data
pf0n 00b15d6
Delete src/hotspot/share/gc/shared/objectCountAfterGCEventSender.cpp
pf0n 461b71c
Delete src/hotspot/share/gc/shared/objectCountAfterGCEventSender.hpp
pf0n 33aa1da
Delete src/hotspot/share/gc/shared/objectCountEventSender.cpp
pf0n cb368f6
Delete src/hotspot/share/gc/shared/objectCountEventSender.hpp
pf0n 3d05ece
Added object counting to Shenandoah
pf0n 523ec03
Merge branch 'test/shen-oc' of https://github.com/pf0n/jdk into test/…
pf0n f412082
Merge branch 'master' of https://github.com/pf0n/jdk
pf0n 82bb883
Templates for ObjectCountEventSenderClosure
pf0n 405e0d9
Updated file for objectCountEventSenderTemplate.hpp
pf0n d1a1e6b
Updated header gaurds for objectCountEventSenderTemplate.hpp
pf0n a868e9b
Removed whitespace changes
pf0n 16eee14
Attempt to fix assert error
pf0n e4747f2
Removed iostream in objectCountEventSenderTemplate
pf0n 0a9c094
Add template for the method that reports object count and updated res…
pf0n b88dce2
Reverting back to old commit
pf0n 5f912be
Uncommented report_object_count_after_gc
pf0n 08fc38c
Added KlassInfoTable to ObjectCount class
pf0n 4c02ed1
Restored objectCountEventSender
pf0n 520f534
Efficient implementation of ObjectCountAfterGC
pf0n b3b5706
New closure for object counting
pf0n 5f77ceb
Delete src/hotspot/share/gc/shared/objectCountEventSenderTemplate.hpp
pf0n 5466e0e
Atomic operations implemented in record_instance and merge_entry
pf0n afe3f12
Merge branch 'test/shen-oc' of https://github.com/pf0n/jdk into test/…
pf0n 6c6e966
Included objectCountEventSender.hpp in objectCountClosure.cpp
pf0n 57d4ea0
Added clearing entries method for KlassInfoTable
pf0n 1c371b2
Removed inheritance from objectCountClosure
pf0n b1d8145
Templatized should_send_event in ObjectCountClosure
pf0n 24523e7
Added include services gaurd to should_send_event()
pf0n dd3cd66
Attempt to fix incomplete type error
pf0n 69f0813
Trying to fix forward declaration of 'class Mutex' error
pf0n eff8b16
Fixed assert error in debug build
pf0n 5bf562b
Attempt to remove to unnecessary include for header files
pf0n f3957f0
Removed memory/heapInspection.hpp
pf0n 9ab1d45
Changed the report_object_count function to call the get_table method…
pf0n 0d5b154
Trying to fix debug build errors
pf0n 8319955
Trying to fix incomplete type error for 'Mutex'
pf0n 046be80
Included runtime/mutex in object count closure files
pf0n 016196b
Trying to fix build error
pf0n 35043ee
Trying to fix forward declaration of 'class KlassInfoTable'
pf0n 3b3ed70
Added runtime/mutex to objectCountClosure
pf0n fd0418c
trying to fix debug errors
pf0n 97028a7
Added include services to objectCountClosure.cpp
pf0n 5de6cc9
Added extra check to see if ObjectCountAfterGC is enabled in report_o…
pf0n 0d2a8a8
Removed universe.hpp
pf0n 15859c1
Removed mutex header file in objectCountClosure files
pf0n f555bfa
Readded mutex header file in objectCountClosure files
pf0n a794546
Removed unnecessary atomic operations in merge_entry
pf0n bbc5ff0
Added comments for public methods in ObjectCountClosure
pf0n fc6b101
KlassInfoEntry will be deleted after sending event for that entry
pf0n 0cdffed
Report object count outside of safepoint
pf0n 1f67cf5
Create ObjectCountClosure to be a StackObj
pf0n 96b07b4
Merge branch 'openjdk:master' into test/shen-oc
pf0n b2c7950
New closure that combines marking and object counting into one
pf0n 88f5be1
No longer need ObjectCountClosure class
pf0n f5c69bc
Removed objectCountClosure.hpp in gcTrace
pf0n 89cd068
Removed cit member from the ObjectCountEventSenderClosure
pf0n 2a932fb
Restored cit in object count event sender
pf0n e06c698
Entry is always at the head when iterating
pf0n bb6fffd
Delete entry in the middle of bucket
pf0n 1121469
Assert to check if KlassInfoEntry was deleted + comments
pf0n 92ab0cb
Removed explicit template instantiation and added test for ObjectCoun…
pf0n 0075cea
Subtract the total object size from the total table size to fix shoul…
pf0n 120b290
Put ShenandoahMarkRefsAndCountClosure at appropriate places
pf0n 5ae6563
Removed redundant check to see if object is null
pf0n 911df7b
Testing thread local KlassInfoTables
pf0n a1c2ae1
Threads now have their own instance of a KlassInfoTable and merging p…
pf0n e65781c
Merge branch 'master' of https://github.com/pf0n/jdk
pf0n 92755bb
Merge remote-tracking branch 'origin/master' into test/shen-thread-lo…
pf0n 67e381c
Merge branch 'openjdk:master' into test/shen-thread-local-tables
pf0n 0c7f751
Merge branch 'test/shen-thread-local-tables' of https://github.com/pf…
pf0n 546d746
Removed unnecessary #include statements
pf0n 61f67c8
fixup! Removed unnecessary #include statements
pf0n 4b0a2f7
Created gcTrace.inline.hpp and objectCountEventSender.inline.hpp for …
pf0n 0817661
Fix for requestable event not declared
pf0n 10f31fc
added compiliation guards
pf0n 37a1e6c
Merge branch 'openjdk:master' into test/shen-aggregate-closure
pf0n c86dd4a
General comments + Mutex for merging tables
pf0n e9531f2
Merge branch 'test/shen-aggregate-closure' of https://github.com/pf0n…
pf0n 23ede8c
Merge branch 'master' of https://github.com/pf0n/jdk
pf0n 8a910e0
Safety checks
pf0n f85b098
Fix assert error for genshen
pf0n ec0c7c0
Remove templates for should_send_event + Restructured logic for repor…
pf0n 67ebc62
Templatized ObjectCountEventSenderClosure class
pf0n e32f528
Merge remote-tracking branch 'origin/master' into test/shen-aggregate…
pf0n bee4128
New lock called TableMerge_lock
pf0n da84897
src/hotspot/share
pf0n 729f413
Do not allow object counting for GenShen and only create cit if JFR i…
pf0n 2fa61d3
More documentation for method
pf0n 3d2bdeb
Stronger assertion for ShenandoahObjectCountClosure
pf0n 2c32f70
Don't reuse the same KlassInfoTable
pf0n 8b091f2
Removed unused method in heapInspection.hpp
pf0n fce96de
Accidentally pushed a char
pf0n 0dd3c90
Removed extra whitespace
pf0n ba3bee7
Merge branch 'master' of https://github.com/pf0n/jdk
pf0n b208281
Reverted changes on master branch that were pushed accidentally
pf0n 749ccb2
Merge remote-tracking branch 'origin/master' into test/shen-aggregate…
pf0n 17ab239
Merged master + Removed unnecessary test files
pf0n fbfe8b4
Whitespace error
pf0n af4f638
Merge branch 'openjdk:master' into master
pf0n 41cbb05
Merge remote-tracking branch 'origin/master' into test/shen-aggregate…
pf0n ee8a1eb
Fixed an inaccurate comment
pf0n 508d0f2
Fixed an inaccurate comment
pf0n 184144e
Merge branch 'test/shen-aggregate-closure' of https://github.com/pf0n…
pf0n 6cb5421
Merge branch 'test/shen-aggregate-closure' of https://github.com/pf0n…
pf0n 582da8e
Merge branch 'test/shen-aggregate-closure' of https://github.com/pf0n…
pf0n 242942b
Merge branch 'test/shen-aggregate-closure' of https://github.com/pf0n…
pf0n 296924f
Merge branch 'test/shen-aggregate-closure' of https://github.com/pf0n…
pf0n 1686fb3
8366122: Shenandoah: Implement efficient support for object count aft…
pf0n 87466a3
Compilation guards to reduce compile time for event
pf0n 855bd55
Merge branch '8366122/shen-object-count-after-gc' into test/shen-aggr…
pf0n 0ce22eb
Reverting changes back to original state for some files
pf0n 6023ee0
Merging master
pf0n 668fdae
Deleted objectCountEventSender.inline.hpp
pf0n 68e21c1
Comment on why return value was changed to bool
pf0n 4cd254f
Merge branch 'master' of https://github.com/openjdk/jdk into test/she…
pf0n 11ef54f
Renamed variables, better comment, included guard, removed mutex header
pf0n 2328362
Readded mutex
pf0n 8ce74f8
Testing to see if filtering objects work
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #ifndef SHARE_GC_SHARED_GCTRACE_INLINE_HPP | ||
| #define SHARE_GC_SHARED_GCTRACE_INLINE_HPP | ||
|
|
||
| #include "gc/shared/gcTrace.hpp" | ||
| #include "memory/heapInspection.hpp" | ||
| #include "utilities/macros.hpp" | ||
|
|
||
| #if INCLUDE_SERVICES | ||
| template <typename T> | ||
| void GCTracer::report_object_count() { | ||
| if (!ObjectCountEventSender::should_send_event()) { | ||
| return; | ||
| } | ||
|
|
||
| T* heap = T::heap(); | ||
| KlassInfoTable* cit = heap->get_cit(); | ||
|
|
||
| if (!cit->allocation_failed()) { | ||
| ObjectCountEventSenderClosure event_sender(cit->size_of_instances_in_words(), Ticks::now()); | ||
| cit->iterate(&event_sender); | ||
| } | ||
| } | ||
| #endif // INCLUDE_SERVICES | ||
|
|
||
| #endif // SHARE_GC_SHARED_GCTRACE_INLINE_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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
| */ | ||
|
|
||
|
|
||
|
|
||
| #include "gc/shared/objectCountEventSender.hpp" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See previous comment about template method definitions in a |
||
| #include "gc/shenandoah/shenandoahBarrierSet.hpp" | ||
| #include "gc/shenandoah/shenandoahClosures.inline.hpp" | ||
| #include "gc/shenandoah/shenandoahGeneration.hpp" | ||
|
|
@@ -69,9 +69,25 @@ void ShenandoahMark::mark_loop_prework(uint w, TaskTerminator *t, ShenandoahRefe | |
| Closure cl(q, rp, old_q); | ||
| mark_loop_work<Closure, GENERATION, CANCELLABLE, STRING_DEDUP>(&cl, ld, w, t, req); | ||
| } else { | ||
| using Closure = ShenandoahMarkRefsClosure<GENERATION>; | ||
| Closure cl(q, rp, old_q); | ||
| mark_loop_work<Closure, GENERATION, CANCELLABLE, STRING_DEDUP>(&cl, ld, w, t, req); | ||
| #if INCLUDE_JFR | ||
| // Use object counting closure if ObjectCount or ObjectCountAfterGC event is enabled. | ||
| const bool object_count_enabled = ObjectCountEventSender::should_send_event(); | ||
| if (object_count_enabled && !ShenandoahHeap::heap()->mode()->is_generational()) { | ||
| KlassInfoTable* const global_cit = ShenandoahHeap::heap()->get_cit(); | ||
| KlassInfoTable local_cit(false); | ||
| ShenandoahIsAliveClosure is_alive; | ||
| ShenandoahObjectCountClosure count(&local_cit, &is_alive); | ||
| using Closure = ShenandoahMarkRefsAndCountClosure<GENERATION>; | ||
| Closure cl(q, rp, old_q, &count); | ||
| mark_loop_work<Closure, GENERATION, CANCELLABLE, STRING_DEDUP>(&cl, ld, w, t, req); | ||
| count.merge_table(global_cit); | ||
| } else | ||
| #endif // INCLUDE_JFR | ||
| { | ||
| using Closure = ShenandoahMarkRefsClosure<GENERATION>; | ||
| Closure cl(q, rp, old_q); | ||
| mark_loop_work<Closure, GENERATION, CANCELLABLE, STRING_DEDUP>(&cl, ld, w, t, req); | ||
| } | ||
| } | ||
|
|
||
| heap->flush_liveness_cache(w); | ||
|
|
||
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.