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

FlexibleWorkGang initializes _active_workers to more than _total_workers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • gc
    • b68

        This is the FlexibleWorkGang constructor:

          FlexibleWorkGang(const char* name, uint workers,
                           bool are_GC_task_threads,
                           bool are_ConcurrentGC_threads) :
            WorkGang(name, workers, are_GC_task_threads, are_ConcurrentGC_threads),
            _active_workers(UseDynamicNumberOfGCThreads ? 1U : ParallelGCThreads) {}

        and the WorkGang constructor:
        WorkGang::WorkGang(const char* name,
                           uint workers,
                           bool are_GC_task_threads,
                           bool are_ConcurrentGC_threads) :
          AbstractWorkGang(name, are_GC_task_threads, are_ConcurrentGC_threads) {
          _total_workers = workers;
        }

        If 'workers' are less than ParallelGCThreads, then _active_workers will be set to a value that is greater than _total_workers (unless we run with UseDynamicNumberOfGCThreads). Both G1 and CMS typically sets the number of concurrent workers to a value below ParallelGCThreads.

        This is currently a benign bug, since the GCs will later calculate a new value for _active_workers that will never be higher than _total_workers.

        However, this bug impedes stricter asserts and should be fixed.

              stefank Stefan Karlsson
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: