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

WhiteBox testing of pd_get_top_frame_for_profiling

XMLWordPrintable

      pd_get_top_frame_for_profiling can examine a thread at arbitrary points. Some arbitrary points are more interesting than others. Currently we rely on things like unpredictable thread scheduling and test crashes to find these points, but it takes a long time, and the set of failure points we find is just a random sample, not the complete set.

      I suggest we add WhiteBox testing to deterministically test interesting code, starting with CodeBlobs. We can insert special instructions that generate SIGSEGV or SIGILL at strategic places (for example where the stack pointer is being adjusted). Then in the signal handler, call pd_get_top_frame_for_profiling, patch the instruction with a nop, and continue.

            Unassigned Unassigned
            dlong Dean Long
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: