Lines Matching refs:pwr
353 struct power_event *pwr = zalloc(sizeof(*pwr)); in c_state_end() local
355 if (!pwr) in c_state_end()
358 pwr->state = cpus_cstate_state[cpu]; in c_state_end()
359 pwr->start_time = cpus_cstate_start_times[cpu]; in c_state_end()
360 pwr->end_time = timestamp; in c_state_end()
361 pwr->cpu = cpu; in c_state_end()
362 pwr->type = CSTATE; in c_state_end()
363 pwr->next = power_events; in c_state_end()
365 power_events = pwr; in c_state_end()
370 struct power_event *pwr; in p_state_change() local
375 pwr = zalloc(sizeof(*pwr)); in p_state_change()
376 if (!pwr) in p_state_change()
379 pwr->state = cpus_pstate_state[cpu]; in p_state_change()
380 pwr->start_time = cpus_pstate_start_times[cpu]; in p_state_change()
381 pwr->end_time = timestamp; in p_state_change()
382 pwr->cpu = cpu; in p_state_change()
383 pwr->type = PSTATE; in p_state_change()
384 pwr->next = power_events; in p_state_change()
386 if (!pwr->start_time) in p_state_change()
387 pwr->start_time = first_time; in p_state_change()
389 power_events = pwr; in p_state_change()
573 struct power_event *pwr; in end_sample_processing() local
578 pwr = zalloc(sizeof(*pwr)); in end_sample_processing()
579 if (!pwr) in end_sample_processing()
582 pwr->state = cpus_cstate_state[cpu]; in end_sample_processing()
583 pwr->start_time = cpus_cstate_start_times[cpu]; in end_sample_processing()
584 pwr->end_time = last_time; in end_sample_processing()
585 pwr->cpu = cpu; in end_sample_processing()
586 pwr->type = CSTATE; in end_sample_processing()
587 pwr->next = power_events; in end_sample_processing()
589 power_events = pwr; in end_sample_processing()
593 pwr = zalloc(sizeof(*pwr)); in end_sample_processing()
594 if (!pwr) in end_sample_processing()
597 pwr->state = cpus_pstate_state[cpu]; in end_sample_processing()
598 pwr->start_time = cpus_pstate_start_times[cpu]; in end_sample_processing()
599 pwr->end_time = last_time; in end_sample_processing()
600 pwr->cpu = cpu; in end_sample_processing()
601 pwr->type = PSTATE; in end_sample_processing()
602 pwr->next = power_events; in end_sample_processing()
604 if (!pwr->start_time) in end_sample_processing()
605 pwr->start_time = first_time; in end_sample_processing()
606 if (!pwr->state) in end_sample_processing()
607 pwr->state = min_freq; in end_sample_processing()
608 power_events = pwr; in end_sample_processing()
663 struct power_event *pwr; in draw_c_p_states() local
664 pwr = power_events; in draw_c_p_states()
669 while (pwr) { in draw_c_p_states()
670 if (pwr->type == CSTATE) in draw_c_p_states()
671 svg_cstate(pwr->cpu, pwr->start_time, pwr->end_time, pwr->state); in draw_c_p_states()
672 pwr = pwr->next; in draw_c_p_states()
675 pwr = power_events; in draw_c_p_states()
676 while (pwr) { in draw_c_p_states()
677 if (pwr->type == PSTATE) { in draw_c_p_states()
678 if (!pwr->state) in draw_c_p_states()
679 pwr->state = min_freq; in draw_c_p_states()
680 svg_pstate(pwr->cpu, pwr->start_time, pwr->end_time, pwr->state); in draw_c_p_states()
682 pwr = pwr->next; in draw_c_p_states()