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

Commit bac2e4a9 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 improvement and fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - Add new compaction-times python script. (Tony Jones)

  - Make the --[no-]-demangle/--[no-]-demangle-kernel command line
    options available in 'perf script' too. (Mark Drayton)

  - Allow for negative numbers in libtraceevent's print format,
    fixing up misformatting in some tracepoints. (Steven Rostedt)

Infrastructure changes:

  - perf_env/perf_evlist changes to allow accessing the data
    structure with the environment where some perf data was
    collected in functions not necessarily related to perf.data
    file processing. (Kan Liang)

  - Cleanups for the tracepoint definition location paths routines. (Jiri Olsa)

  - Introduce sysfs/filename__sprintf_build_id, removing code
    duplication. (Masami Hiramatsu)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 02b643b6 2c07144d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -4828,6 +4828,7 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
			case 'z':
			case 'z':
			case 'Z':
			case 'Z':
			case '0' ... '9':
			case '0' ... '9':
			case '-':
				goto cont_process;
				goto cont_process;
			case 'p':
			case 'p':
				if (pevent->long_size == 4)
				if (pevent->long_size == 4)
+7 −0
Original line number Original line Diff line number Diff line
@@ -226,6 +226,13 @@ OPTIONS
	Display context switch events i.e. events of type PERF_RECORD_SWITCH or
	Display context switch events i.e. events of type PERF_RECORD_SWITCH or
	PERF_RECORD_SWITCH_CPU_WIDE.
	PERF_RECORD_SWITCH_CPU_WIDE.


--demangle::
	Demangle symbol names to human readable form. It's enabled by default,
	disable with --no-demangle.

--demangle-kernel::
	Demangle kernel symbol names to human readable form (for C++ kernels).

--header
--header
	Show perf.data header.
	Show perf.data header.


+2 −2
Original line number Original line Diff line number Diff line
@@ -128,7 +128,7 @@ static const char *normalize_arch(char *arch)
	return arch;
	return arch;
}
}


static int perf_session_env__lookup_binutils_path(struct perf_session_env *env,
static int perf_session_env__lookup_binutils_path(struct perf_env *env,
						  const char *name,
						  const char *name,
						  const char **path)
						  const char **path)
{
{
@@ -206,7 +206,7 @@ static int perf_session_env__lookup_binutils_path(struct perf_session_env *env,
	return -1;
	return -1;
}
}


int perf_session_env__lookup_objdump(struct perf_session_env *env)
int perf_session_env__lookup_objdump(struct perf_env *env)
{
{
	/*
	/*
	 * For live mode, env->arch will be NULL and we can use
	 * For live mode, env->arch will be NULL and we can use
+1 −1
Original line number Original line Diff line number Diff line
@@ -5,6 +5,6 @@


extern const char *objdump_path;
extern const char *objdump_path;


int perf_session_env__lookup_objdump(struct perf_session_env *env);
int perf_session_env__lookup_objdump(struct perf_env *env);


#endif /* ARCH_PERF_COMMON_H */
#endif /* ARCH_PERF_COMMON_H */
+2 −12
Original line number Original line Diff line number Diff line
@@ -25,8 +25,6 @@
static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid)
static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid)
{
{
	char root_dir[PATH_MAX];
	char root_dir[PATH_MAX];
	char notes[PATH_MAX];
	u8 build_id[BUILD_ID_SIZE];
	char *p;
	char *p;


	strlcpy(root_dir, proc_dir, sizeof(root_dir));
	strlcpy(root_dir, proc_dir, sizeof(root_dir));
@@ -35,15 +33,7 @@ static int build_id_cache__kcore_buildid(const char *proc_dir, char *sbuildid)
	if (!p)
	if (!p)
		return -1;
		return -1;
	*p = '\0';
	*p = '\0';

	return sysfs__sprintf_build_id(root_dir, sbuildid);
	scnprintf(notes, sizeof(notes), "%s/sys/kernel/notes", root_dir);

	if (sysfs__read_build_id(notes, build_id, sizeof(build_id)))
		return -1;

	build_id__sprintf(build_id, sizeof(build_id), sbuildid);

	return 0;
}
}


static int build_id_cache__kcore_dir(char *dir, size_t sz)
static int build_id_cache__kcore_dir(char *dir, size_t sz)
@@ -138,7 +128,7 @@ static int build_id_cache__add_kcore(const char *filename, bool force)
		return -1;
		return -1;
	*p = '\0';
	*p = '\0';


	if (build_id_cache__kcore_buildid(from_dir, sbuildid))
	if (build_id_cache__kcore_buildid(from_dir, sbuildid) < 0)
		return -1;
		return -1;


	scnprintf(to_dir, sizeof(to_dir), "%s/[kernel.kcore]/%s",
	scnprintf(to_dir, sizeof(to_dir), "%s/[kernel.kcore]/%s",
Loading