Commit 2681bd85 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Remove repipe argument from perf_session__new()



The repipe argument is only used by perf inject and the all others
passes 'false'.  Let's remove it from the function signature and add
__perf_session__new() to be called from perf inject directly.

This is a preparation of the change the pipe input/output.

Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210719223153.1618812-2-namhyung@kernel.org


[ Fixed up some trivial conflicts as this patchset fell thru the cracks ;-( ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 88056929
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static int run_single_threaded(void)
	int err;

	perf_set_singlethreaded();
	session = perf_session__new(NULL, false, NULL);
	session = perf_session__new(NULL, NULL);
	if (IS_ERR(session)) {
		pr_err("Session creation failed.\n");
		return PTR_ERR(session);
@@ -161,7 +161,7 @@ static int do_run_multi_threaded(struct target *target,
	init_stats(&time_stats);
	init_stats(&event_stats);
	for (i = 0; i < multi_iterations; i++) {
		session = perf_session__new(NULL, false, NULL);
		session = perf_session__new(NULL, NULL);
		if (IS_ERR(session))
			return PTR_ERR(session);

+1 −1
Original line number Diff line number Diff line
@@ -596,7 +596,7 @@ int cmd_annotate(int argc, const char **argv)

	data.path = input_name;

	annotate.session = perf_session__new(&data, false, &annotate.tool);
	annotate.session = perf_session__new(&data, &annotate.tool);
	if (IS_ERR(annotate.session))
		return PTR_ERR(annotate.session);

+1 −1
Original line number Diff line number Diff line
@@ -443,7 +443,7 @@ int cmd_buildid_cache(int argc, const char **argv)
		data.path  = missing_filename;
		data.force = force;

		session = perf_session__new(&data, false, NULL);
		session = perf_session__new(&data, NULL);
		if (IS_ERR(session))
			return PTR_ERR(session);
	}
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
	if (filename__fprintf_build_id(input_name, stdout) > 0)
		goto out;

	session = perf_session__new(&data, false, &build_id__mark_dso_hit_ops);
	session = perf_session__new(&data, &build_id__mark_dso_hit_ops);
	if (IS_ERR(session))
		return PTR_ERR(session);

+1 −1
Original line number Diff line number Diff line
@@ -2790,7 +2790,7 @@ static int perf_c2c__report(int argc, const char **argv)
		goto out;
	}

	session = perf_session__new(&data, 0, &c2c.tool);
	session = perf_session__new(&data, &c2c.tool);
	if (IS_ERR(session)) {
		err = PTR_ERR(session);
		pr_debug("Error creating perf session\n");
Loading