mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8373122: JFR build failure with CDS disabled due to -Werror=unused-function after JDK-8365400
Reviewed-by: mgronlun, jiefu, fandreuzzi
This commit is contained in:
parent
a0094f529a
commit
e1d81c0946
@ -125,20 +125,6 @@ static traceid get_source(const InstanceKlass* ik, JavaThread* jt) {
|
|||||||
return source_id;
|
return source_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
static traceid get_source(const AOTClassLocation* cl, JavaThread* jt) {
|
|
||||||
assert(cl != nullptr, "invariant");
|
|
||||||
assert(!cl->is_modules_image(), "invariant");
|
|
||||||
const char* const path = cl->path();
|
|
||||||
assert(path != nullptr, "invariant");
|
|
||||||
size_t len = strlen(path);
|
|
||||||
const char* file_type = cl->file_type_string();
|
|
||||||
assert(file_type != nullptr, "invariant");
|
|
||||||
len += strlen(file_type) + 3; // ":/" + null
|
|
||||||
char* const url = NEW_RESOURCE_ARRAY_IN_THREAD(jt, char, len);
|
|
||||||
jio_snprintf(url, len, "%s%s%s", file_type, ":/", path);
|
|
||||||
return JfrSymbolTable::add(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void send_event(const InstanceKlass* ik, traceid source_id) {
|
static inline void send_event(const InstanceKlass* ik, traceid source_id) {
|
||||||
EventClassDefine event;
|
EventClassDefine event;
|
||||||
event.set_definedClass(ik);
|
event.set_definedClass(ik);
|
||||||
@ -172,6 +158,20 @@ void JfrClassDefineEvent::on_creation(const InstanceKlass* ik, const ClassFilePa
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if INCLUDE_CDS
|
#if INCLUDE_CDS
|
||||||
|
static traceid get_source(const AOTClassLocation* cl, JavaThread* jt) {
|
||||||
|
assert(cl != nullptr, "invariant");
|
||||||
|
assert(!cl->is_modules_image(), "invariant");
|
||||||
|
const char* const path = cl->path();
|
||||||
|
assert(path != nullptr, "invariant");
|
||||||
|
size_t len = strlen(path);
|
||||||
|
const char* file_type = cl->file_type_string();
|
||||||
|
assert(file_type != nullptr, "invariant");
|
||||||
|
len += strlen(file_type) + 3; // ":/" + null
|
||||||
|
char* const url = NEW_RESOURCE_ARRAY_IN_THREAD(jt, char, len);
|
||||||
|
jio_snprintf(url, len, "%s%s%s", file_type, ":/", path);
|
||||||
|
return JfrSymbolTable::add(url);
|
||||||
|
}
|
||||||
|
|
||||||
void JfrClassDefineEvent::on_restoration(const InstanceKlass* ik, JavaThread* jt) {
|
void JfrClassDefineEvent::on_restoration(const InstanceKlass* ik, JavaThread* jt) {
|
||||||
assert(ik != nullptr, "invariant");
|
assert(ik != nullptr, "invariant");
|
||||||
assert(ik->trace_id() != 0, "invariant");
|
assert(ik->trace_id() != 0, "invariant");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user