RVM
  1. RVM
  2. RVM-901

Producing edge counter profiles in a profiled build fails with an NPE

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.4
    • Component/s: Compiler: Baseline
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When using

      -X:base:profile_edge_counter_file=x.ec
      and -X:base:profile_edge_counters=true
      and -X:aos:final_report_level=2

      in a profiled build (bin/buildit -p) to dump edge counter profiles for replay compilation, JikesRVM fails with an NPE

      Exception in thread "MainThread" java.lang.NullPointerException
      at org.jikesrvm.compilers.baseline.BranchProfiles.<init>(BranchProfiles.java:74)
      at org.jikesrvm.compilers.baseline.EdgeCounts.dumpCounts(EdgeCounts.java:121)
      at org.jikesrvm.compilers.baseline.EdgeCounts.dumpCounts(EdgeCounts.java:101)
      at org.jikesrvm.adaptive.controller.Controller.report(Controller.java:255)
      at org.jikesrvm.adaptive.controller.Controller.notifyExit(Controller.java:191)
      at org.jikesrvm.Callbacks.notifyExit(Callbacks.java:800)
      at org.jikesrvm.VM.sysExit(VM.java:2335)
      at java.lang.VMRuntime.exit(VMRuntime.java:79)
      at java.lang.Runtime.halt(Runtime.java:399)
      at java.lang.Runtime.exit(Runtime.java:174)
      at java.lang.System.exit(System.java:577)
      at Harness.main(Harness.java:6)

      The code in EdgeCounts.dumpCounts assumes that if there is a profile entry in slot i of the edge counter data array, then method i can be resolved. In a profiled build, my guess is that some of these entries are left over from the counters used to guide compilation of the boot image, and so this assumption is false.

        Activity

        Hide
        Robin Garner added a comment -

        Triaged in r16018. A proper fix would drop the edge counters loaded during profiling (or reuse them).

        Show
        Robin Garner added a comment - Triaged in r16018. A proper fix would drop the edge counters loaded during profiling (or reuse them).
        Hide
        David Grove added a comment -

        bulk defer issues to 3.1.4

        Show
        David Grove added a comment - bulk defer issues to 3.1.4

          People

          • Assignee:
            Unassigned
            Reporter:
            Robin Garner
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: