int os_preop_switch2ll(cmd_t *cmd, boolean_t *smpl) { *smpl = B_FALSE; if (!perf_ll_started()) { perf_allstop(); if (perf_ll_start(0) != 0) { return (-1); } *smpl = B_TRUE; } return (0); }
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(); } }
int os_ll_smpl(perf_ctl_t *ctl, perf_task_t *task, int *intval_ms) { if (!perf_ll_started()) { return (-1); } proc_enum_update(0); proc_ll_clear(0); if (ll_smpl(ctl, (task_ll_t *)(task), intval_ms) != 0) { perf_status_set(PERF_STATUS_LL_FAILED); disp_ll_data_fail(); return (-1); } disp_ll_data_ready(*intval_ms); return (0); }
/* * The implementation of displaying window on screen for * window type "WIN_TYPE_LAT_PROC" and "WIN_TYPE_LAT_LWP" */ boolean_t os_lat_win_draw(dyn_win_t *win) { dyn_lat_t *dyn = (dyn_lat_t *)(win->dyn); track_proc_t *proc; boolean_t note_out, ret; if (!perf_ll_started()) { win_warn_msg(WARN_LL_NOT_SUPPORT); win_note_show(NOTE_LAT); return (B_FALSE); } if ((proc = proc_find(dyn->pid)) == NULL) { win_warn_msg(WARN_INVALID_PID); win_note_show(NOTE_INVALID_PID); return (B_FALSE); } if (map_proc_load(proc) != 0) { proc_refcount_dec(proc); win_warn_msg(WARN_INVALID_MAP); win_note_show(NOTE_INVALID_MAP); return (B_FALSE); } win_title_show(); ret = win_lat_data_show(proc, dyn, ¬e_out); if (!note_out) { win_note_show(NOTE_LAT); } proc_refcount_dec(proc); reg_update_all(); return (ret); }