]> Gentwo Git Trees - linux/.git/commit
perf annotate: Simplify width calculation in annotation_line__write()
authorNamhyung Kim <namhyung@kernel.org>
Sat, 16 Aug 2025 03:16:28 +0000 (20:16 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 28 Aug 2025 15:32:47 +0000 (12:32 -0300)
commit7736a6fba05837d178caa3c0ced55da77377a7e6
tree3b5d89f8cda9d2bfff4055ff4ceffddb31e1a908
parentd94d5eb54f9cf21411ad18fa2c7b6082437aa6c5
perf annotate: Simplify width calculation in annotation_line__write()

The width is updated after each part is printed.  It can skip the output
processing if the total printed size is bigger than the width.

No function changes intended.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250816031635.25318-6-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c