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

Commit 8748dd9b 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, fixes and code move from Arnaldo Carvalho de Melo:

 * Initialize 'page_size' variable in the python binding, this was sent
   for perf/urgent by mistake, then when merging Ingo removed it, fixing
   the problem for perf/urgent, but when perf/urgent was merged with
   perf/core, where that initialization is needed, made the python
   binding mmap call to fail, fix it by initializing page_size again.

 * Add a browser for 'perf script' and make it available from the report
   and annotate browsers. It does filtering to find the scripts that
   handle events found in the perf.data file used. From Feng Tang

 * Move some functions from symbol.c to more appropriate files, creating
   dso.[ch] in the process, no code changes. From Jiri Olsa

 * Fix mmap error output message for when perf_mmap fails and returns
   !-EPERM, where the default for mmap_pages, INT_MAX, was causing a
   !power of 2 error message, fix from Jiri Olsa.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 9db55064 0da2e9c2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -327,6 +327,7 @@ LIB_H += util/svghelper.h
LIB_H += util/tool.h
LIB_H += util/run-command.h
LIB_H += util/sigchain.h
LIB_H += util/dso.h
LIB_H += util/symbol.h
LIB_H += util/color.h
LIB_H += util/values.h
@@ -385,6 +386,7 @@ LIB_OBJS += $(OUTPUT)util/top.o
LIB_OBJS += $(OUTPUT)util/usage.o
LIB_OBJS += $(OUTPUT)util/wrapper.o
LIB_OBJS += $(OUTPUT)util/sigchain.o
LIB_OBJS += $(OUTPUT)util/dso.o
LIB_OBJS += $(OUTPUT)util/symbol.o
LIB_OBJS += $(OUTPUT)util/symbol-elf.o
LIB_OBJS += $(OUTPUT)util/dso-test-data.o
@@ -591,6 +593,7 @@ ifndef NO_NEWT
		LIB_OBJS += $(OUTPUT)ui/browsers/annotate.o
		LIB_OBJS += $(OUTPUT)ui/browsers/hists.o
		LIB_OBJS += $(OUTPUT)ui/browsers/map.o
		LIB_OBJS += $(OUTPUT)ui/browsers/scripts.o
		LIB_OBJS += $(OUTPUT)ui/progress.o
		LIB_OBJS += $(OUTPUT)ui/util.o
		LIB_OBJS += $(OUTPUT)ui/tui/setup.o
@@ -907,6 +910,9 @@ $(OUTPUT)ui/browsers/hists.o: ui/browsers/hists.c $(OUTPUT)PERF-CFLAGS
$(OUTPUT)ui/browsers/map.o: ui/browsers/map.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<

$(OUTPUT)ui/browsers/scripts.o: ui/browsers/scripts.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DENABLE_SLFUTURE_CONST $<

$(OUTPUT)util/rbtree.o: ../../lib/rbtree.c $(OUTPUT)PERF-CFLAGS
	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Wno-unused-parameter -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<

+2 −3
Original line number Diff line number Diff line
@@ -34,7 +34,6 @@

struct perf_annotate {
	struct perf_tool tool;
	char const *input_name;
	bool	   force, use_tui, use_stdio;
	bool	   full_paths;
	bool	   print_line;
@@ -175,7 +174,7 @@ static int __cmd_annotate(struct perf_annotate *ann)
	struct perf_evsel *pos;
	u64 total_nr_samples;

	session = perf_session__new(ann->input_name, O_RDONLY,
	session = perf_session__new(input_name, O_RDONLY,
				    ann->force, false, &ann->tool);
	if (session == NULL)
		return -ENOMEM;
@@ -260,7 +259,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
		},
	};
	const struct option options[] = {
	OPT_STRING('i', "input", &annotate.input_name, "file",
	OPT_STRING('i', "input", &input_name, "file",
		    "input file name"),
	OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
		   "only consider symbols in these dsos"),
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#include "util/header.h"
#include "util/parse-options.h"
#include "util/strlist.h"
#include "util/build-id.h"
#include "util/symbol.h"

static int build_id_cache__add_file(const char *filename, const char *debugdir)
+2 −4
Original line number Diff line number Diff line
@@ -44,8 +44,7 @@ static int filename__fprintf_build_id(const char *name, FILE *fp)
	return fprintf(fp, "%s\n", sbuild_id);
}

static int perf_session__list_build_ids(const char *input_name,
					bool force, bool with_hits)
static int perf_session__list_build_ids(bool force, bool with_hits)
{
	struct perf_session *session;

@@ -81,7 +80,6 @@ int cmd_buildid_list(int argc, const char **argv,
	bool show_kernel = false;
	bool with_hits = false;
	bool force = false;
	const char *input_name = NULL;
	const struct option options[] = {
	OPT_BOOLEAN('H', "with-hits", &with_hits, "Show only DSOs with hits"),
	OPT_STRING('i', "input", &input_name, "file", "input file name"),
@@ -101,5 +99,5 @@ int cmd_buildid_list(int argc, const char **argv,
	if (show_kernel)
		return sysfs__fprintf_build_id(stdout);

	return perf_session__list_build_ids(input_name, force, with_hits);
	return perf_session__list_build_ids(force, with_hits);
}
+2 −3
Original line number Diff line number Diff line
@@ -48,12 +48,12 @@ static int __if_print(bool *first, const char *field, u64 value)

#define if_print(field) __if_print(&first, #field, pos->attr.field)

static int __cmd_evlist(const char *input_name, struct perf_attr_details *details)
static int __cmd_evlist(const char *file_name, struct perf_attr_details *details)
{
	struct perf_session *session;
	struct perf_evsel *pos;

	session = perf_session__new(input_name, O_RDONLY, 0, false, NULL);
	session = perf_session__new(file_name, O_RDONLY, 0, false, NULL);
	if (session == NULL)
		return -ENOMEM;

@@ -111,7 +111,6 @@ static int __cmd_evlist(const char *input_name, struct perf_attr_details *detail
int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
{
	struct perf_attr_details details = { .verbose = false, };
	const char *input_name = NULL;
	const struct option options[] = {
	OPT_STRING('i', "input", &input_name, "file", "Input file name"),
	OPT_BOOLEAN('F', "freq", &details.freq, "Show the sample frequency"),
Loading