Adding basic profiler sampling support and restored the --profiler script option