kernel-ark/tools/perf
Ingo Molnar 65014ab361 perf tools: Work around strict aliasing related warnings
Older versions of GCC are rather stupid about strict aliasing:

  util/trace-event-parse.c: In function 'parse_cmdlines':
  util/trace-event-parse.c:93: warning: dereferencing type-punned pointer will break strict-aliasing rules
  util/trace-event-parse.c: In function 'parse_proc_kallsyms':
  util/trace-event-parse.c:155: warning: dereferencing type-punned pointer will break strict-aliasing rules
  util/trace-event-parse.c:157: warning: dereferencing type-punned pointer will break strict-aliasing rules
  util/trace-event-parse.c:158: warning: dereferencing type-punned pointer will break strict-aliasing rules
  util/trace-event-parse.c: In function 'parse_ftrace_printk':
  util/trace-event-parse.c:294: warning: dereferencing type-punned pointer will break strict-aliasing rules
  util/trace-event-parse.c:295: warning: dereferencing type-punned pointer will break strict-aliasing rules
  make: *** [util/trace-event-parse.o] Error 1

Make it clear to GCC that we intend with those pointers, by passing
them through via an explicit (void *) cast.

We might want to add -fno-strict-aliasing as well, like the kernel
itself does.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-02 14:56:33 +02:00
..
Documentation perf tools: Add missing parameters documentation 2009-08-31 10:04:47 +02:00
util perf tools: Work around strict aliasing related warnings 2009-09-02 14:56:33 +02:00
.gitignore
builtin-annotate.c perf tools: Librarize idle thread registration 2009-08-31 10:04:48 +02:00
builtin-help.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-record.c perf tools: Only save the event formats we need 2009-08-28 07:58:11 +02:00
builtin-report.c perf tools: Librarize idle thread registration 2009-08-31 10:04:48 +02:00
builtin-stat.c perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00
builtin-top.c perf top: Show RIP only in verbose mode 2009-08-26 20:21:45 +02:00
builtin-trace.c perf tools: Resolve idle thread cmdline for perf trace 2009-08-31 10:04:48 +02:00
builtin.h perf tools: Factorize high level dso helpers 2009-08-12 12:02:38 +02:00
command-list.txt
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf_counter: Start documenting HAVE_PERF_COUNTERS requirements 2009-06-12 19:37:30 +02:00
Makefile perf tools: Clean up warnings list in the Makefile 2009-09-02 14:50:23 +02:00
perf.c perf tools: Add perf trace 2009-08-17 16:32:39 +02:00
perf.h perf tools: Librarize trace_event() helper 2009-08-16 23:06:45 +02:00