Lines Matching refs:P

1896 } P = { 0 };  variable
1936 t->time = ((c - P.f.first_tsc) << 10) / opt.cpu_qhz; in cycles_to_time()
1942 if(ac > P.f.first_tsc) { in abs_cycles_to_time()
1946 t->time = ((ac - P.f.first_tsc) << 10) / opt.cpu_qhz; in abs_cycles_to_time()
1955 if(ac > P.f.first_tsc) in abs_cycles_to_global()
1956 return ac - P.f.first_tsc; in abs_cycles_to_global()
2205 return __summary_percent(s, &P.f); in summary_percent_global()
2404 abs_cycles_to_time(P.interval.start_tsc, &t); in interval_time_output()
2415 for(i=0; i<P.interval.array.count; i++) { in interval_table_output()
2416 struct interval_element *e = P.interval.array.values[i]; in interval_table_output()
2425 for(p = P.interval.list.head; p; p = p->next) in interval_table_output()
2436 for(p=P.interval.list.head; p; p = p->next) in interval_table_tail()
2443 P.interval.array.count = count; in interval_table_alloc()
2444 P.interval.array.values = malloc(count * sizeof(struct interval_list *)); in interval_table_alloc()
2446 if(!P.interval.array.values) { in interval_table_alloc()
2451 bzero(P.interval.array.values, count*sizeof(struct interval_list *)); in interval_table_alloc()
2471 if(P.interval.list.head) in interval_list_add()
2472 *P.interval.list.tail = p; in interval_list_add()
2474 P.interval.list.head = p; in interval_list_add()
2475 P.interval.list.tail = &p->next; in interval_list_add()
2498 if(P.interval.array.values[i]) { in interval_cr3_value_check()
2506 P.interval.array.values[i] = &cr3->total_time.interval; in interval_cr3_value_check()
2516 P.interval.cr3 = cr3; in interval_cr3_value_check()
2544 for(p=P.cr3.head; p; p=p->gnext) in interval_cr3_schedule_ordered_output()
2552 for(i=0, p=P.cr3.head; p; p=p->gnext, i++) in interval_cr3_schedule_ordered_output()
2568 (p->first_time > P.interval.start_tsc)?'*':' '); in interval_cr3_schedule_ordered_output()
2589 if(P.interval.cr3) { in interval_cr3_short_summary_output()
2590 struct cr3_value_struct *p = P.interval.cr3; in interval_cr3_short_summary_output()
2616 if(P.interval.array.values[i]) { in interval_domain_value_check()
2622 P.interval.array.values[i] = &d->total_time.interval; in interval_domain_value_check()
2631 P.interval.domain.d = d; in interval_domain_value_check()
2646 if(P.interval.domain.d) { in interval_domain_short_summary_output()
2650 d=P.interval.domain.d; in interval_domain_short_summary_output()
2669 if(P.interval.domain.guest_vector[i] == 0) { in interval_domain_guest_interrupt()
2670 P.interval.domain.guest_vector[i] = vector; in interval_domain_guest_interrupt()
2673 if(P.interval.domain.guest_vector[i] == vector) in interval_domain_guest_interrupt()
2691 if(P.interval.domain.guest_vector[i] == 0) in interval_domain_guest_interrupt_tail()
2693 printf(" %d", P.interval.domain.guest_vector[i]); in interval_domain_guest_interrupt_tail()
2700 if(P.interval.domain.d) { in interval_domain_guest_interrupt_output()
2704 d=P.interval.domain.d; in interval_domain_guest_interrupt_output()
2709 int v = P.interval.domain.guest_vector[i]; in interval_domain_guest_interrupt_output()
2726 if(P.interval.domain.d) { in interval_domain_grant_maps_output()
2729 d=P.interval.domain.d; in interval_domain_grant_maps_output()
3454 o->first_tsc = P.now; in ipi_send()
3834 scatterplot_vs_time(h->exit_tsc, P.now - h->exit_tsc); in hvm_io_read_postprocess()
3889 unsigned long long now = P.now; in cr3_switch()
3924 p->cr3_id = P.cr3.id; in cr3_switch()
3931 if(P.cr3.head) in cr3_switch()
3932 *P.cr3.tail = p; in cr3_switch()
3934 P.cr3.head = p; in cr3_switch()
3935 P.cr3.tail = &p->gnext; in cr3_switch()
3937 P.cr3.id++; in cr3_switch()
4980 struct pcpu_info * p = P.pcpu + i; in runstate_update()
7123 p2 = P.pcpu + last_oldstate.pid; in sched_runstate_process()
7143 for ( i=0; i<=P.max_active_pcpu; i++) in sched_runstate_process()
7145 struct pcpu_info *p = P.pcpu + i; in sched_runstate_process()
7248 if(P.lost_cpus && v->d->did != IDLE_DOMAIN) { in sched_runstate_process()
7251 __func__, P.lost_cpus, v->d->did, v->vid); in sched_runstate_process()
7372 update_cycles(&v->cpu_affinity_all, P.f.last_tsc - v->pcpu_tsc); in sched_summary_vcpu()
7373 update_cycles(&v->cpu_affinity_pcpu[v->p->pid], P.f.last_tsc - v->pcpu_tsc); in sched_summary_vcpu()
8836 P.lost_cpus++; in process_lost_records()
8837 if(P.lost_cpus > P.max_active_pcpu + 1) { in process_lost_records()
8839 P.lost_cpus, P.max_active_pcpu + 1); in process_lost_records()
8933 P.lost_cpus--; in process_lost_records_end()
8934 if(P.lost_cpus < 0) { in process_lost_records_end()
8977 P.early_eof = 1; in activate_early_eof()
8979 for(i=0; i<=P.max_active_pcpu; i++) { in activate_early_eof()
8980 p = P.pcpu + i; in activate_early_eof()
8981 if(p->active && p->file_offset > P.last_epoch_offset) { in activate_early_eof()
9017 if(cd->cpu > P.max_active_pcpu || !P.pcpu[cd->cpu].active) { in scan_for_new_pcpu()
9018 struct pcpu_info *p = P.pcpu + cd->cpu; in scan_for_new_pcpu()
9038 if ( cd->cpu > P.max_active_pcpu ) in scan_for_new_pcpu()
9039 P.max_active_pcpu = cd->cpu; in scan_for_new_pcpu()
9088 if ( p->pid == P.max_active_pcpu ) in deactivate_pcpu()
9091 for(i=0; i<=P.max_active_pcpu; i++) in deactivate_pcpu()
9093 if(!P.pcpu[i].active) in deactivate_pcpu()
9098 P.max_active_pcpu = max_active_pcpu; in deactivate_pcpu()
9109 if(ri->tsc && ri->tsc >= P.f.first_tsc) { in process_record_tsc()
9114 if(P.f.first_tsc == 0) { in process_record_tsc()
9115 P.f.first_tsc = tsc; in process_record_tsc()
9117 P.interval.start_tsc = tsc; in process_record_tsc()
9121 if(P.interval.start_tsc > tsc) { in process_record_tsc()
9123 tsc, P.interval.start_tsc); in process_record_tsc()
9126 while ( tsc - P.interval.start_tsc > opt.interval.cycles ) { in process_record_tsc()
9128 P.interval.start_tsc += opt.interval.cycles; in process_record_tsc()
9134 P.f.last_tsc=tsc; in process_record_tsc()
9136 P.f.total_cycles = P.f.last_tsc - P.f.first_tsc; in process_record_tsc()
9138 P.now = tsc; in process_record_tsc()
9239 && (p->file_offset > P.last_epoch_offset)) { in process_cpu_change()
9240 P.last_epoch_offset = p->file_offset; in process_cpu_change()
9244 if(!P.pcpu[r->cpu].active && P.pcpu[r->cpu].file_offset == 0) in process_cpu_change()
9246 struct pcpu_info * p2 = P.pcpu + r->cpu; in process_cpu_change()
9249 if(r->cpu > P.max_active_pcpu) in process_cpu_change()
9250 P.max_active_pcpu = r->cpu; in process_cpu_change()
9278 } else if(P.early_eof && p->file_offset > P.last_epoch_offset) { in process_cpu_change()
9280 __func__, p->pid, (unsigned long long)P.last_epoch_offset); in process_cpu_change()
9311 if(P.buffer_trace_virq_tsc) in process_cpu_change()
9313 cycles = ri->tsc - P.buffer_trace_virq_tsc; in process_cpu_change()
9317 P.buffer_trace_virq_tsc = 0; in process_cpu_change()
9339 else if(p->pid == P.max_active_pcpu) in process_cpu_change()
9713 assert(P.max_active_pcpu < MAX_CPUS); in pcpu_string()
9714 assert(pcpu <= P.max_active_pcpu); in pcpu_string()
9717 pcpu_string_draw(P.pcpu+last_pcpu); in pcpu_string()
9719 if(P.max_active_pcpu > max_active_pcpu) in pcpu_string()
9722 for(i=max_active_pcpu + 1; i<= P.max_active_pcpu; i++) in pcpu_string()
9723 pcpu_string_draw(P.pcpu+i); in pcpu_string()
9724 max_active_pcpu=P.max_active_pcpu; in pcpu_string()
9831 assert(min_p || (P.max_active_pcpu==-1)); in choose_next_record()
9931 ((double)(P.f.total_cycles))/opt.cpu_hz, in summary()
9936 struct pcpu_info *p = P.pcpu+i; in summary()
9950 struct pcpu_info *p = P.pcpu+i; in report_pcpu()
9972 P.pcpu[i].pid=i; in init_pcpus()
9973 P.pcpu[i].lost_record.seen_valid_schedule=1; in init_pcpus()
9974 P.pcpu[i].power_state=CSTATE_INVALID; in init_pcpus()
9977 P.max_active_pcpu = -1; in init_pcpus()