pass profiling to execute_switch in subshell