Commit bebd23a2 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:

New features:

  - Allow passing C language eBPF scriptlets via --event in all tools,
    so that it gets built using clang and then pass it to the kernel via
    sys_bpf(). (Wang Nan)

  - Wire up the loaded ebpf object file with associated kprobes, so that
    it can determine if the kprobes will be filtered or not. (Wang Nan)

User visible changes:

  - Add cmd string table to decode sys_bpf first arg in 'trace'. (Arnaldo Carvalho de Melo)

  - Enable printing of branch stack in 'perf script'. (Stephane Eranian)

  - Pass the right file with debug info to libunwind. (Rabin Vincent)

Build Fixes:

  - Make sure fixdep is built before libbpf, fixing a race. (Jiri Olsa)

  - Fix libiberty feature detection. (Rabin Vincent)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 66a565c2 7ed4915a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -132,10 +132,10 @@ test-libbfd.bin:
	$(BUILD) -DPACKAGE='"perf"' -lbfd -lz -liberty -ldl

test-liberty.bin:
	$(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty
	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty

test-liberty-z.bin:
	$(CC) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' -lbfd -ldl -liberty -lz
	$(CC) $(CFLAGS) -Wall -Werror -o $(OUTPUT)$@ test-libbfd.c -DPACKAGE='"perf"' $(LDFLAGS) -lbfd -ldl -liberty -lz

test-cplus-demangle.bin:
	$(BUILD) -liberty
+6 −0
Original line number Diff line number Diff line
@@ -314,6 +314,12 @@ This option sets the time out limit. The default value is 500 ms.
Record context switch events i.e. events of type PERF_RECORD_SWITCH or
PERF_RECORD_SWITCH_CPU_WIDE.

--clang-path::
Path to clang binary to use for compiling BPF scriptlets.

--clang-opt::
Options passed to clang when compiling BPF scriptlets.

SEE ALSO
--------
linkperf:perf-stat[1], linkperf:perf-list[1]
+12 −2
Original line number Diff line number Diff line
@@ -112,11 +112,11 @@ OPTIONS
--debug-mode::
        Do various checks like samples ordering and lost events.

-f::
-F::
--fields::
        Comma separated list of fields to print. Options are:
        comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff,
	srcline, period, iregs, flags.
	srcline, period, iregs, brstack, brstacksym, flags.
        Field list can be prepended with the type, trace, sw or hw,
        to indicate to which event type the field list applies.
        e.g., -f sw:comm,tid,time,ip,sym  and -f trace:time,cpu,trace
@@ -175,6 +175,16 @@ OPTIONS
	Finally, a user may not set fields to none for all event types.
	i.e., -f "" is not allowed.

	The brstack output includes branch related information with raw addresses using the
	/v/v/v/v/ syntax in the following order:
	FROM: branch source instruction
	TO  : branch target instruction
        M/P/-: M=branch target mispredicted or branch direction was mispredicted, P=target predicted or direction predicted, -=not supported
	X/- : X=branch inside a transactional region, -=not in transaction region or not supported
	A/- : A=TSX abort entry, -=not aborted region or not supported

	The brstacksym is identical to brstack, except that the FROM and TO addresses are printed in a symbolic form if possible.

-k::
--vmlinux=<file>::
        vmlinux pathname
+1 −1
Original line number Diff line number Diff line
@@ -430,7 +430,7 @@ $(LIBAPI)-clean:
	$(call QUIET_CLEAN, libapi)
	$(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null

$(LIBBPF): FORCE
$(LIBBPF): fixdep FORCE
	$(Q)$(MAKE) -C $(BPF_DIR) O=$(OUTPUT) $(OUTPUT)libbpf.a

$(LIBBPF)-clean:
+7 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#include "util/auxtrace.h"
#include "util/parse-branch-options.h"
#include "util/parse-regs-options.h"
#include "util/llvm-utils.h"

#include <unistd.h>
#include <sched.h>
@@ -1112,6 +1113,12 @@ struct option __record_options[] = {
			"per thread proc mmap processing timeout in ms"),
	OPT_BOOLEAN(0, "switch-events", &record.opts.record_switch_events,
		    "Record context switch events"),
#ifdef HAVE_LIBBPF_SUPPORT
	OPT_STRING(0, "clang-path", &llvm_param.clang_path, "clang path",
		   "clang binary to use for compiling BPF scriptlets"),
	OPT_STRING(0, "clang-opt", &llvm_param.clang_opt, "clang options",
		   "options passed to clang when compiling BPF scriptlets"),
#endif
	OPT_END()
};

Loading