Added support for profiling.