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

Commit fa94351b authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

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

 into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

Kernel:

- Modify breakpoint fixes (Jiri Olsa)

perf annotate:

- Fix parsing aarch64 branch instructions after objdump update (Kim Phillips)

- Fix parsing indirect calls in 'perf annotate' (Martin Liška)

perf probe:

- Ignore SyS symbols irrespective of endianness on PowerPC (Sandipan Das)

perf trace:

- Fix include path for asm-generic/unistd.h on arm64 (Kim Phillips)

Core libraries:

- Fix potential null pointer dereference in perf_evsel__new_idx() (Hisao Tanabe)

- Use fixed size string for comms instead of scanf("%m"), that is
  not present in the bionic libc and leads to a crash (Chris Phlipot)

- Fix bad memory access in trace info on 32-bit systems, we were reading
  8 bytes from a 4-byte long variable when saving the command line in the
  perf.data file.  (Chris Phlipot)

Build system:

- Streamline bpf examples and headers installation, clarifying
  some install messages. (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 9a568276 4e67b2a5
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -2867,18 +2867,13 @@ static int perf_event_modify_breakpoint(struct perf_event *bp,
	_perf_event_disable(bp);

	err = modify_user_hw_breakpoint_check(bp, attr, true);
	if (err) {

	if (!bp->attr.disabled)
		_perf_event_enable(bp);

	return err;
}

	if (!attr->disabled)
		_perf_event_enable(bp);
	return 0;
}

static int perf_event_modify_attr(struct perf_event *event,
				  struct perf_event_attr *attr)
{
+6 −7
Original line number Diff line number Diff line
@@ -509,6 +509,8 @@ modify_user_hw_breakpoint_check(struct perf_event *bp, struct perf_event_attr *a
 */
int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *attr)
{
	int err;

	/*
	 * modify_user_hw_breakpoint can be invoked with IRQs disabled and hence it
	 * will not be possible to raise IPIs that invoke __perf_event_disable.
@@ -520,15 +522,12 @@ int modify_user_hw_breakpoint(struct perf_event *bp, struct perf_event_attr *att
	else
		perf_event_disable(bp);

	if (!attr->disabled) {
		int err = modify_user_hw_breakpoint_check(bp, attr, false);
	err = modify_user_hw_breakpoint_check(bp, attr, false);

		if (err)
			return err;
	if (!bp->attr.disabled)
		perf_event_enable(bp);
		bp->attr.disabled = 0;
	}
	return 0;

	return err;
}
EXPORT_SYMBOL_GPL(modify_user_hw_breakpoint);

+6 −8
Original line number Diff line number Diff line
@@ -777,14 +777,12 @@ endif
	$(call QUIET_INSTALL, libexec) \
		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
ifndef NO_LIBBPF
	$(call QUIET_INSTALL, lib) \
		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'
	$(call QUIET_INSTALL, include/bpf) \
		$(INSTALL) include/bpf/*.h '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'
	$(call QUIET_INSTALL, lib) \
		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_examples_instdir_SQ)/bpf'
	$(call QUIET_INSTALL, examples/bpf) \
		$(INSTALL) examples/bpf/*.c '$(DESTDIR_SQ)$(perf_examples_instdir_SQ)/bpf'
	$(call QUIET_INSTALL, bpf-headers) \
		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'; \
		$(INSTALL) include/bpf/*.h -t '$(DESTDIR_SQ)$(perf_include_instdir_SQ)/bpf'
	$(call QUIET_INSTALL, bpf-examples) \
		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perf_examples_instdir_SQ)/bpf'; \
		$(INSTALL) examples/bpf/*.c -t '$(DESTDIR_SQ)$(perf_examples_instdir_SQ)/bpf'
endif
	$(call QUIET_INSTALL, perf-archive) \
		$(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)'
+3 −2
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@ PERF_HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET := 1

out    := $(OUTPUT)arch/arm64/include/generated/asm
header := $(out)/syscalls.c
sysdef := $(srctree)/tools/include/uapi/asm-generic/unistd.h
incpath := $(srctree)/tools
sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h
sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls/
systbl := $(sysprf)/mksyscalltbl

@@ -19,7 +20,7 @@ systbl := $(sysprf)/mksyscalltbl
_dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')

$(header): $(sysdef) $(systbl)
	$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(sysdef) > $@
	$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@

clean::
	$(call QUIET_CLEAN, arm64) $(RM) $(header)
+3 −3
Original line number Diff line number Diff line
@@ -11,7 +11,8 @@

gcc=$1
hostcc=$2
input=$3
incpath=$3
input=$4

if ! test -r $input; then
	echo "Could not read input file" >&2
@@ -28,7 +29,6 @@ create_table_from_c()

	cat <<-_EoHEADER
		#include <stdio.h>
		#define __ARCH_WANT_RENAMEAT
		#include "$input"
		int main(int argc, char *argv[])
		{
@@ -42,7 +42,7 @@ create_table_from_c()
	printf "%s\n" "	printf(\"#define SYSCALLTBL_ARM64_MAX_ID %d\\n\", __NR_$last_sc);"
	printf "}\n"

	} | $hostcc -o $create_table_exe -x c -
	} | $hostcc -I $incpath/include/uapi -o $create_table_exe -x c -

	$create_table_exe

Loading