support for stack trees and initial support for profiling