Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb6b8931 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf newt: Remove useless column width calculation



Not used in the TUI interface.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <new-submission>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4af8b35d
Loading
Loading
Loading
Loading
+0 −20
Original line number Original line Diff line number Diff line
@@ -390,11 +390,8 @@ static void perf_session__selection(newtComponent self, void *data)
int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists,
int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists,
			       u64 session_total, const char *helpline)
			       u64 session_total, const char *helpline)
{
{
	struct sort_entry *se;
	struct rb_node *nd;
	struct rb_node *nd;
	char seq[] = ".";
	char seq[] = ".";
	unsigned int width;
	char *col_width = symbol_conf.col_width_list_str;
	int rows, cols, idx;
	int rows, cols, idx;
	int max_len = 0;
	int max_len = 0;
	char str[1024];
	char str[1024];
@@ -423,23 +420,6 @@ int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists,


	newtComponentAddCallback(tree, perf_session__selection, &selection);
	newtComponentAddCallback(tree, perf_session__selection, &selection);


	list_for_each_entry(se, &hist_entry__sort_list, list) {
		if (se->elide)
			continue;
		width = strlen(se->header);
		if (se->width) {
			if (symbol_conf.col_width_list_str) {
				if (col_width) {
					*se->width = atoi(col_width);
					col_width = strchr(col_width, ',');
					if (col_width)
						++col_width;
				}
			}
			*se->width = max(*se->width, width);
		}
	}

	idx = 0;
	idx = 0;
	for (nd = rb_first(hists); nd; nd = rb_next(nd)) {
	for (nd = rb_first(hists); nd; nd = rb_next(nd)) {
		struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);
		struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node);