def stop_cpu_idle(self, event): try: tc = self.tmp_c_states[event.cpuid] except: self.ensure_cpu_allocated(event.cpuid) tc = self.tmp_c_states[event.cpuid] if len(tc['start_ts'])>len(tc['end_ts']): name = colors.get_colorname_by_id(tc['types'][-1]) tc['end_ts'].append(event.timestamp) process = self.generic_find_process(0,"cpu%d/%s"%(event.cpuid,name),"cpuidle") self.generic_process_end(process,event, build_p_stack=False)
def get_comment(self,i): return colors.get_colorname_by_id(self.types[i])[len("rpm_"):]