This commit is contained in:
Jesper Wilhelmsson 2020-12-17 03:04:19 +00:00
commit 11bd7a814f
41 changed files with 852 additions and 223 deletions

View file

@ -1601,6 +1601,18 @@ bool MethodData::profile_unsafe(const methodHandle& m, int bci) {
return false;
}
bool MethodData::profile_memory_access(const methodHandle& m, int bci) {
Bytecode_invoke inv(m , bci);
if (inv.is_invokestatic()) {
if (inv.klass() == vmSymbols::jdk_incubator_foreign_MemoryAccess()) {
if (inv.name()->starts_with("get") || inv.name()->starts_with("set")) {
return true;
}
}
}
return false;
}
int MethodData::profile_arguments_flag() {
return TypeProfileLevel % 10;
}
@ -1630,6 +1642,10 @@ bool MethodData::profile_arguments_for_invoke(const methodHandle& m, int bci) {
return true;
}
if (profile_memory_access(m, bci)) {
return true;
}
assert(profile_arguments_jsr292_only(), "inconsistent");
return profile_jsr292(m, bci);
}