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

Commit 55b78e34 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

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

 into perf/urgent

Fixes for perf/urgent from Arnaldo Carvalho de Melo:

 * Fix fallback to --stdio when TUI not supported, from Namhyung Kim.

 * Use right cast for pointers/long in libtraceevent, from Namhyung Kim.

 * Be consistent on using the right error reporting interface for fatal errors,
   from Namhyung Kim.

 * Fix fallback to --stdio when TUI not supported, from Namhyung Kim.

 * Use the right index in asm only view in the annotate browser.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents c985f781 a44b45f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1584,7 +1584,7 @@ get_value(struct event_format *event,
		const char *name;

		name = get_comm(event, record);
		return (unsigned long long)name;
		return (unsigned long)name;
	}

	pevent_read_number_field(field, record->data, &val);
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ ifeq ("$(origin DEBUG)", "command line")
  PERF_DEBUG = $(DEBUG)
endif
ifndef PERF_DEBUG
  CFLAGS_OPTIMIZE = -O6
  CFLAGS_OPTIMIZE = -O6 -D_FORTIFY_SOURCE=2
endif

ifdef PARSER_DEBUG
@@ -89,7 +89,7 @@ ifdef PARSER_DEBUG
	PARSER_DEBUG_CFLAGS := -DPARSER_DEBUG
endif

CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) $(PARSER_DEBUG_CFLAGS)
CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) $(EXTRA_WARNINGS) $(EXTRA_CFLAGS) $(PARSER_DEBUG_CFLAGS)
EXTLIBS = -lpthread -lrt -lelf -lm
ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
ALL_LDFLAGS = $(LDFLAGS)
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
	}

	if (total_nr_samples == 0) {
		ui__warning("The %s file has no samples!\n", session->filename);
		ui__error("The %s file has no samples!\n", session->filename);
		goto out_delete;
	}
out_delete:
+7 −7
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ static void perf_record__open(struct perf_record *rec)
			}

			if (err == ENOENT) {
				ui__warning("The %s event is not supported.\n",
				ui__error("The %s event is not supported.\n",
					    event_name(pos));
				exit(EXIT_FAILURE);
			}
@@ -858,7 +858,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
		usage_with_options(record_usage, record_options);

	if (rec->force && rec->append_file) {
		fprintf(stderr, "Can't overwrite and append at the same time."
		ui__error("Can't overwrite and append at the same time."
			  " You need to choose between -f and -A");
		usage_with_options(record_usage, record_options);
	} else if (rec->append_file) {
@@ -868,7 +868,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
	}

	if (nr_cgroups && !rec->opts.target.system_wide) {
		fprintf(stderr, "cgroup monitoring only available in"
		ui__error("cgroup monitoring only available in"
			  " system-wide mode\n");
		usage_with_options(record_usage, record_options);
	}
@@ -905,7 +905,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
		int saved_errno = errno;

		perf_target__strerror(&rec->opts.target, err, errbuf, BUFSIZ);
		ui__warning("%s", errbuf);
		ui__error("%s", errbuf);

		err = -saved_errno;
		goto out_free_fd;
@@ -933,7 +933,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
	else if (rec->opts.freq) {
		rec->opts.default_interval = rec->opts.freq;
	} else {
		fprintf(stderr, "frequency and count are zero, aborting\n");
		ui__error("frequency and count are zero, aborting\n");
		err = -EINVAL;
		goto out_free_fd;
	}
+6 −8
Original line number Diff line number Diff line
@@ -251,13 +251,13 @@ static int perf_report__setup_sample_type(struct perf_report *rep)

	if (!(self->sample_type & PERF_SAMPLE_CALLCHAIN)) {
		if (sort__has_parent) {
			ui__warning("Selected --sort parent, but no "
			ui__error("Selected --sort parent, but no "
				    "callchain data. Did you call "
				    "'perf record' without -g?\n");
			return -EINVAL;
		}
		if (symbol_conf.use_callchain) {
			ui__warning("Selected -g but no callchain data. Did "
			ui__error("Selected -g but no callchain data. Did "
				    "you call 'perf record' without -g?\n");
			return -1;
		}
@@ -266,17 +266,15 @@ static int perf_report__setup_sample_type(struct perf_report *rep)
		   !symbol_conf.use_callchain) {
			symbol_conf.use_callchain = true;
			if (callchain_register_param(&callchain_param) < 0) {
				ui__warning("Can't register callchain "
					    "params.\n");
				ui__error("Can't register callchain params.\n");
				return -EINVAL;
			}
	}

	if (sort__branch_mode == 1) {
		if (!(self->sample_type & PERF_SAMPLE_BRANCH_STACK)) {
			fprintf(stderr, "selected -b but no branch data."
					" Did you call perf record without"
					" -b?\n");
			ui__error("Selected -b but no branch data. "
				  "Did you call perf record without -b?\n");
			return -1;
		}
	}
@@ -420,7 +418,7 @@ static int __cmd_report(struct perf_report *rep)
	}

	if (nr_samples == 0) {
		ui__warning("The %s file has no samples!\n", session->filename);
		ui__error("The %s file has no samples!\n", session->filename);
		goto out_delete;
	}

Loading