97 if (METHOD_FLAG_NOT_USED_THIS_EPOCH(method)) {
98 SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass);
99 SET_METHOD_FLAG_USED_THIS_EPOCH(method);
100 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant");
101 assert(METHOD_FLAG_USED_THIS_EPOCH(method), "invariant");
102 JfrTraceIdEpoch::set_changed_tag_state();
103 }
104 return (METHOD_ID(klass, method));
105 }
106
107 inline traceid JfrTraceId::use(const ModuleEntry* module) {
108 return set_used_and_get(module);
109 }
110
111 inline traceid JfrTraceId::use(const PackageEntry* package) {
112 return set_used_and_get(package);
113 }
114
115 inline traceid JfrTraceId::use(const ClassLoaderData* cld) {
116 assert(cld != NULL, "invariant");
117 return cld->is_unsafe_anonymous() ? 0 : set_used_and_get(cld);
118 }
119
120 inline void JfrTraceId::set_leakp(const Klass* klass, const Method* method) {
121 assert(klass != NULL, "invariant");
122 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant");
123 assert(method != NULL, "invariant");
124 assert(klass == method->method_holder(), "invariant");
125 if (METHOD_FLAG_NOT_USED_THIS_EPOCH(method)) {
126 // the method is already logically tagged, just like the klass,
127 // but because of redefinition, the latest Method*
128 // representation might not have a reified tag.
129 SET_METHOD_FLAG_USED_THIS_EPOCH(method);
130 assert(METHOD_FLAG_USED_THIS_EPOCH(method), "invariant");
131 }
132 SET_LEAKP(klass);
133 SET_METHOD_LEAKP(method);
134 }
135
136 inline bool JfrTraceId::in_visible_set(const Klass* klass) {
137 assert(klass != NULL, "invariant");
|
97 if (METHOD_FLAG_NOT_USED_THIS_EPOCH(method)) {
98 SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass);
99 SET_METHOD_FLAG_USED_THIS_EPOCH(method);
100 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant");
101 assert(METHOD_FLAG_USED_THIS_EPOCH(method), "invariant");
102 JfrTraceIdEpoch::set_changed_tag_state();
103 }
104 return (METHOD_ID(klass, method));
105 }
106
107 inline traceid JfrTraceId::use(const ModuleEntry* module) {
108 return set_used_and_get(module);
109 }
110
111 inline traceid JfrTraceId::use(const PackageEntry* package) {
112 return set_used_and_get(package);
113 }
114
115 inline traceid JfrTraceId::use(const ClassLoaderData* cld) {
116 assert(cld != NULL, "invariant");
117 return cld->has_class_mirror_holder() ? 0 : set_used_and_get(cld);
118 }
119
120 inline void JfrTraceId::set_leakp(const Klass* klass, const Method* method) {
121 assert(klass != NULL, "invariant");
122 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant");
123 assert(method != NULL, "invariant");
124 assert(klass == method->method_holder(), "invariant");
125 if (METHOD_FLAG_NOT_USED_THIS_EPOCH(method)) {
126 // the method is already logically tagged, just like the klass,
127 // but because of redefinition, the latest Method*
128 // representation might not have a reified tag.
129 SET_METHOD_FLAG_USED_THIS_EPOCH(method);
130 assert(METHOD_FLAG_USED_THIS_EPOCH(method), "invariant");
131 }
132 SET_LEAKP(klass);
133 SET_METHOD_LEAKP(method);
134 }
135
136 inline bool JfrTraceId::in_visible_set(const Klass* klass) {
137 assert(klass != NULL, "invariant");
|