equal
deleted
inserted
replaced
26 #define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEID_INLINE_HPP |
26 #define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEID_INLINE_HPP |
27 |
27 |
28 #include "classfile/classLoaderData.hpp" |
28 #include "classfile/classLoaderData.hpp" |
29 #include "classfile/moduleEntry.hpp" |
29 #include "classfile/moduleEntry.hpp" |
30 #include "classfile/packageEntry.hpp" |
30 #include "classfile/packageEntry.hpp" |
|
31 #include "jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" |
|
32 #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp" |
31 #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdMacros.hpp" |
33 #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdMacros.hpp" |
32 #include "jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp" |
|
33 #include "oops/arrayKlass.hpp" |
34 #include "oops/arrayKlass.hpp" |
34 #include "oops/klass.hpp" |
35 #include "oops/klass.hpp" |
35 #include "oops/instanceKlass.hpp" |
36 #include "oops/instanceKlass.hpp" |
36 #include "oops/method.hpp" |
37 #include "oops/method.hpp" |
37 #include "runtime/thread.inline.hpp" |
38 #include "runtime/thread.inline.hpp" |
55 return TRACE_ID_RAW(t->jfr_thread_local()); |
56 return TRACE_ID_RAW(t->jfr_thread_local()); |
56 } |
57 } |
57 |
58 |
58 inline traceid JfrTraceId::use(const Klass* klass) { |
59 inline traceid JfrTraceId::use(const Klass* klass) { |
59 assert(klass != NULL, "invariant"); |
60 assert(klass != NULL, "invariant"); |
60 return set_used_and_get(klass); |
61 const traceid id = set_used_and_get(klass); |
|
62 if (IS_NOT_SERIALIZED(klass)) { |
|
63 JfrTraceIdEpoch::set_klass_tagged_in_epoch(); |
|
64 } |
|
65 return id; |
61 } |
66 } |
62 |
67 |
63 inline traceid JfrTraceId::use(const Method* method) { |
68 inline traceid JfrTraceId::use(const Method* method) { |
64 assert(method != NULL, "invariant"); |
69 assert(method != NULL, "invariant"); |
65 return use(method->method_holder(), method); |
70 return use(method->method_holder(), method); |
69 assert(klass != NULL, "invariant"); |
74 assert(klass != NULL, "invariant"); |
70 assert(method != NULL, "invariant"); |
75 assert(method != NULL, "invariant"); |
71 SET_METHOD_FLAG_USED_THIS_EPOCH(method); |
76 SET_METHOD_FLAG_USED_THIS_EPOCH(method); |
72 SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass); |
77 SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass); |
73 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant"); |
78 assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant"); |
|
79 if (IS_NOT_SERIALIZED(klass)) { |
|
80 JfrTraceIdEpoch::set_klass_tagged_in_epoch(); |
|
81 } |
74 return (METHOD_ID(klass, method)); |
82 return (METHOD_ID(klass, method)); |
75 } |
83 } |
76 |
84 |
77 inline traceid JfrTraceId::use(const ModuleEntry* module) { |
85 inline traceid JfrTraceId::use(const ModuleEntry* module) { |
78 assert(module != NULL, "invariant"); |
86 assert(module != NULL, "invariant"); |