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

Thread context switch (scheduling) event in the JDWP/JDI

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • 10
    • 6
    • core-svc
    • x86
    • linux

      A DESCRIPTION OF THE REQUEST :
      Support for an event in the JDWP/JDI (esp. JDI) to report when the JVM changes the running thread, e.g. executes a context switch.

      JUSTIFICATION :
      Being able to precisely observe the scheduling behavior of threads in the program is extremely useful to a variety of program analysis techniques that try to verify correctness properties of programs or prove the absence of concurrency errors and error patterns.

      Currently the only way would be to have unlimited step requests on every thread to detect when step events switch threads, which is basically just insane and would never work because of overhead.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      An event that reports that the JVM has switched the running thread. The only necessary payload would be the newly running thread reference.
      ACTUAL -
      There is currently no way to reliably determine when thread context switches actually occur. It can only be inferred at coarse granularity from other events.

            Unassigned Unassigned
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: