From: Tom Zanussi Date: Fri, 18 Jan 2013 19:51:27 +0000 (-0600) Subject: perf script: hook up perf_scripting_context->pevent X-Git-Tag: v3.9-rc1~173^2~13^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2de9533d6d61d3086a7079bf142d2bfa374e664e;p=pandora-kernel.git perf script: hook up perf_scripting_context->pevent Running the check-perf-trace scripts causes segfaults in both the Perl and Python cases: # perf script record check-perf-trace # perf script -s libexec/perf-core/scripts/python/check-perf-trace.py trace_begin Segmentation fault (core dumped) The reason is that the 'pevent' field was added to perf_scripting_context but it wasn't hooked up with an actual pevent in either case, so when one of the 'common' fields is accessed (in util/trace-event-parse.c:get_common_fields()), pevent->events tries to dereference a NULL pointer. This sets the pevent field when the scripting context is set up. Signed-off-by: Tom Zanussi Link: http://lkml.kernel.org/r/d2b1b8166a6ca0a36e1f5255b88a8289058ba236.1358527965.git.tom.zanussi@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed