< prev index next >

src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp

Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com


  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");


< prev index next >