Merge change 7773

* changes:
  Polish JIT trace profiling and fix a unchaining bug when profiling is enabled.