]> git.baikalelectronics.ru Git - kernel.git/commit
perf trace: Add Perl scripting support
authorTom Zanussi <tzanussi@gmail.com>
Wed, 25 Nov 2009 07:15:48 +0000 (01:15 -0600)
committerIngo Molnar <mingo@elte.hu>
Sat, 28 Nov 2009 09:04:26 +0000 (10:04 +0100)
commit1045a1bcaf858bec832884f6fd57d77605af2796
tree4e7fdb4f84a1fba8b299c61a97bc76a8033e0565
parent9c2c2b805ef342afaea0df23655e36a020a39cb8
perf trace: Add Perl scripting support

Implement trace_scripting_ops to make Perl a supported perf
trace scripting language.

Additionally adds code that allows Perl trace scripts to access
the 'flag' and 'symbolic' (__print_flags(), __print_symbolic())
field information parsed from the trace format files.

Also adds the Perl implementation of the generate_script()
trace_scripting_op, which creates a ready-to-run perf trace Perl
script based on existing trace data.  Scripts generated by this
implementation print out all the fields for each event mentioned
in perf.data (and will detect and generate the proper scripting
code for 'flag' and 'symbolic' fields), and will additionally
generate handlers for the special 'trace_unhandled',
'trace_begin' and 'trace_end' handlers.  Script authors can
simply remove the printing code to implement their own custom
event handling.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
Cc: anton@samba.org
Cc: hch@infradead.org
LKML-Reference: <1259133352-23685-4-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/Makefile
tools/perf/builtin-trace.c
tools/perf/util/trace-event-parse.c
tools/perf/util/trace-event-perl.c [new file with mode: 0644]
tools/perf/util/trace-event-perl.h [new file with mode: 0644]
tools/perf/util/trace-event.h