Lines Matching refs:pwr

365 	struct power_event *pwr = zalloc(sizeof(*pwr));  in c_state_end()  local
367 if (!pwr) in c_state_end()
370 pwr->state = cpus_cstate_state[cpu]; in c_state_end()
371 pwr->start_time = cpus_cstate_start_times[cpu]; in c_state_end()
372 pwr->end_time = timestamp; in c_state_end()
373 pwr->cpu = cpu; in c_state_end()
374 pwr->type = CSTATE; in c_state_end()
375 pwr->next = tchart->power_events; in c_state_end()
377 tchart->power_events = pwr; in c_state_end()
383 struct power_event *pwr = zalloc(sizeof(*pwr)); in p_state_end() local
385 if (!pwr) in p_state_end()
388 pwr->state = cpus_pstate_state[cpu]; in p_state_end()
389 pwr->start_time = cpus_pstate_start_times[cpu]; in p_state_end()
390 pwr->end_time = timestamp; in p_state_end()
391 pwr->cpu = cpu; in p_state_end()
392 pwr->type = PSTATE; in p_state_end()
393 pwr->next = tchart->power_events; in p_state_end()
394 if (!pwr->start_time) in p_state_end()
395 pwr->start_time = tchart->first_time; in p_state_end()
397 tchart->power_events = pwr; in p_state_end()
398 return pwr; in p_state_end()
403 struct power_event *pwr; in p_state_change() local
408 pwr = p_state_end(tchart, cpu, timestamp); in p_state_change()
409 if (!pwr) in p_state_change()
701 struct power_event *pwr; in end_sample_processing() local
706 pwr = zalloc(sizeof(*pwr)); in end_sample_processing()
707 if (!pwr) in end_sample_processing()
710 pwr->state = cpus_cstate_state[cpu]; in end_sample_processing()
711 pwr->start_time = cpus_cstate_start_times[cpu]; in end_sample_processing()
712 pwr->end_time = tchart->last_time; in end_sample_processing()
713 pwr->cpu = cpu; in end_sample_processing()
714 pwr->type = CSTATE; in end_sample_processing()
715 pwr->next = tchart->power_events; in end_sample_processing()
717 tchart->power_events = pwr; in end_sample_processing()
721 pwr = p_state_end(tchart, cpu, tchart->last_time); in end_sample_processing()
722 if (!pwr) in end_sample_processing()
725 if (!pwr->state) in end_sample_processing()
726 pwr->state = tchart->min_freq; in end_sample_processing()
1021 struct power_event *pwr; in draw_c_p_states() local
1022 pwr = tchart->power_events; in draw_c_p_states()
1027 while (pwr) { in draw_c_p_states()
1028 if (pwr->type == CSTATE) in draw_c_p_states()
1029 svg_cstate(pwr->cpu, pwr->start_time, pwr->end_time, pwr->state); in draw_c_p_states()
1030 pwr = pwr->next; in draw_c_p_states()
1033 pwr = tchart->power_events; in draw_c_p_states()
1034 while (pwr) { in draw_c_p_states()
1035 if (pwr->type == PSTATE) { in draw_c_p_states()
1036 if (!pwr->state) in draw_c_p_states()
1037 pwr->state = tchart->min_freq; in draw_c_p_states()
1038 svg_pstate(pwr->cpu, pwr->start_time, pwr->end_time, pwr->state); in draw_c_p_states()
1040 pwr = pwr->next; in draw_c_p_states()