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

Commit 52225036 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo
Browse files

perf hists: Move sort__need_collapse into struct perf_hpp_list



Now we have sort dimensions private for struct hists, we need to make
dimension booleans hists specific as well.

Moving sort__need_collapse into struct perf_hpp_list.

Adding hists__has macro to easily access this info perf struct hists
object.

Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1462276488-26683-2-git-send-email-jolsa@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4679bcca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -428,7 +428,7 @@ static void hists__baseline_only(struct hists *hists)
	struct rb_root *root;
	struct rb_node *next;

	if (sort__need_collapse)
	if (hists__has(hists, need_collapse))
		root = &hists->entries_collapsed;
	else
		root = hists->entries_in;
@@ -450,7 +450,7 @@ static void hists__precompute(struct hists *hists)
	struct rb_root *root;
	struct rb_node *next;

	if (sort__need_collapse)
	if (hists__has(hists, need_collapse))
		root = &hists->entries_collapsed;
	else
		root = hists->entries_in;
+1 −1
Original line number Diff line number Diff line
@@ -936,7 +936,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
			goto error;
		}

		sort__need_collapse = true;
		perf_hpp_list.need_collapse = true;
	}

	/* Force tty output for header output and per-thread stat. */
+1 −1
Original line number Diff line number Diff line
@@ -1255,7 +1255,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)

	sort__mode = SORT_MODE__TOP;
	/* display thread wants entries to be collapsed in a different tree */
	sort__need_collapse = 1;
	perf_hpp_list.need_collapse = 1;

	if (top.use_stdio)
		use_browser = 0;
+1 −1
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ void print_hists_in(struct hists *hists)
	struct rb_root *root;
	struct rb_node *node;

	if (sort__need_collapse)
	if (hists__has(hists, need_collapse))
		root = &hists->entries_collapsed;
	else
		root = hists->entries_in;
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ static void del_hist_entries(struct hists *hists)
	struct rb_root *root_out;
	struct rb_node *node;

	if (sort__need_collapse)
	if (hists__has(hists, need_collapse))
		root_in = &hists->entries_collapsed;
	else
		root_in = hists->entries_in;
Loading