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

Commit 6645f318 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo' of...

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Support unnamed union/structure members data collection in 'perf probe'. (Masami Hiramatsu)

  - Support missing -f to override perf.data file ownership. (Yunlong Song)

Infrastructure changes:

  - No need to lookup thread twice when processing samples in 'perf script'. (Arnaldo Carvalho de Melo)

  - No need to pass thread twice to the scripting callbacks. (Arnaldo Carvalho de Melo)

  - No need to pass thread twice to the db-export facility. (Arnaldo Carvalho de Melo)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 2e54a5bd bd05954b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -53,12 +53,14 @@ static int cmd_data_convert(int argc, const char **argv,
			    const char *prefix __maybe_unused)
{
	const char *to_ctf     = NULL;
	bool force = false;
	const struct option options[] = {
		OPT_INCR('v', "verbose", &verbose, "be more verbose"),
		OPT_STRING('i', "input", &input_name, "file", "input file name"),
#ifdef HAVE_LIBBABELTRACE_SUPPORT
		OPT_STRING(0, "to-ctf", &to_ctf, NULL, "Convert to CTF format"),
#endif
		OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
		OPT_END()
	};

@@ -76,7 +78,7 @@ static int cmd_data_convert(int argc, const char **argv,

	if (to_ctf) {
#ifdef HAVE_LIBBABELTRACE_SUPPORT
		return bt_convert__perf2ctf(input_name, to_ctf);
		return bt_convert__perf2ctf(input_name, to_ctf, force);
#else
		pr_err("The libbabeltrace support is not compiled in.\n");
		return -1;
+2 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *details
	struct perf_data_file file = {
		.path = file_name,
		.mode = PERF_DATA_MODE_READ,
		.force = details->force,
	};

	session = perf_session__new(&file, 0, NULL);
@@ -47,6 +48,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
		    "Show all event attr details"),
	OPT_BOOLEAN('g', "group", &details.event_group,
		    "Show event group information"),
	OPT_BOOLEAN('f', "force", &details.force, "don't complain, do it"),
	OPT_END()
	};
	const char * const evlist_usage[] = {
+1 −0
Original line number Diff line number Diff line
@@ -443,6 +443,7 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
			 "be more verbose (show build ids, etc)"),
		OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, "file",
			   "kallsyms pathname"),
		OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"),
		OPT_END()
	};
	const char * const inject_usage[] = {
+5 −4
Original line number Diff line number Diff line
@@ -662,6 +662,10 @@ static int __cmd_record(int argc, const char **argv)
int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
{
	const char * const default_sort_order = "frag,hit,bytes";
	struct perf_data_file file = {
		.path = input_name,
		.mode = PERF_DATA_MODE_READ,
	};
	const struct option kmem_options[] = {
	OPT_STRING('i', "input", &input_name, "file", "input file name"),
	OPT_INCR('v', "verbose", &verbose,
@@ -675,6 +679,7 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
		     parse_sort_opt),
	OPT_CALLBACK('l', "line", NULL, "num", "show n lines", parse_line_opt),
	OPT_BOOLEAN(0, "raw-ip", &raw_ip, "show raw ip instead of symbol"),
	OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"),
	OPT_END()
	};
	const char *const kmem_subcommands[] = { "record", "stat", NULL };
@@ -683,10 +688,6 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
		NULL
	};
	struct perf_session *session;
	struct perf_data_file file = {
		.path = input_name,
		.mode = PERF_DATA_MODE_READ,
	};
	int ret = -1;

	argc = parse_options_subcommand(argc, argv, kmem_options,
+2 −0
Original line number Diff line number Diff line
@@ -1047,6 +1047,7 @@ static int read_events(struct perf_kvm_stat *kvm)
	struct perf_data_file file = {
		.path = kvm->file_name,
		.mode = PERF_DATA_MODE_READ,
		.force = kvm->force,
	};

	kvm->tool = eops;
@@ -1204,6 +1205,7 @@ kvm_events_report(struct perf_kvm_stat *kvm, int argc, const char **argv)
			    " time (sort by avg time)"),
		OPT_STRING('p', "pid", &kvm->opts.target.pid, "pid",
			   "analyze events only for given process id(s)"),
		OPT_BOOLEAN('f', "force", &kvm->force, "don't complain, do it"),
		OPT_END()
	};

Loading