obtaining heap prof output by looking for NewSpace instead of Heap

- adding sample to demonstrate generating heap profile and histogram
  from it