aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-03-18 05:00:56 -0400
committerIngo Molnar <mingo@kernel.org>2013-03-18 05:00:56 -0400
commita0bf225db77d6b4f981ffe52c50fedb00cf1836c (patch)
treeb810236731fc523c40686b09f5611afdb9cf581b /tools/perf
parent1f1b396758eff67b43b226904e1748f1e4272b4d (diff)
parentd1398ccfec56e54010476efd6a316427d29045a6 (diff)
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>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/Makefile8
-rw-r--r--tools/perf/bench/bench.h24
-rw-r--r--tools/perf/builtin-record.c6
-rw-r--r--tools/perf/util/hist.h5
-rw-r--r--tools/perf/util/strlist.c2
5 files changed, 39 insertions, 6 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index a2108ca1cc17..bb74c79cd16e 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -95,7 +95,7 @@ ifeq ("$(origin DEBUG)", "command line")
95 PERF_DEBUG = $(DEBUG) 95 PERF_DEBUG = $(DEBUG)
96endif 96endif
97ifndef PERF_DEBUG 97ifndef PERF_DEBUG
98 CFLAGS_OPTIMIZE = -O6 -D_FORTIFY_SOURCE=2 98 CFLAGS_OPTIMIZE = -O6
99endif 99endif
100 100
101ifdef PARSER_DEBUG 101ifdef PARSER_DEBUG
@@ -180,6 +180,12 @@ ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -Wvolatile-register-var,-W
180 CFLAGS := $(CFLAGS) -Wvolatile-register-var 180 CFLAGS := $(CFLAGS) -Wvolatile-register-var
181endif 181endif
182 182
183ifndef 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
187endif
188
183### --- END CONFIGURATION SECTION --- 189### --- END CONFIGURATION SECTION ---
184 190
185ifeq ($(srctree),) 191ifeq ($(srctree),)
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
index a5223e6a7b43..0fdc85269c4d 100644
--- a/tools/perf/bench/bench.h
+++ b/tools/perf/bench/bench.h
@@ -1,6 +1,30 @@
1#ifndef BENCH_H 1#ifndef BENCH_H
2#define BENCH_H 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
4extern int bench_numa(int argc, const char **argv, const char *prefix); 28extern int bench_numa(int argc, const char **argv, const char *prefix);
5extern int bench_sched_messaging(int argc, const char **argv, const char *prefix); 29extern int bench_sched_messaging(int argc, const char **argv, const char *prefix);
6extern int bench_sched_pipe(int argc, const char **argv, const char *prefix); 30extern int bench_sched_pipe(int argc, const char **argv, const char *prefix);
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 774c90713a53..f1a939ebc19c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -573,13 +573,15 @@ static int __cmd_record(struct perf_record *rec, int argc, const char **argv)
573 perf_event__synthesize_guest_os, tool); 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 err = perf_event__synthesize_thread_map(tool, evsel_list->threads, 577 err = perf_event__synthesize_thread_map(tool, evsel_list->threads,
578 process_synthesized_event, 578 process_synthesized_event,
579 machine); 579 machine);
580 else 580 else if (perf_target__has_cpu(&opts->target))
581 err = perf_event__synthesize_threads(tool, process_synthesized_event, 581 err = perf_event__synthesize_threads(tool, process_synthesized_event,
582 machine); 582 machine);
583 else /* command specified */
584 err = 0;
583 585
584 if (err != 0) 586 if (err != 0)
585 goto out_delete_session; 587 goto out_delete_session;
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 38624686ee9a..226a4ae2f936 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -208,8 +208,9 @@ static inline int script_browse(const char *script_opt __maybe_unused)
208 return 0; 208 return 0;
209} 209}
210 210
211#define K_LEFT -1 211#define K_LEFT -1000
212#define K_RIGHT -2 212#define K_RIGHT -2000
213#define K_SWITCH_INPUT_DATA -3000
213#endif 214#endif
214 215
215#ifdef GTK2_SUPPORT 216#ifdef GTK2_SUPPORT
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index 55433aa42c8f..eabdce0a2daa 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -143,7 +143,7 @@ struct strlist *strlist__new(bool dupstr, const char *list)
143 slist->rblist.node_delete = strlist__node_delete; 143 slist->rblist.node_delete = strlist__node_delete;
144 144
145 slist->dupstr = dupstr; 145 slist->dupstr = dupstr;
146 if (slist && strlist__parse_list(slist, list) != 0) 146 if (list && strlist__parse_list(slist, list) != 0)
147 goto out_error; 147 goto out_error;
148 } 148 }
149 149