Stephane Eranian f8f4b28722 perf tools: Fix strlen() bug in perf_event__synthesize_event_type()
The event_type record has a max length for the event name.

It's called MAX_EVENT_NAME.

The name may be truncated to fit the max length. But the header.size still
reflects the original name length. If that length is > MAX_EVENT_NAME, then the
header.size field is bogus. Fix this by using the length of the name after the
potential truncation.

Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120120094912.GA4882@quad
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-01-24 20:31:34 -02:00
..
2011-02-16 13:30:48 +01:00
2011-08-18 07:46:13 -03:00
2012-01-24 19:47:37 -02:00
2012-01-24 19:47:37 -02:00
2012-01-24 19:47:37 -02:00
2009-06-27 06:06:39 +02:00
2010-08-21 11:22:47 -03:00
2012-01-24 20:31:02 -02:00
2010-05-14 20:05:21 -03:00
2012-01-24 19:47:37 -02:00
2012-01-24 19:47:37 -02:00
2012-01-24 19:47:37 -02:00
2012-01-24 19:47:37 -02:00