void os_allstop(void) { if (perf_profiling_started()) { profiling_stop(); } if (perf_ll_started()) { ll_stop(); } if (perf_pqos_cmt_started()) { proc_pqos_func(NULL, os_pqos_cmt_proc_free); } if (perf_uncore_started()) { uncore_stop_all(); } }
/* ARGSUSED */ int os_preop_switch2profiling(cmd_t *cmd, boolean_t *smpl) { *smpl = B_FALSE; if (!perf_profiling_started()) { perf_allstop(); if (perf_profiling_start() != 0) { return (-1); } *smpl = B_TRUE; } if (perf_pqos_cmt_started()) { perf_pqos_cmt_stop(0, 0); *smpl = B_TRUE; } return (0); }