diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-23 02:23:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-23 02:23:20 -0400 |
commit | 43315956509ca6913764861ac7dec128b91eb1ec (patch) | |
tree | 60fd5647f150a46e63093a41417c2eef3e776b3d /tools/perf/Makefile | |
parent | 9bf4e7fba8006d19846fec877b6da0616b2772de (diff) | |
parent | 6beba7adbe092e63dfe8d09fbd1e3ec140474a13 (diff) |
Merge branch 'perf/core' into perf/probes
Conflicts:
tools/perf/Makefile
Merge reason:
- fix the conflict
- pick up the pr_*() infrastructure to queue up dependent patch
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 1811a7015f9c..147e3cf035d3 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -201,7 +201,14 @@ EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wold-style-definition | |||
201 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes | 201 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wstrict-prototypes |
202 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement | 202 | EXTRA_WARNINGS := $(EXTRA_WARNINGS) -Wdeclaration-after-statement |
203 | 203 | ||
204 | CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) | 204 | ifeq ("$(origin DEBUG)", "command line") |
205 | PERF_DEBUG = $(DEBUG) | ||
206 | endif | ||
207 | ifndef PERF_DEBUG | ||
208 | CFLAGS_OPTIMIZE = -O6 | ||
209 | endif | ||
210 | |||
211 | CFLAGS = $(MBITS) -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) | ||
205 | LDFLAGS = -lpthread -lrt -lelf -lm | 212 | LDFLAGS = -lpthread -lrt -lelf -lm |
206 | ALL_CFLAGS = $(CFLAGS) | 213 | ALL_CFLAGS = $(CFLAGS) |
207 | ALL_LDFLAGS = $(LDFLAGS) | 214 | ALL_LDFLAGS = $(LDFLAGS) |
@@ -329,8 +336,26 @@ LIB_H += ../../include/linux/perf_event.h | |||
329 | LIB_H += ../../include/linux/rbtree.h | 336 | LIB_H += ../../include/linux/rbtree.h |
330 | LIB_H += ../../include/linux/list.h | 337 | LIB_H += ../../include/linux/list.h |
331 | LIB_H += ../../include/linux/stringify.h | 338 | LIB_H += ../../include/linux/stringify.h |
339 | LIB_H += util/include/linux/bitmap.h | ||
340 | LIB_H += util/include/linux/bitops.h | ||
341 | LIB_H += util/include/linux/compiler.h | ||
342 | LIB_H += util/include/linux/ctype.h | ||
343 | LIB_H += util/include/linux/kernel.h | ||
332 | LIB_H += util/include/linux/list.h | 344 | LIB_H += util/include/linux/list.h |
345 | LIB_H += util/include/linux/module.h | ||
346 | LIB_H += util/include/linux/poison.h | ||
347 | LIB_H += util/include/linux/prefetch.h | ||
348 | LIB_H += util/include/linux/rbtree.h | ||
349 | LIB_H += util/include/linux/string.h | ||
350 | LIB_H += util/include/linux/types.h | ||
351 | LIB_H += util/include/asm/asm-offsets.h | ||
352 | LIB_H += util/include/asm/bitops.h | ||
353 | LIB_H += util/include/asm/byteorder.h | ||
354 | LIB_H += util/include/asm/swab.h | ||
355 | LIB_H += util/include/asm/system.h | ||
356 | LIB_H += util/include/asm/uaccess.h | ||
333 | LIB_H += perf.h | 357 | LIB_H += perf.h |
358 | LIB_H += util/event.h | ||
334 | LIB_H += util/types.h | 359 | LIB_H += util/types.h |
335 | LIB_H += util/levenshtein.h | 360 | LIB_H += util/levenshtein.h |
336 | LIB_H += util/parse-options.h | 361 | LIB_H += util/parse-options.h |
@@ -344,9 +369,12 @@ LIB_H += util/strlist.h | |||
344 | LIB_H += util/run-command.h | 369 | LIB_H += util/run-command.h |
345 | LIB_H += util/sigchain.h | 370 | LIB_H += util/sigchain.h |
346 | LIB_H += util/symbol.h | 371 | LIB_H += util/symbol.h |
347 | LIB_H += util/module.h | ||
348 | LIB_H += util/color.h | 372 | LIB_H += util/color.h |
349 | LIB_H += util/values.h | 373 | LIB_H += util/values.h |
374 | LIB_H += util/sort.h | ||
375 | LIB_H += util/hist.h | ||
376 | LIB_H += util/thread.h | ||
377 | LIB_H += util/data_map.h | ||
350 | 378 | ||
351 | LIB_OBJS += util/abspath.o | 379 | LIB_OBJS += util/abspath.o |
352 | LIB_OBJS += util/alias.o | 380 | LIB_OBJS += util/alias.o |
@@ -360,6 +388,9 @@ LIB_OBJS += util/parse-options.o | |||
360 | LIB_OBJS += util/parse-events.o | 388 | LIB_OBJS += util/parse-events.o |
361 | LIB_OBJS += util/path.o | 389 | LIB_OBJS += util/path.o |
362 | LIB_OBJS += util/rbtree.o | 390 | LIB_OBJS += util/rbtree.o |
391 | LIB_OBJS += util/bitmap.o | ||
392 | LIB_OBJS += util/hweight.o | ||
393 | LIB_OBJS += util/find_next_bit.o | ||
363 | LIB_OBJS += util/run-command.o | 394 | LIB_OBJS += util/run-command.o |
364 | LIB_OBJS += util/quote.o | 395 | LIB_OBJS += util/quote.o |
365 | LIB_OBJS += util/strbuf.o | 396 | LIB_OBJS += util/strbuf.o |
@@ -369,7 +400,6 @@ LIB_OBJS += util/usage.o | |||
369 | LIB_OBJS += util/wrapper.o | 400 | LIB_OBJS += util/wrapper.o |
370 | LIB_OBJS += util/sigchain.o | 401 | LIB_OBJS += util/sigchain.o |
371 | LIB_OBJS += util/symbol.o | 402 | LIB_OBJS += util/symbol.o |
372 | LIB_OBJS += util/module.o | ||
373 | LIB_OBJS += util/color.o | 403 | LIB_OBJS += util/color.o |
374 | LIB_OBJS += util/pager.o | 404 | LIB_OBJS += util/pager.o |
375 | LIB_OBJS += util/header.o | 405 | LIB_OBJS += util/header.o |
@@ -382,6 +412,9 @@ LIB_OBJS += util/trace-event-parse.o | |||
382 | LIB_OBJS += util/trace-event-read.o | 412 | LIB_OBJS += util/trace-event-read.o |
383 | LIB_OBJS += util/trace-event-info.o | 413 | LIB_OBJS += util/trace-event-info.o |
384 | LIB_OBJS += util/svghelper.o | 414 | LIB_OBJS += util/svghelper.o |
415 | LIB_OBJS += util/sort.o | ||
416 | LIB_OBJS += util/hist.o | ||
417 | LIB_OBJS += util/data_map.o | ||
385 | 418 | ||
386 | BUILTIN_OBJS += builtin-annotate.o | 419 | BUILTIN_OBJS += builtin-annotate.o |
387 | BUILTIN_OBJS += builtin-help.o | 420 | BUILTIN_OBJS += builtin-help.o |
@@ -424,8 +457,12 @@ ifeq ($(uname_S),Darwin) | |||
424 | PTHREAD_LIBS = | 457 | PTHREAD_LIBS = |
425 | endif | 458 | endif |
426 | 459 | ||
460 | ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) | ||
461 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]); | ||
462 | endif | ||
463 | |||
427 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) | 464 | ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) |
428 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]); | 465 | msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel); |
429 | endif | 466 | endif |
430 | 467 | ||
431 | ifneq ($(shell sh -c "(echo '\#include <libdwarf/dwarf.h>'; echo '\#include <libdwarf/libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) | 468 | ifneq ($(shell sh -c "(echo '\#include <libdwarf/dwarf.h>'; echo '\#include <libdwarf/libdwarf.h>'; echo 'int main(void) { Dwarf_Debug dbg; Dwarf_Error err; Dwarf_Ranges *rng; dwarf_init(0, DW_DLC_READ, 0, 0, &dbg, &err); dwarf_get_ranges(dbg, 0, &rng, 0, 0, &err); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -ldwarf -lelf -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y) |
@@ -795,6 +832,19 @@ util/config.o: util/config.c PERF-CFLAGS | |||
795 | util/rbtree.o: ../../lib/rbtree.c PERF-CFLAGS | 832 | util/rbtree.o: ../../lib/rbtree.c PERF-CFLAGS |
796 | $(QUIET_CC)$(CC) -o util/rbtree.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | 833 | $(QUIET_CC)$(CC) -o util/rbtree.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< |
797 | 834 | ||
835 | # some perf warning policies can't fit to lib/bitmap.c, eg: it warns about variable shadowing | ||
836 | # from <string.h> that comes from kernel headers wrapping. | ||
837 | KBITMAP_FLAGS=`echo $(ALL_CFLAGS) | sed s/-Wshadow// | sed s/-Wswitch-default// | sed s/-Wextra//` | ||
838 | |||
839 | util/bitmap.o: ../../lib/bitmap.c PERF-CFLAGS | ||
840 | $(QUIET_CC)$(CC) -o util/bitmap.o -c $(KBITMAP_FLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | ||
841 | |||
842 | util/hweight.o: ../../lib/hweight.c PERF-CFLAGS | ||
843 | $(QUIET_CC)$(CC) -o util/hweight.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | ||
844 | |||
845 | util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS | ||
846 | $(QUIET_CC)$(CC) -o util/find_next_bit.o -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $< | ||
847 | |||
798 | perf-%$X: %.o $(PERFLIBS) | 848 | perf-%$X: %.o $(PERFLIBS) |
799 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) | 849 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
800 | 850 | ||