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

Commit 40184c46 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Pass evlist to setup_sorting()



This is a preparation to support dynamic sort keys for tracepoint
events.  Dynamic sort keys can be created for specific fields in trace
events so it needs the event information.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1450804030-29193-5-git-send-email-namhyung@kernel.org


[ Moving the evlist creation earlier in top was split to a previous patch ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 54f8f403
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -370,7 +370,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
	if (ret < 0)
		goto out_delete;

	if (setup_sorting() < 0)
	if (setup_sorting(NULL) < 0)
		usage_with_options(annotate_usage, options);

	if (annotate.use_stdio)
+1 −1
Original line number Diff line number Diff line
@@ -1279,7 +1279,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)

	sort__mode = SORT_MODE__DIFF;

	if (setup_sorting() < 0)
	if (setup_sorting(NULL) < 0)
		usage_with_options(diff_usage, options);

	setup_pager();
+1 −1
Original line number Diff line number Diff line
@@ -897,7 +897,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
		symbol_conf.cumulate_callchain = false;
	}

	if (setup_sorting() < 0) {
	if (setup_sorting(session->evlist) < 0) {
		if (sort_order)
			parse_options_usage(report_usage, options, "s", 1);
		if (field_order)
+1 −1
Original line number Diff line number Diff line
@@ -1241,7 +1241,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
	/* display thread wants entries to be collapsed in a different tree */
	sort__need_collapse = 1;

	if (setup_sorting() < 0) {
	if (setup_sorting(top.evlist) < 0) {
		if (sort_order)
			parse_options_usage(top_usage, options, "s", 1);
		if (field_order)
+4 −4
Original line number Diff line number Diff line
@@ -281,7 +281,7 @@ static int test1(struct perf_evsel *evsel, struct machine *machine)
	symbol_conf.cumulate_callchain = false;
	perf_evsel__reset_sample_bit(evsel, CALLCHAIN);

	setup_sorting();
	setup_sorting(NULL);
	callchain_register_param(&callchain_param);

	err = add_hist_entries(hists, machine);
@@ -428,7 +428,7 @@ static int test2(struct perf_evsel *evsel, struct machine *machine)
	symbol_conf.cumulate_callchain = false;
	perf_evsel__set_sample_bit(evsel, CALLCHAIN);

	setup_sorting();
	setup_sorting(NULL);
	callchain_register_param(&callchain_param);

	err = add_hist_entries(hists, machine);
@@ -486,7 +486,7 @@ static int test3(struct perf_evsel *evsel, struct machine *machine)
	symbol_conf.cumulate_callchain = true;
	perf_evsel__reset_sample_bit(evsel, CALLCHAIN);

	setup_sorting();
	setup_sorting(NULL);
	callchain_register_param(&callchain_param);

	err = add_hist_entries(hists, machine);
@@ -670,7 +670,7 @@ static int test4(struct perf_evsel *evsel, struct machine *machine)
	symbol_conf.cumulate_callchain = true;
	perf_evsel__set_sample_bit(evsel, CALLCHAIN);

	setup_sorting();
	setup_sorting(NULL);
	callchain_register_param(&callchain_param);

	err = add_hist_entries(hists, machine);
Loading