During review of JDK-8329332 changes there were few suggestions which can be done separately to not complicate already big JDK-8329332.
- Renaming:
CompiledMethod_lock -> NMethod_lock
NMethodIterator::all_blobs -> NMethodIterator::all
- Move get_deopt_original_pc() method from `nmethod` to `frame` class
- CodeCache::find_blob() and CodeCache::find_nmethod() should be consistence in returning nullptr and consider adding _or_null() variants.
- Use `for (CodeHeap* heap : *_nmethod_heaps) ` in `CodeCache::nmethod_count()`.