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

Commit 8657355f authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo-20161003' of...

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

 into perf/urgent

Pull perf/core improvements and fixes:

- Allow vendors to provide JSON files describing PMU events, that then
  get parsed to generate C tables that are linked against perf, allowing
  the use of the names in their documentations, such as:

  # perf list l1d

  List of pre-defined events (to be used in -e):

  Cache:
    l1d.replacement
         [L1D data line replacements]
    l1d_pend_miss.fb_full
         [Cycles a demand request was blocked due to Fill Buffers inavailability]
    l1d_pend_miss.pending
         [L1D miss oustandings duration in cycles]
    l1d_pend_miss.pending_cycles
         [Cycles with L1D load Misses outstanding]
    l1d_pend_miss.pending_cycles_any
         [Cycles with L1D load Misses outstanding from any thread on physical core]
    l2_trans.l1d_wb
         [L1D writebacks that access L2 cache]

  Pipeline:
    cycle_activity.cycles_l1d_miss
         [Cycles while L1 cache miss demand load is outstanding]
    cycle_activity.cycles_l1d_pending
         [Cycles while L1 cache miss demand load is outstanding]
    cycle_activity.stalls_l1d_miss
         [Execution stalls while L1 cache miss demand load is outstanding]
    cycle_activity.stalls_l1d_pending
         [Execution stalls while L1 cache miss demand load is outstanding]

  The above example was done on a Broadwell based ThinkPad t450s after
  downloading and installing such JSON files which will be added to the
  tools/perf/pmu-events/ directory in a subsequent patchkit.

  Now one can use those names with -e/--event in all 'perf tools'.
  (Andi Kleen, Sukadev Bhattiprolu)

- Add a missing pointer dereference in 'perf probe' (Colin Ian King)

- Add support for building host programs to be used in generating files
  to be used in the build process, such as fixdep and jevents, fixing
  the usage of these features in a cross compilation setup (Jiri Olsa)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 597f03f9 b42c7369
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
hostprogs := fixdep

fixdep-y := fixdep.o
+5 −0
Original line number Diff line number Diff line
@@ -90,3 +90,8 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
# - per object C flags
# - BUILD_STR macro to allow '-D"$(variable)"' constructs
c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj))

###
## HOSTCC C flags

host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj))
+7 −1
Original line number Diff line number Diff line
@@ -14,6 +14,12 @@ endef
$(call allow-override,CC,$(CROSS_COMPILE)gcc)
$(call allow-override,LD,$(CROSS_COMPILE)ld)

HOSTCC ?= gcc
HOSTLD ?= ld
HOSTAR ?= ar

export HOSTCC HOSTLD HOSTAR

ifeq ($(V),1)
  Q =
else
@@ -36,7 +42,7 @@ $(OUTPUT)fixdep-in.o: FORCE
	$(Q)$(MAKE) $(build)=fixdep

$(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
	$(QUIET_LINK)$(CC) $(LDFLAGS) -o $@ $<
	$(QUIET_LINK)$(HOSTCC) $(LDFLAGS) -o $@ $<

FORCE:

+15 −4
Original line number Diff line number Diff line
@@ -58,6 +58,9 @@ quiet_cmd_mkdir = MKDIR $(dir $@)
quiet_cmd_cc_o_c = CC       $@
      cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<

quiet_cmd_host_cc_o_c = HOSTCC   $@
      cmd_host_cc_o_c = $(HOSTCC) $(host_c_flags) -c -o $@ $<

quiet_cmd_cpp_i_c = CPP      $@
      cmd_cpp_i_c = $(CC) $(c_flags) -E -o $@ $<

@@ -72,14 +75,22 @@ quiet_cmd_ld_multi = LD $@
      cmd_ld_multi = $(if $(strip $(obj-y)),\
                     $(LD) -r -o $@  $(filter $(obj-y),$^),rm -f $@; $(AR) rcs $@)

quiet_cmd_host_ld_multi = HOSTLD   $@
      cmd_host_ld_multi = $(if $(strip $(obj-y)),\
                          $(HOSTLD) -r -o $@  $(filter $(obj-y),$^),rm -f $@; $(HOSTAR) rcs $@)

ifneq ($(filter $(obj),$(hostprogs)),)
  host = host_
endif

# Build rules
$(OUTPUT)%.o: %.c FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)
	$(call if_changed_dep,$(host)cc_o_c)

$(OUTPUT)%.o: %.S FORCE
	$(call rule_mkdir)
	$(call if_changed_dep,cc_o_c)
	$(call if_changed_dep,$(host)cc_o_c)

$(OUTPUT)%.i: %.c FORCE
	$(call rule_mkdir)
@@ -119,7 +130,7 @@ $(sort $(subdir-obj-y)): $(subdir-y) ;

$(in-target): $(obj-y) FORCE
	$(call rule_mkdir)
	$(call if_changed,ld_multi)
	$(call if_changed,$(host)ld_multi)

__build: $(in-target)
	@:
+0 −4
Original line number Diff line number Diff line
build := -f $(srctree)/tools/build/Makefile.build dir=. obj

ifdef CROSS_COMPILE
fixdep:
else
fixdep:
	$(Q)$(MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= $(OUTPUT)fixdep
endif

.PHONY: fixdep
Loading