• Tom Zanussi's avatar
    perf trace: Add Perl scripting support · 16c632de
    Tom Zanussi authored
    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: default avatarTom 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: default avatarIngo Molnar <mingo@elte.hu>
    16c632de
trace-event-perl.c 13 KB