Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8349753

Incorrect use of CodeBlob::is_buffer_blob() in few places

XMLWordPrintable

    • 23
    • b11

        While working on JDK-8349088 I realized that `CodeBlob::is_buffer_blob()` is incorrectly used in few places because BufferBlob is not "leaf" class. All other `is_*()` methods are fine because they correspond to "leaf" subclasses.

        The method is mostly used for prints and statistic. Like in `CodeBlob::dump_for_addr()` and `CodeCache::print_internals()`.

        The only problematic place is in `CodeBlobCollector::do_blob()` where `if (cb->is_buffer_blob() && strcmp(cb->name(), "vtable chunks") == 0)` should be replaces with `(cb->is_vtable_blob())`.
        That code works anyway because `CodeBlobCollector::do_vtable_stub()` is called first and `CodeBlobCollector::do_blob()` skips blobs which are already recorded.

              kvn Vladimir Kozlov
              kvn Vladimir Kozlov
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: