public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf script: Add missed "+" if br_cntr reaches upper limit
@ 2026-04-10 19:39 Thomas Falcon
  2026-04-10 19:40 ` [PATCH 2/2] perf/annotate: Fix missing branch counter column in TUI mode Thomas Falcon
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Falcon @ 2026-04-10 19:39 UTC (permalink / raw)
  To: linux-perf-users
  Cc: linux-kernel, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
	James Clark, Dapeng Mi

From: Dapeng Mi <dapeng1.mi@linux.intel.com>

Add missed "+" if br_cntr reaches upper limit.

Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
---
 tools/perf/builtin-script.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index c8ac9f01a36b..f865c8b2f95f 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -1287,8 +1287,12 @@ static int ip__fprintf_jump(uint64_t ip, struct branch_entry *en,
 			if (!verbose) {
 				for (j = 0; j < num; j++)
 					printed += fprintf(fp, "%s", pos->abbr_name);
-			} else
-				printed += fprintf(fp, "%s %d ", pos->name, num);
+				if (num == mask)
+					printed += fprintf(fp, "+");
+			} else {
+				printed += fprintf(fp, "%s %d%s", pos->name,
+						   num, num == mask ? "+ " : " ");
+			}
 		}
 		if (numprinted == 0 && !verbose)
 			printed += fprintf(fp, "-");
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-10 20:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 19:39 [PATCH 1/2] perf script: Add missed "+" if br_cntr reaches upper limit Thomas Falcon
2026-04-10 19:40 ` [PATCH 2/2] perf/annotate: Fix missing branch counter column in TUI mode Thomas Falcon
2026-04-10 20:01   ` sashiko-bot
2026-04-10 20:05     ` Falcon, Thomas
2026-04-10 20:19   ` [PATCH v2 " Thomas Falcon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox