--- old/src/share/vm/classfile/classLoaderData.hpp 2019-01-28 17:43:23.000000000 +0800 +++ new/src/share/vm/classfile/classLoaderData.hpp 2019-01-28 17:43:23.000000000 +0800 @@ -1,5 +1,5 @@ /* - * 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 @@ -35,6 +35,7 @@ #if INCLUDE_TRACE #include "utilities/ticks.hpp" #endif +#include "jfr/utilities/jfrLog.hpp" // // A class loader represents a linkset. Conceptually, a linkset identifies @@ -82,6 +83,7 @@ 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); @@ -128,6 +130,8 @@ class ClassLoaderData : public CHeapObj { friend class VMStructs; + friend class CLDClaimContext; + friend class CLDClaimStateClosure; private: class Dependencies VALUE_OBJ_CLASS_SPEC { objArrayOop _list_head; @@ -213,6 +217,8 @@ 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; } @@ -325,6 +331,8 @@ Metaspace* ro_metaspace(); Metaspace* rw_metaspace(); void initialize_shared_metaspaces(); + + TRACE_DEFINE_TRACE_ID_METHODS; }; // An iterator that distributes Klasses to parallel worker threads.