Thread (15 messages) 15 messages, 2 authors, 2017-04-20

Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

From: Jin, Yao <hidden>
Date: 2017-04-20 00:37:15
Also in: lkml


On 4/19/2017 10:15 PM, Jiri Olsa wrote:
On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote:

SNIP
quoted
+static int branch_type_str(struct branch_type_stat *stat,
+			   char *bf, int bfsize)
+{
+	int i, j = 0, printed = 0;
+	u64 total = 0;
+
+	for (i = 0; i < PERF_BR_MAX; i++)
+		total += stat->counts[i];
+
+	if (total == 0)
+		return 0;
+
+	if (stat->jcc_fwd > 0)
+		printed += count_str_printf(j++, "JCC forward",
+				bf + printed, bfsize - printed);
+
+	if (stat->jcc_bwd > 0)
+		printed += count_str_printf(j++, "JCC backward",
+				bf + printed, bfsize - printed);
please move that multiline conditional code inside {} brackets

thanks,
jirka
Thanks so much for all of your review comments. I will add the fix to v6.

Thanks
Jin Yao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help