1
1
/*
2
- * Copyright (c) 2020, 2023 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2020, 2024 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -101,13 +101,12 @@ void JfrKlassUnloading::clear() {
101
101
}
102
102
}
103
103
104
- static bool add_to_unloaded_klass_set (traceid klass_id, bool current_epoch ) {
104
+ static void add_to_unloaded_klass_set (traceid klass_id) {
105
105
assert_locked_or_safepoint (ClassLoaderDataGraph_lock);
106
- GrowableArray<traceid>* const unload_set = current_epoch ? get_unload_set () : get_unload_set_previous_epoch ();
106
+ GrowableArray<traceid>* const unload_set = get_unload_set ();
107
107
assert (unload_set != nullptr , " invariant" );
108
108
assert (unload_set->find (klass_id) == -1 , " invariant" );
109
109
unload_set->append (klass_id);
110
- return true ;
111
110
}
112
111
113
112
#if INCLUDE_MANAGEMENT
@@ -129,7 +128,8 @@ bool JfrKlassUnloading::on_unload(const Klass* k) {
129
128
if (IS_JDK_JFR_EVENT_SUBKLASS (k)) {
130
129
++event_klass_unloaded_count;
131
130
}
132
- return USED_ANY_EPOCH (k) && add_to_unloaded_klass_set (JfrTraceId::load_raw (k), USED_THIS_EPOCH (k));
131
+ add_to_unloaded_klass_set (JfrTraceId::load_raw (k));
132
+ return USED_THIS_EPOCH (k);
133
133
}
134
134
135
135
bool JfrKlassUnloading::is_unloaded (traceid klass_id, bool previous_epoch /* false */ ) {
0 commit comments