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

RFE: ParallelScavenge needs NoResourceMarkVerifier guards

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Not an Issue
    • P4
    • tbd
    • 5.0
    • hotspot
    • None
    • gc
    • sparc
    • solaris_8

    Description

      The ParallelScavenge collector uses GCTasks to partition work amoung various
      worker threads. GCTasks are resource objects, which are not explicitly
      released.

      Typical use allocates GCTasks inline, like this:

      q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::object_synchronizer));
      q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::flat_profiler));
      q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::management));
      q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::system_dictionary));
      q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::jvmti));

      However, there are some cases where we create tasks by calling out
      to another ojbect:

      // We scan the thread roots in parallel
      Threads::create_thread_roots_tasks(q);

      It is possible that the methods invoked might either contain or in
      the future contain a ResourceMark. This would be a bad thing :-).

      I believe we should add a NoResourceMarkVerifier object before creating
      the various task objects in the vm thread, to make sure that we catch
      any problems before they happen.

      The meaty part of this bug is that at first inspection, I could not
      find a NoResourceMarkVerifier class, one may need to be written.
      ###@###.### 2004-12-09 21:17:51 GMT

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jmcilreesunw James Mcilree (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: