View | Details | Raw Unified | Return to bug 18597 | Differences between
and this patch

Collapse All | Expand All

(-)a/runtime/stat-common.c (-2 / +2 lines)
Lines 261-270 static void _stp_stat_print_histogram_buf(char *buf, size_t size, Hist st, Link Here
261
				val_prefix = "<";
261
				val_prefix = "<";
262
			} else if (i == st->buckets-1) {
262
			} else if (i == st->buckets-1) {
263
				/* overflow */
263
				/* overflow */
264
				val = st->start + (i - 2) * st->interval;
264
				val = st->start + (int64_t)(i - 2) * st->interval;
265
				val_prefix = ">";
265
				val_prefix = ">";
266
			} else
266
			} else
267
				val = st->start + (i - 1) * st->interval;
267
				val = st->start + (int64_t)(i - 1) * st->interval;
268
		} else
268
		} else
269
			val = _stp_bucket_to_val(i);
269
			val = _stp_bucket_to_val(i);
270
270
(-)a/runtime/stat.c (-1 / +3 lines)
Lines 71-78 static Stat _stp_stat_init (int type, ...) Link Here
71
			interval = va_arg(ap, int);
71
			interval = va_arg(ap, int);
72
72
73
			buckets = _stp_stat_calc_buckets(stop, start, interval);
73
			buckets = _stp_stat_calc_buckets(stop, start, interval);
74
			if (!buckets)
74
			if (!buckets) {
75
				va_end (ap);
75
				return NULL;
76
				return NULL;
77
			}
76
		}
78
		}
77
		va_end (ap);
79
		va_end (ap);
78
	}
80
	}

Return to bug 18597