Home | History | Annotate | Download | only in strace

Lines Matching refs:counts

241 static struct call_counts *counts;
2255 if (counts == NULL) {
2256 counts = calloc(sizeof *counts, nsyscalls);
2257 if (counts == NULL) {
2259 strace: out of memory for call counts\n");
2264 counts[tcp->scno].calls++;
2266 counts[tcp->scno].errors++;
2295 tv_add(&counts[tcp->scno].time,
2296 &counts[tcp->scno].time, &tv);
2628 return -tv_cmp(&counts[*((int *) a)].time, &counts[*((int *) b)].time);
2645 int m = counts[*((int *) a)].calls, n = counts[*((int *) b)].calls;
2698 if (counts == NULL || counts[i].calls == 0)
2700 tv_mul(&dtv, &overhead, counts[i].calls);
2701 tv_sub(&counts[i].time, &counts[i].time, &dtv);
2702 call_cum += counts[i].calls;
2703 error_cum += counts[i].errors;
2704 tv_add(&tv_cum, &tv_cum, &counts[i].time);
2706 if (counts && sortfun)
2713 if (counts) {
2716 if (counts[j].calls == 0)
2718 tv_div(&dtv, &counts[j].time, counts[j].calls);
2719 if (counts[j].errors)
2720 sprintf(error_str, "%d", counts[j].errors);
2723 percent = (100.0 * tv_float(&counts[j].time)
2726 percent, (long) counts[j].time.tv_sec,
2727 (long) counts[j].time.tv_usec,
2729 counts[j].calls,