Lines Matching refs:pp
33 struct plat_info *pp; in plat_alloc() local
37 pp = malloc(sizeof(*pp)); in plat_alloc()
38 pp->nl = 0; in plat_alloc()
39 pp->first_ts = pp->last_ts = pp->tl = -1.0; in plat_alloc()
43 if ((pp->fp = my_fopen(oname, "w")) == NULL) { in plat_alloc()
47 add_file(pp->fp, oname); in plat_alloc()
49 return pp; in plat_alloc()
54 struct plat_info *pp = info; in plat_free() local
56 if (pp == NULL) return; in plat_free()
58 if (pp->first_ts != -1.0) { in plat_free()
59 double delta = pp->last_ts - pp->first_ts; in plat_free()
61 fprintf(pp->fp, "%lf %lf\n", in plat_free()
62 pp->first_ts + (delta / 2), pp->tl / pp->nl); in plat_free()
71 struct plat_info *pp = info; in plat_x2c() local
73 if (pp == NULL) return; in plat_x2c()
75 if (pp->first_ts == -1.0) { in plat_x2c()
76 pp->first_ts = pp->last_ts = now; in plat_x2c()
77 pp->nl = 1; in plat_x2c()
78 pp->tl = lat; in plat_x2c()
79 } else if ((now - pp->first_ts) >= plat_freq) { in plat_x2c()
80 double delta = pp->last_ts - pp->first_ts; in plat_x2c()
82 fprintf(pp->fp, "%lf %lf\n", in plat_x2c()
83 pp->first_ts + (delta / 2), pp->tl / pp->nl); in plat_x2c()
85 pp->first_ts = pp->last_ts = now; in plat_x2c()
86 pp->nl = 1; in plat_x2c()
87 pp->tl = lat; in plat_x2c()
89 pp->last_ts = now; in plat_x2c()
90 pp->nl += 1; in plat_x2c()
91 pp->tl += lat; in plat_x2c()