Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

. perf probe: Fix segfault due to testing the wrong pointer for NULL,
from Ananth N Mavinakayanahalli.

. libtraceevent: Remove hard coded include to /usr/local/include in
Makefile, which causes cross builds to include host header files,
fix from Jack Mitchell.

. perf record: Use the right target interface for synthesizing
threads when --cpu/-C option is used, fix from Jiri Olsa.

. Check if -DFORTIFY_SOURCE=2 is allowed, as gcc 4.7.2 defines
it and then the build is broken when it is redefined in perf,
fix from Marcin Slusarz.

. Fix build with NO_NEWT=1, that can happen explicitely or when
the newt-devel package is not installed, from Michael Ellerman.

. perf/POWER7: Create a sysfs format entry for Power7 events, missing
patch from a patchseries already merged, from Sukadev Bhattiprolu.

. Fix LIBNUMA build with glibc 2.12 and older, from Vinson Lee.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>

+53 -7
+13
arch/powerpc/perf/power7-pmu.c
··· 420 420 .attrs = power7_events_attr, 421 421 }; 422 422 423 + PMU_FORMAT_ATTR(event, "config:0-19"); 424 + 425 + static struct attribute *power7_pmu_format_attr[] = { 426 + &format_attr_event.attr, 427 + NULL, 428 + }; 429 + 430 + struct attribute_group power7_pmu_format_group = { 431 + .name = "format", 432 + .attrs = power7_pmu_format_attr, 433 + }; 434 + 423 435 static const struct attribute_group *power7_pmu_attr_groups[] = { 436 + &power7_pmu_format_group, 424 437 &power7_pmu_events_group, 425 438 NULL, 426 439 };
+1 -1
tools/lib/traceevent/Makefile
··· 122 122 123 123 EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) 124 124 125 - INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES) 125 + INCLUDES = -I. $(CONFIG_INCLUDES) 126 126 127 127 # Set compile option CFLAGS if not set elsewhere 128 128 CFLAGS ?= -g -Wall
+7 -1
tools/perf/Makefile
··· 95 95 PERF_DEBUG = $(DEBUG) 96 96 endif 97 97 ifndef PERF_DEBUG 98 - CFLAGS_OPTIMIZE = -O6 -D_FORTIFY_SOURCE=2 98 + CFLAGS_OPTIMIZE = -O6 99 99 endif 100 100 101 101 ifdef PARSER_DEBUG ··· 178 178 179 179 ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-Wvolatile-register-var),y) 180 180 CFLAGS := $(CFLAGS) -Wvolatile-register-var 181 + endif 182 + 183 + ifndef PERF_DEBUG 184 + ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -D_FORTIFY_SOURCE=2,-D_FORTIFY_SOURCE=2),y) 185 + CFLAGS := $(CFLAGS) -D_FORTIFY_SOURCE=2 186 + endif 181 187 endif 182 188 183 189 ### --- END CONFIGURATION SECTION ---
+24
tools/perf/bench/bench.h
··· 1 1 #ifndef BENCH_H 2 2 #define BENCH_H 3 3 4 + /* 5 + * The madvise transparent hugepage constants were added in glibc 6 + * 2.13. For compatibility with older versions of glibc, define these 7 + * tokens if they are not already defined. 8 + * 9 + * PA-RISC uses different madvise values from other architectures and 10 + * needs to be special-cased. 11 + */ 12 + #ifdef __hppa__ 13 + # ifndef MADV_HUGEPAGE 14 + # define MADV_HUGEPAGE 67 15 + # endif 16 + # ifndef MADV_NOHUGEPAGE 17 + # define MADV_NOHUGEPAGE 68 18 + # endif 19 + #else 20 + # ifndef MADV_HUGEPAGE 21 + # define MADV_HUGEPAGE 14 22 + # endif 23 + # ifndef MADV_NOHUGEPAGE 24 + # define MADV_NOHUGEPAGE 15 25 + # endif 26 + #endif 27 + 4 28 extern int bench_numa(int argc, const char **argv, const char *prefix); 5 29 extern int bench_sched_messaging(int argc, const char **argv, const char *prefix); 6 30 extern int bench_sched_pipe(int argc, const char **argv, const char *prefix);
+4 -2
tools/perf/builtin-record.c
··· 573 573 perf_event__synthesize_guest_os, tool); 574 574 } 575 575 576 - if (!opts->target.system_wide) 576 + if (perf_target__has_task(&opts->target)) 577 577 err = perf_event__synthesize_thread_map(tool, evsel_list->threads, 578 578 process_synthesized_event, 579 579 machine); 580 - else 580 + else if (perf_target__has_cpu(&opts->target)) 581 581 err = perf_event__synthesize_threads(tool, process_synthesized_event, 582 582 machine); 583 + else /* command specified */ 584 + err = 0; 583 585 584 586 if (err != 0) 585 587 goto out_delete_session;
+3 -2
tools/perf/util/hist.h
··· 208 208 return 0; 209 209 } 210 210 211 - #define K_LEFT -1 212 - #define K_RIGHT -2 211 + #define K_LEFT -1000 212 + #define K_RIGHT -2000 213 + #define K_SWITCH_INPUT_DATA -3000 213 214 #endif 214 215 215 216 #ifdef GTK2_SUPPORT
+1 -1
tools/perf/util/strlist.c
··· 143 143 slist->rblist.node_delete = strlist__node_delete; 144 144 145 145 slist->dupstr = dupstr; 146 - if (slist && strlist__parse_list(slist, list) != 0) 146 + if (list && strlist__parse_list(slist, list) != 0) 147 147 goto out_error; 148 148 } 149 149