mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8226409: Enable argument profiling for sun.misc.Unsafe.put*/get*
Reviewed-by: kvn
This commit is contained in:
parent
d6dd171ece
commit
eb2818421a
2 changed files with 9 additions and 5 deletions
|
@ -1607,11 +1607,14 @@ bool MethodData::profile_jsr292(const methodHandle& m, int bci) {
|
|||
|
||||
bool MethodData::profile_unsafe(const methodHandle& m, int bci) {
|
||||
Bytecode_invoke inv(m , bci);
|
||||
if (inv.is_invokevirtual() && inv.klass() == vmSymbols::jdk_internal_misc_Unsafe()) {
|
||||
ResourceMark rm;
|
||||
char* name = inv.name()->as_C_string();
|
||||
if (!strncmp(name, "get", 3) || !strncmp(name, "put", 3)) {
|
||||
return true;
|
||||
if (inv.is_invokevirtual()) {
|
||||
if (inv.klass() == vmSymbols::jdk_internal_misc_Unsafe() ||
|
||||
inv.klass() == vmSymbols::sun_misc_Unsafe()) {
|
||||
ResourceMark rm;
|
||||
char* name = inv.name()->as_C_string();
|
||||
if (!strncmp(name, "get", 3) || !strncmp(name, "put", 3)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue