Correctly generating heap dumps for OOP tests

Not trying to dump the test process :)

Still using Debug.dumpHprofData for inproc because
using shell command for inproc can deadlock.

Test: manual
Bug: 177065099
Change-Id: I4b581954a01ecc8a1427409baa030aaa3b70d6b5
1 file changed