Description
Upon uncommon_trap, JVMCI runtime appends a FailedSpeculation entry to the nmethod using an atomic operation. It becomes a performance bottleneck when there is a large amount of (virtual) threads deoptimizing in the nmethod. Instead, we should test if a FailedSpeculation exists in the list before appending it.