mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8005849: JEP 167: Event-Based JVM Tracing
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com> Co-authored-by: Bengt Rutisson <bengt.rutisson@oracle.com> Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com> Co-authored-by: Erik Gahlin <erik.gahlin@oracle.com> Co-authored-by: Erik Helin <erik.helin@oracle.com> Co-authored-by: Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com> Co-authored-by: Keith McGuigan <keith.mcguigan@oracle.com> Co-authored-by: Mattias Tobiasson <mattias.tobiasson@oracle.com> Co-authored-by: Markus Gronlund <markus.gronlund@oracle.com> Co-authored-by: Mikael Auno <mikael.auno@oracle.com> Co-authored-by: Nils Eliasson <nils.eliasson@oracle.com> Co-authored-by: Nils Loodin <nils.loodin@oracle.com> Co-authored-by: Rickard Backman <rickard.backman@oracle.com> Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com> Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com> Reviewed-by: acorn, coleenp, sla
This commit is contained in:
parent
6b2c468c35
commit
718f3252f6
195 changed files with 7628 additions and 1484 deletions
|
@ -32,6 +32,10 @@
|
|||
#include "runtime/mutex.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
|
||||
#if INCLUDE_TRACE
|
||||
# include "trace/traceTime.hpp"
|
||||
#endif
|
||||
|
||||
//
|
||||
// A class loader represents a linkset. Conceptually, a linkset identifies
|
||||
// the complete transitive closure of resolved links that a dynamic linker can
|
||||
|
@ -49,6 +53,7 @@ class ClassLoaderData;
|
|||
class JNIMethodBlock;
|
||||
class JNIHandleBlock;
|
||||
class Metadebug;
|
||||
|
||||
// GC root for walking class loader data created
|
||||
|
||||
class ClassLoaderDataGraph : public AllStatic {
|
||||
|
@ -63,6 +68,7 @@ class ClassLoaderDataGraph : public AllStatic {
|
|||
static ClassLoaderData* _saved_head;
|
||||
|
||||
static ClassLoaderData* add(Handle class_loader, bool anonymous, TRAPS);
|
||||
static void post_class_unload_events(void);
|
||||
public:
|
||||
static ClassLoaderData* find_or_create(Handle class_loader, TRAPS);
|
||||
static void purge();
|
||||
|
@ -71,6 +77,8 @@ class ClassLoaderDataGraph : public AllStatic {
|
|||
static void always_strong_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
|
||||
static void keep_alive_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
|
||||
static void classes_do(KlassClosure* klass_closure);
|
||||
static void classes_do(void f(Klass* const));
|
||||
static void classes_unloading_do(void f(Klass* const));
|
||||
static bool do_unloading(BoolObjectClosure* is_alive);
|
||||
|
||||
// CMS support.
|
||||
|
@ -86,6 +94,12 @@ class ClassLoaderDataGraph : public AllStatic {
|
|||
static bool contains(address x);
|
||||
static bool contains_loader_data(ClassLoaderData* loader_data);
|
||||
#endif
|
||||
|
||||
#if INCLUDE_TRACE
|
||||
private:
|
||||
static TracingTime _class_unload_time;
|
||||
static void class_unload_event(Klass* const k);
|
||||
#endif
|
||||
};
|
||||
|
||||
// ClassLoaderData class
|
||||
|
@ -171,7 +185,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
|
|||
void unload();
|
||||
bool keep_alive() const { return _keep_alive; }
|
||||
bool is_alive(BoolObjectClosure* is_alive_closure) const;
|
||||
|
||||
void classes_do(void f(Klass*));
|
||||
void classes_do(void f(InstanceKlass*));
|
||||
|
||||
// Deallocate free list during class unloading.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue