Skip to content

Mutator transition states should not be counted as part of mutator time #1330

@k-sareen

Description

@k-sareen

Recently I was delving deep into a weird result for instructions retired when using stress factor wherein the mutator instructions was increasing proportional to the number of GCs due to stress factor.

Turns out there are two reasons for this:

  1. All code from requesting a GC to block_for_gc until the ScheduleCollection work packet is executed is considered to be part of mutator time (or time.other)
  2. GC time is considered to be just before we call resume_mutators, so the work undertaken to wake up and resume mutators is considered to be part of the mutator time.

This means that the instructions retired for the actual mutator work were not actually changing, but it was counting the extra work you need to do to facilitate the triggering of a GC. @steveblackburn and I think there needs to be a third counter for these "transition" states since they are neither real mutator work not real GC/STW work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions