8241718: assert ((klass)->trace_id()) & ((JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits()))) != 0 in ObjectSampleCheckpoint::add_to_leakp_set
Reviewed-by: dholmes, iklam, ccheung
This commit is contained in:
parent
2f09989ec0
commit
6715f2306e
@ -761,6 +761,7 @@ int write__method(JfrCheckpointWriter* writer, const void* m) {
|
||||
int write__method__leakp(JfrCheckpointWriter* writer, const void* m) {
|
||||
assert(m != NULL, "invariant");
|
||||
MethodPtr method = (MethodPtr)m;
|
||||
CLEAR_LEAKP_METHOD(method);
|
||||
return write_method(writer, method, true);
|
||||
}
|
||||
|
||||
|
@ -170,6 +170,13 @@ void JfrTraceId::remove(const Klass* k) {
|
||||
k->set_trace_id(EVENT_KLASS_MASK(k));
|
||||
}
|
||||
|
||||
// used by CDS / APPCDS as part of "remove_unshareable_info"
|
||||
void JfrTraceId::remove(const Method* method) {
|
||||
assert(method != NULL, "invariant");
|
||||
// Clear all bits.
|
||||
method->set_trace_flags(0);
|
||||
}
|
||||
|
||||
// used by CDS / APPCDS as part of "restore_unshareable_info"
|
||||
void JfrTraceId::restore(const Klass* k) {
|
||||
assert(k != NULL, "invariant");
|
||||
|
@ -106,6 +106,7 @@ class JfrTraceId : public AllStatic {
|
||||
static traceid load_raw(const ClassLoaderData* cld);
|
||||
|
||||
static void remove(const Klass* klass);
|
||||
static void remove(const Method* method);
|
||||
static void restore(const Klass* klass);
|
||||
|
||||
// set of event classes made visible to java
|
||||
|
@ -145,6 +145,7 @@
|
||||
#define CLEAR_SERIALIZED_METHOD(method) (METHOD_META_MASK_CLEAR(method, META_MASK))
|
||||
#define SET_PREVIOUS_EPOCH_METHOD_CLEARED_BIT(ptr) (METHOD_META_TAG(ptr, PREVIOUS_EPOCH_BIT))
|
||||
#define CLEAR_LEAKP(ptr) (TRACE_ID_META_MASK_CLEAR(ptr, (~(LEAKP_META_BIT))))
|
||||
#define CLEAR_LEAKP_METHOD(method) (METHOD_META_MASK_CLEAR(method, (~(LEAKP_META_BIT))))
|
||||
#define CLEAR_THIS_EPOCH_CLEARED_BIT(ptr) (TRACE_ID_META_MASK_CLEAR(ptr,(~(THIS_EPOCH_BIT))))
|
||||
#define CLEAR_THIS_EPOCH_METHOD_CLEARED_BIT(ptr) (METHOD_META_MASK_CLEAR(ptr,(~(THIS_EPOCH_BIT))))
|
||||
#define IS_THIS_EPOCH_METHOD_CLEARED(ptr) (METHOD_FLAG_PREDICATE(method, THIS_EPOCH_BIT))
|
||||
|
@ -172,8 +172,8 @@ static void log_jdk_jfr_module_resolution_error(TRAPS) {
|
||||
}
|
||||
|
||||
static bool is_cds_dump_requested() {
|
||||
// we will not be able to launch recordings if a cds dump is being requested
|
||||
if (Arguments::is_dumping_archive() && (JfrOptionSet::start_flight_recording_options() != NULL)) {
|
||||
// we will not be able to launch recordings on startup if a cds dump is being requested
|
||||
if (Arguments::is_dumping_archive()) {
|
||||
warning("JFR will be disabled during CDS dumping");
|
||||
teardown_startup_support();
|
||||
return true;
|
||||
@ -213,7 +213,7 @@ bool JfrRecorder::on_create_vm_2() {
|
||||
|
||||
bool JfrRecorder::on_create_vm_3() {
|
||||
assert(JvmtiEnvBase::get_phase() == JVMTI_PHASE_LIVE, "invalid init sequence");
|
||||
return launch_command_line_recordings(Thread::current());
|
||||
return Arguments::is_dumping_archive() || launch_command_line_recordings(Thread::current());
|
||||
}
|
||||
|
||||
static bool _created = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2020, 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
|
||||
@ -40,6 +40,7 @@
|
||||
|
||||
#define INIT_ID(data) JfrTraceId::assign(data)
|
||||
#define REMOVE_ID(k) JfrTraceId::remove(k);
|
||||
#define REMOVE_METHOD_ID(method) JfrTraceId::remove(method);
|
||||
#define RESTORE_ID(k) JfrTraceId::restore(k);
|
||||
|
||||
class JfrTraceFlag {
|
||||
|
@ -357,6 +357,7 @@ void Method::metaspace_pointers_do(MetaspaceClosure* it) {
|
||||
|
||||
void Method::remove_unshareable_info() {
|
||||
unlink_method();
|
||||
JFR_ONLY(REMOVE_METHOD_ID(this);)
|
||||
}
|
||||
|
||||
void Method::set_vtable_index(int index) {
|
||||
|
Loading…
Reference in New Issue
Block a user