Skip to content
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

8257967: JFR: Events for loaded agents #12923

Closed
wants to merge 22 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/hotspot/share/prims/jvmtiAgentList.cpp
Original file line number Diff line number Diff line change
@@ -66,10 +66,12 @@ static inline JvmtiAgent* head(JvmtiAgent** list) {
}


// The storage list is a single cas-linked-list, to allow for concurrent iterations. Especially during initial loading of agents,
// there exist an order requirement to iterate oldest -> newest. Our concurrent storage linked-list is newest -> oldest.
// The storage list is a single cas-linked-list, to allow for concurrent iterations.
// Especially during initial loading of agents, there exist an order requirement to iterate oldest -> newest.
// Our concurrent storage linked-list is newest -> oldest.
// The correct order is preserved by the iterator, by storing a filtered set of entries in a stack.
JvmtiAgentList::Iterator::Iterator(JvmtiAgent** list, Filter filter) : _stack(new GrowableArrayCHeap<JvmtiAgent*, mtServiceability>(16)), _filter(filter) {
JvmtiAgentList::Iterator::Iterator(JvmtiAgent** list, Filter filter) :
_stack(new GrowableArrayCHeap<JvmtiAgent*, mtServiceability>(16)), _filter(filter) {
JvmtiAgent* next = head(list);
while (next != nullptr) {
next = select(next);