8171960: Event-based tracing needs separate flag representation for Method
Reviewed-by: hseigel, gtriantafill, dholmes
This commit is contained in:
parent
09dee71ddd
commit
2bc33c2996
hotspot/src
jdk.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot
share/vm
@ -479,7 +479,6 @@ public class GraalHotSpotVMConfig extends HotSpotVMConfigAccess {
|
|||||||
public final int methodCompiledEntryOffset = getFieldOffset("Method::_from_compiled_entry", Integer.class, "address");
|
public final int methodCompiledEntryOffset = getFieldOffset("Method::_from_compiled_entry", Integer.class, "address");
|
||||||
public final int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, isJDK8 ? "nmethod*" : "CompiledMethod*");
|
public final int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, isJDK8 ? "nmethod*" : "CompiledMethod*");
|
||||||
|
|
||||||
public final int methodFlagsJfrTowrite = getConstant("Method::_jfr_towrite", Integer.class);
|
|
||||||
public final int methodFlagsCallerSensitive = getConstant("Method::_caller_sensitive", Integer.class);
|
public final int methodFlagsCallerSensitive = getConstant("Method::_caller_sensitive", Integer.class);
|
||||||
public final int methodFlagsForceInline = getConstant("Method::_force_inline", Integer.class);
|
public final int methodFlagsForceInline = getConstant("Method::_force_inline", Integer.class);
|
||||||
public final int methodFlagsDontInline = getConstant("Method::_dont_inline", Integer.class);
|
public final int methodFlagsDontInline = getConstant("Method::_dont_inline", Integer.class);
|
||||||
|
@ -535,7 +535,6 @@
|
|||||||
\
|
\
|
||||||
declare_constant(markOopDesc::no_hash) \
|
declare_constant(markOopDesc::no_hash) \
|
||||||
\
|
\
|
||||||
declare_constant(Method::_jfr_towrite) \
|
|
||||||
declare_constant(Method::_caller_sensitive) \
|
declare_constant(Method::_caller_sensitive) \
|
||||||
declare_constant(Method::_force_inline) \
|
declare_constant(Method::_force_inline) \
|
||||||
declare_constant(Method::_dont_inline) \
|
declare_constant(Method::_dont_inline) \
|
||||||
|
@ -85,7 +85,6 @@ Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
|
|||||||
set_constMethod(xconst);
|
set_constMethod(xconst);
|
||||||
set_access_flags(access_flags);
|
set_access_flags(access_flags);
|
||||||
set_intrinsic_id(vmIntrinsics::_none);
|
set_intrinsic_id(vmIntrinsics::_none);
|
||||||
set_jfr_towrite(false);
|
|
||||||
set_force_inline(false);
|
set_force_inline(false);
|
||||||
set_hidden(false);
|
set_hidden(false);
|
||||||
set_dont_inline(false);
|
set_dont_inline(false);
|
||||||
|
@ -75,18 +75,19 @@ class Method : public Metadata {
|
|||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
enum Flags {
|
enum Flags {
|
||||||
_jfr_towrite = 1 << 0,
|
_caller_sensitive = 1 << 0,
|
||||||
_caller_sensitive = 1 << 1,
|
_force_inline = 1 << 1,
|
||||||
_force_inline = 1 << 2,
|
_dont_inline = 1 << 2,
|
||||||
_dont_inline = 1 << 3,
|
_hidden = 1 << 3,
|
||||||
_hidden = 1 << 4,
|
_has_injected_profile = 1 << 4,
|
||||||
_has_injected_profile = 1 << 5,
|
_running_emcp = 1 << 5,
|
||||||
_running_emcp = 1 << 6,
|
_intrinsic_candidate = 1 << 6,
|
||||||
_intrinsic_candidate = 1 << 7,
|
_reserved_stack_access = 1 << 7
|
||||||
_reserved_stack_access = 1 << 8
|
|
||||||
};
|
};
|
||||||
mutable u2 _flags;
|
mutable u2 _flags;
|
||||||
|
|
||||||
|
TRACE_DEFINE_FLAG;
|
||||||
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging)
|
int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging)
|
||||||
#endif
|
#endif
|
||||||
@ -833,13 +834,6 @@ class Method : public Metadata {
|
|||||||
void init_intrinsic_id(); // updates from _none if a match
|
void init_intrinsic_id(); // updates from _none if a match
|
||||||
static vmSymbols::SID klass_id_for_intrinsics(const Klass* holder);
|
static vmSymbols::SID klass_id_for_intrinsics(const Klass* holder);
|
||||||
|
|
||||||
bool jfr_towrite() const {
|
|
||||||
return (_flags & _jfr_towrite) != 0;
|
|
||||||
}
|
|
||||||
void set_jfr_towrite(bool x) const {
|
|
||||||
_flags = x ? (_flags | _jfr_towrite) : (_flags & ~_jfr_towrite);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool caller_sensitive() {
|
bool caller_sensitive() {
|
||||||
return (_flags & _caller_sensitive) != 0;
|
return (_flags & _caller_sensitive) != 0;
|
||||||
}
|
}
|
||||||
@ -890,6 +884,8 @@ class Method : public Metadata {
|
|||||||
_flags = x ? (_flags | _reserved_stack_access) : (_flags & ~_reserved_stack_access);
|
_flags = x ? (_flags | _reserved_stack_access) : (_flags & ~_reserved_stack_access);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE_DEFINE_FLAG_ACCESSOR;
|
||||||
|
|
||||||
ConstMethod::MethodType method_type() const {
|
ConstMethod::MethodType method_type() const {
|
||||||
return _constMethod->method_type();
|
return _constMethod->method_type();
|
||||||
}
|
}
|
||||||
|
@ -2453,7 +2453,6 @@ typedef CompactHashtable<Symbol*, char> SymbolCompactHashTable;
|
|||||||
/* ConstMethod anon-enum */ \
|
/* ConstMethod anon-enum */ \
|
||||||
/********************************/ \
|
/********************************/ \
|
||||||
\
|
\
|
||||||
declare_constant(Method::_jfr_towrite) \
|
|
||||||
declare_constant(Method::_caller_sensitive) \
|
declare_constant(Method::_caller_sensitive) \
|
||||||
declare_constant(Method::_force_inline) \
|
declare_constant(Method::_force_inline) \
|
||||||
declare_constant(Method::_dont_inline) \
|
declare_constant(Method::_dont_inline) \
|
||||||
|
@ -55,6 +55,8 @@ extern "C" void JNICALL trace_register_natives(JNIEnv*, jclass);
|
|||||||
#define TRACE_DEFINE_THREAD_ID_SIZE typedef int ___IGNORED_hs_trace_type6
|
#define TRACE_DEFINE_THREAD_ID_SIZE typedef int ___IGNORED_hs_trace_type6
|
||||||
#define TRACE_DEFINE_THREAD_DATA_WRITER_OFFSET typedef int ___IGNORED_hs_trace_type7
|
#define TRACE_DEFINE_THREAD_DATA_WRITER_OFFSET typedef int ___IGNORED_hs_trace_type7
|
||||||
#define TRACE_THREAD_DATA_WRITER_OFFSET in_ByteSize(0); ShouldNotReachHere()
|
#define TRACE_THREAD_DATA_WRITER_OFFSET in_ByteSize(0); ShouldNotReachHere()
|
||||||
|
#define TRACE_DEFINE_FLAG typedef int ___IGNORED_hs_trace_type8
|
||||||
|
#define TRACE_DEFINE_FLAG_ACCESSOR typedef int ___IGNORED_hs_trace_type9
|
||||||
#define TRACE_TEMPLATES(template)
|
#define TRACE_TEMPLATES(template)
|
||||||
#define TRACE_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)
|
#define TRACE_INTRINSICS(do_intrinsic, do_class, do_name, do_signature, do_alias)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user