Merge changes 1344,1345 into donut

* changes:
  Fix the tracing code that keeps track of the Java method stack.
  Add a "-d time" option to stack_dump to dump the stack at the given time.