1. 03 Dec, 2009 3 commits
  2. 02 Dec, 2009 8 commits
  3. 01 Dec, 2009 19 commits
    • Lai Jiangshan's avatar
      trace_syscalls: Remove unused syscall_name_to_nr() · 7be077f5
      Lai Jiangshan authored
      After duplications are removed, syscall_name_to_nr() is unused.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D2A6.6060803@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7be077f5
    • Lai Jiangshan's avatar
      trace_syscalls: Simplify syscall profile · 3bbe84e9
      Lai Jiangshan authored
      use only one prof_sysenter_enable() instead of
      prof_sysenter_enable_##sname()
      
      use only one prof_sysenter_disable() instead of
      prof_sysenter_disable_##sname()
      
      use only one prof_sysexit_enable() instead of
      prof_sysexit_enable_##sname()
      
      use only one prof_sysexit_disable() instead of
      prof_sysexit_disable_##sname()
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D2A1.8060304@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      3bbe84e9
    • Lai Jiangshan's avatar
      trace_syscalls: Remove duplicate init_enter_##sname() · a1301da0
      Lai Jiangshan authored
      use only one init_syscall_trace instead of
      many init_enter_##sname()/init_exit_##sname()
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D29B.6090708@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a1301da0
    • Lai Jiangshan's avatar
      trace_syscalls: Add syscall_nr field to struct syscall_metadata · c252f657
      Lai Jiangshan authored
      Add syscall_nr field to struct syscall_metadata,
      it helps us to get syscall number easier.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D293.6090800@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c252f657
    • Lai Jiangshan's avatar
      trace_syscalls: Remove enter_id exit_id · fcc19438
      Lai Jiangshan authored
      use ->enter_event->id instead of ->enter_id
      use ->exit_event->id instead of ->exit_id
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D288.7030001@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      fcc19438
    • Lai Jiangshan's avatar
      trace_syscalls: Set event_enter_##sname->data to its metadata · 31c16b13
      Lai Jiangshan authored
      Set event_enter_##sname->data to its metadata,
      it makes codes simpler.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D282.7050709@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      31c16b13
    • Lai Jiangshan's avatar
      trace_syscalls: Remove unused event_syscall_enter and event_syscall_exit · bf56a4ea
      Lai Jiangshan authored
      fix event_enter_##sname->event
      fix event_exit_##sname->event
      
      remove unused event_syscall_enter and event_syscall_exit
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Acked-by: default avatarJason Baron <jbaron@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <4B14D278.4090209@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bf56a4ea
    • Xiao Guangrong's avatar
      perf_event: Initialize data.period in perf_swevent_hrtimer() · 59d069eb
      Xiao Guangrong authored
      In current code in perf_swevent_hrtimer(), data.period is not
      initialized, The result is obvious wrong:
      
       # ./perf record -f -e cpu-clock make
       # ./perf report
       # Samples: 1740
       #
       # Overhead   Command                                   ......
       # ........  ........  ..........................................
       #
         1025422183050275328.00%        sh  libc-2.9.90.so ...
         1025422183050275328.00%      perl  libperl.so     ...
         1025422168240043264.00%      perl  [kernel]       ...
         1025422030011210752.00%      perl  [kernel]       ...
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: <stable@kernel.org>
      LKML-Reference: <4B14E220.2050107@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      59d069eb
    • Masami Hiramatsu's avatar
      perf probe: Simplify event naming · b498ce1f
      Masami Hiramatsu authored
      Simplify event naming as <symbol>_<seqnum>. Each event name is
      globally unique (group name is not checked). So, if there is
      schedule_0, next probe event on schedule() will be schedule_1.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201002024.10235.2353.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b498ce1f
    • Masami Hiramatsu's avatar
      perf probe: Add --list option for listing current probe events · 4de189fe
      Masami Hiramatsu authored
      Add --list option for listing currently defined probe events
      in the kernel. This shows events in below format;
      
       [group:event]	<perf-probe probe-definition>
      
      for example:
      
       [probe:schedule_0]	schedule+30 cpu
      
      Note that source file/line information is not supported yet.
      So even if you added a probe by line, it will be shown in
      <symbol+offset>.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201002017.10235.76575.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4de189fe
    • Masami Hiramatsu's avatar
      perf probe: Add argv_split() from lib/argv_split.c · e1c01d61
      Masami Hiramatsu authored
      Add argv_split() ported from lib/argv_split.c to string.c and
      use it in util/probe-event.c.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201002005.10235.55602.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e1c01d61
    • Masami Hiramatsu's avatar
      perf probe: Move probe event utility functions to probe-event.c · 50656eec
      Masami Hiramatsu authored
      Split probe event (kprobe-events and perf probe events) utility
      functions from builtin-probe.c to probe-event.c.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001958.10235.90243.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      50656eec
    • Masami Hiramatsu's avatar
      perf probe: Fix probe array index for multiple probe points · 934b1f5f
      Masami Hiramatsu authored
      Fix the index of formatted probe array for multiple probe
      points, which should be probes[i] instead of probes[0].
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001950.10235.54781.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      934b1f5f
    • Masami Hiramatsu's avatar
      perf probe: Fix argv array size in probe parser · 74ca4c0e
      Masami Hiramatsu authored
      Since the syntax has been changed, probe definition needs
      parameters less than MAX_PROBE_ARGS + 1 (probe-point +
      arguments).
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001943.10235.80367.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      74ca4c0e
    • Masami Hiramatsu's avatar
      perf probe: Add probe-finder.h without libdwarf · 57d250df
      Masami Hiramatsu authored
      Add probe-finder.h as LIB_H without libdwarf, because that
      header is included even if no libdwarf.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001934.10235.44656.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      57d250df
    • Masami Hiramatsu's avatar
      perf probe: Change a debugging message from pr_info to pr_debug · f41b1e43
      Masami Hiramatsu authored
      Change annoying debug-info using notice from pr_info() to
      pr_debug(), since the message always printed when user adds a
      probe point which requires debug-info.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001927.10235.63645.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f41b1e43
    • Masami Hiramatsu's avatar
      trace_kprobes: Fix a memory leak bug and check kstrdup() return value · ba8665d7
      Masami Hiramatsu authored
      Fix a memory leak case in create_trace_probe(). When an argument
      is too long (> MAX_ARGSTR_LEN), it just jumps to error path. In
      that case tp->args[i].name is not released.
      This also fixes a bug to check kstrdup()'s return value.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: systemtap <systemtap@sources.redhat.com>
      Cc: DLE <dle-develop@lists.sourceforge.net>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <20091201001919.10235.56455.stgit@harusame>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ba8665d7
    • Li Zefan's avatar
      perf timechart: Remove open-coded event parsing code · 5cbd0805
      Li Zefan authored
      Convert builtin-timechart.c to mmap_dispatch_perf_file() +
      perf_file_handler.
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Acked-by: default avatarArjan van de Ven <arjan@infradead.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <4B14B21C.2040406@cn.fujitsu.com>
      [ v2: cleaned up the printout, fixed a whitespace detail ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      5cbd0805
    • Li Zefan's avatar
      perf annotate: Fix perf data parsing · bab81b62
      Li Zefan authored
      perf-annotate doesn't parse perf.data correctly in that it
      doesn't read perf header. Fix this by using
      mmap_dispatch_perf_file().
      
      Before:
      
      TOTAL events:      17565
            MMAP events:       3221
            LOST events:         10
            COMM events:        235
            EXIT events:          2
        THROTTLE events:          1
      UNTHROTTLE events:          2
            FORK events:         10
            READ events:          1
          SAMPLE events:      14083
      
      After:
      
      TOTAL events:      17290
            MMAP events:       3203
            LOST events:          0
            COMM events:        234
            EXIT events:          1
        THROTTLE events:          0
      UNTHROTTLE events:          0
            FORK events:          0
            READ events:          0
          SAMPLE events:      13852
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Arjan van de Ven <arjan@infradead.org>
      LKML-Reference: <4B14B201.9030708@cn.fujitsu.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bab81b62
  4. 30 Nov, 2009 4 commits
  5. 28 Nov, 2009 6 commits
    • Ingo Molnar's avatar
      perf scripting: Fix build · cf72344d
      Ingo Molnar authored
      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: default avatarIngo Molnar <mingo@elte.hu>
      cf72344d
    • Tom Zanussi's avatar
      perf trace: Add a scripts/perl/bin for perf trace shell scripts · 1ae4a971
      Tom Zanussi authored
      To capture the relevant events for a given Perl script and to
      avoid having to continually remember and type in long
      command-lines, add a scripts/perl/bin directory containing two
      simple shell scripts for each Perl script, one for recording and
      one for processing/display. For example, to record perf data for
      the rw-by-pid.pl script, run scripts/perl/bin/rw-by-pid-record
      and to actually run the script and display the output run
      scripts/perl/bin/rw-by-pid-report.
      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-8-git-send-email-tzanussi@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      1ae4a971
    • Tom Zanussi's avatar
      perf trace: Add Documentation for perf trace Perl support · 89fbf0b8
      Tom Zanussi authored
      Adds perf-trace-perl Documentation and a link to it from the
      perf-trace page.
      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-7-git-send-email-tzanussi@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      89fbf0b8
    • Tom Zanussi's avatar
      perf trace: Add interface to access perf data from Perl handlers · d1b93772
      Tom Zanussi authored
      The Perl scripting support for perf trace allows most of a trace
      event's data to be accessed directly as handler arguments, but
      not all of it e.g. the less common fields aren't passed in.  To
      give scripts access to the other fields and/or any other data or
      metadata in the main perf executable that might be useful, a way
      to access the C data in perf from Perl is needed; this patch
      uses the Perl XS facility to do it for the common_xxx event
      fields not passed to handler functions.
      
      Context.pm exports three functions to Perl scripts that access
      fields for the current event by calling back into perf:
      common_pc(), common_flags() and common_lock_depth().  Support
      for common_flags() field values was added to Core.pm and a
      script used to sanity check these and other basic scripting
      features, check-perf-trace.pl, was also added.
      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-6-git-send-email-tzanussi@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      d1b93772
    • Tom Zanussi's avatar
      perf trace: Add perf trace scripting support modules for Perl · bcefe12e
      Tom Zanussi authored
      Add Perf-Trace-Util Perl module and some scripts that use it.
      Core.pm contains Perl code to define and access flag and
      symbolic fields. Util.pm contains general-purpose utility
      functions.
      
      Also adds some makefile bits to install them in
      libexec/perf-core/scripts/perl (or wherever perfexec_instdir
      points).
      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-5-git-send-email-tzanussi@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      bcefe12e
    • 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