< prev index next >
src/share/vm/classfile/classLoaderData.hpp
Print this page
rev 8910 : full patch for jfr
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -33,10 +33,11 @@
#include "utilities/growableArray.hpp"
#include "utilities/macros.hpp"
#if INCLUDE_TRACE
#include "utilities/ticks.hpp"
#endif
+#include "jfr/utilities/jfrLog.hpp"
//
// A class loader represents a linkset. Conceptually, a linkset identifies
// the complete transitive closure of resolved links that a dynamic linker can
// produce.
@@ -80,10 +81,11 @@
static void oops_do(OopClosure* f, KlassClosure* klass_closure, bool must_claim);
static void keep_alive_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
static void always_strong_oops_do(OopClosure* blk, KlassClosure* klass_closure, bool must_claim);
// cld do
static void cld_do(CLDClosure* cl);
+ static void cld_unloading_do(CLDClosure* cl);
static void roots_cld_do(CLDClosure* strong, CLDClosure* weak);
static void keep_alive_cld_do(CLDClosure* cl);
static void always_strong_cld_do(CLDClosure* cl);
// klass do
static void classes_do(KlassClosure* klass_closure);
@@ -126,10 +128,12 @@
// ClassLoaderData class
class ClassLoaderData : public CHeapObj<mtClass> {
friend class VMStructs;
+ friend class CLDClaimContext;
+ friend class CLDClaimStateClosure;
private:
class Dependencies VALUE_OBJ_CLASS_SPEC {
objArrayOop _list_head;
void locked_add(objArrayHandle last,
objArrayHandle new_dependency,
@@ -211,10 +215,12 @@
// ReadOnly and ReadWrite metaspaces (static because only on the null
// class loader for now).
static Metaspace* _ro_metaspace;
static Metaspace* _rw_metaspace;
+ TRACE_DEFINE_TRACE_ID_FIELD;
+
void set_next(ClassLoaderData* next) { _next = next; }
ClassLoaderData* next() const { return _next; }
ClassLoaderData(Handle h_class_loader, bool is_anonymous, Dependencies dependencies);
~ClassLoaderData();
@@ -323,10 +329,12 @@
// CDS support
Metaspace* ro_metaspace();
Metaspace* rw_metaspace();
void initialize_shared_metaspaces();
+
+ TRACE_DEFINE_TRACE_ID_METHODS;
};
// An iterator that distributes Klasses to parallel worker threads.
class ClassLoaderDataGraphKlassIteratorAtomic : public StackObj {
Klass* volatile _next_klass;
< prev index next >