Lines Matching refs:pwr
355 struct power_event *pwr = zalloc(sizeof(*pwr)); in c_state_end() local
357 if (!pwr) in c_state_end()
360 pwr->state = cpus_cstate_state[cpu]; in c_state_end()
361 pwr->start_time = cpus_cstate_start_times[cpu]; in c_state_end()
362 pwr->end_time = timestamp; in c_state_end()
363 pwr->cpu = cpu; in c_state_end()
364 pwr->type = CSTATE; in c_state_end()
365 pwr->next = tchart->power_events; in c_state_end()
367 tchart->power_events = pwr; in c_state_end()
372 struct power_event *pwr; in p_state_change() local
377 pwr = zalloc(sizeof(*pwr)); in p_state_change()
378 if (!pwr) in p_state_change()
381 pwr->state = cpus_pstate_state[cpu]; in p_state_change()
382 pwr->start_time = cpus_pstate_start_times[cpu]; in p_state_change()
383 pwr->end_time = timestamp; in p_state_change()
384 pwr->cpu = cpu; in p_state_change()
385 pwr->type = PSTATE; in p_state_change()
386 pwr->next = tchart->power_events; in p_state_change()
388 if (!pwr->start_time) in p_state_change()
389 pwr->start_time = tchart->first_time; in p_state_change()
391 tchart->power_events = pwr; in p_state_change()
679 struct power_event *pwr; in end_sample_processing() local
684 pwr = zalloc(sizeof(*pwr)); in end_sample_processing()
685 if (!pwr) in end_sample_processing()
688 pwr->state = cpus_cstate_state[cpu]; in end_sample_processing()
689 pwr->start_time = cpus_cstate_start_times[cpu]; in end_sample_processing()
690 pwr->end_time = tchart->last_time; in end_sample_processing()
691 pwr->cpu = cpu; in end_sample_processing()
692 pwr->type = CSTATE; in end_sample_processing()
693 pwr->next = tchart->power_events; in end_sample_processing()
695 tchart->power_events = pwr; in end_sample_processing()
699 pwr = zalloc(sizeof(*pwr)); in end_sample_processing()
700 if (!pwr) in end_sample_processing()
703 pwr->state = cpus_pstate_state[cpu]; in end_sample_processing()
704 pwr->start_time = cpus_pstate_start_times[cpu]; in end_sample_processing()
705 pwr->end_time = tchart->last_time; in end_sample_processing()
706 pwr->cpu = cpu; in end_sample_processing()
707 pwr->type = PSTATE; in end_sample_processing()
708 pwr->next = tchart->power_events; in end_sample_processing()
710 if (!pwr->start_time) in end_sample_processing()
711 pwr->start_time = tchart->first_time; in end_sample_processing()
712 if (!pwr->state) in end_sample_processing()
713 pwr->state = tchart->min_freq; in end_sample_processing()
714 tchart->power_events = pwr; in end_sample_processing()
1012 struct power_event *pwr; in draw_c_p_states() local
1013 pwr = tchart->power_events; in draw_c_p_states()
1018 while (pwr) { in draw_c_p_states()
1019 if (pwr->type == CSTATE) in draw_c_p_states()
1020 svg_cstate(pwr->cpu, pwr->start_time, pwr->end_time, pwr->state); in draw_c_p_states()
1021 pwr = pwr->next; in draw_c_p_states()
1024 pwr = tchart->power_events; in draw_c_p_states()
1025 while (pwr) { in draw_c_p_states()
1026 if (pwr->type == PSTATE) { in draw_c_p_states()
1027 if (!pwr->state) in draw_c_p_states()
1028 pwr->state = tchart->min_freq; in draw_c_p_states()
1029 svg_pstate(pwr->cpu, pwr->start_time, pwr->end_time, pwr->state); in draw_c_p_states()
1031 pwr = pwr->next; in draw_c_p_states()