integrated the new profiler, with optional trigger