1. 08 Feb, 2013 11 commits
  2. 06 Feb, 2013 24 commits
  3. 03 Feb, 2013 1 commit
  4. 01 Feb, 2013 2 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Init current_trace to nop_trace and remove NULL checks · d840f718
      Steven Rostedt (Red Hat) authored
      On early boot up, when the ftrace ring buffer is initialized, the
      static variable current_trace is initialized to &nop_trace.
      Before this initialization, current_trace is NULL and will never
      become NULL again. It is always reassigned to a ftrace tracer.
      
      Several places check if current_trace is NULL before it uses
      it, and this check is frivolous, because at the point in time
      when the checks are made the only way current_trace could be
      NULL is if ftrace failed its allocations at boot up, and the
      paths to these locations would probably not be possible.
      
      By initializing current_trace to &nop_trace where it is declared,
      current_trace will never be NULL, and we can remove all these
      checks of current_trace being NULL which never needed to be
      checked in the first place.
      
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      d840f718
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · 9c4c5fd9
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      . Make some POWER7 events available in sysfs, equivalent to
        what was done on x86, from Sukadev Bhattiprolu.
      
      . Add event group view, from Namyung Kim:
      
        To use it, 'perf record' should group events when recording. And then perf
        report parses the saved group relation from file header and prints them
        together if --group option is provided.  You can use 'perf evlist' command to
        see event group information:
      
          $ perf record -e '{ref-cycles,cycles}' noploop 1
          [ perf record: Woken up 2 times to write data ]
          [ perf record: Captured and wrote 0.385 MB perf.data (~16807 samples) ]
      
          $ perf evlist --group
          {ref-cycles,cycles}
      
        With this example, default perf report will show you each event
        separately like this:
      
          $ perf report
          ...
          # group: {ref-cycles,cycles}
          # ========
          # Samples: 3K of event 'ref-cycles'
          # Event count (approx.): 3153797218
          #
          # Overhead  Command      Shared Object                      Symbol
          # ........  .......  .................  ..........................
              99.84%  noploop  noploop            [.] main
               0.07%  noploop  ld-2.15.so         [.] strcmp
               0.03%  noploop  [kernel.kallsyms]  [k] timerqueue_del
               0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
               0.02%  noploop  [kernel.kallsyms]  [k] account_user_time
               0.01%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
               0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
      
          # Samples: 3K of event 'cycles'
          # Event count (approx.): 3722310525
          #
          # Overhead  Command      Shared Object                     Symbol
          # ........  .......  .................  .........................
              99.76%  noploop  noploop            [.] main
               0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
               0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
               0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
               0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
               0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
               0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
      
        In this case the event group information will be shown in the end of
        header area.  So you can use --group option to enable event group view.
      
          $ perf report --group
          ...
          # group: {ref-cycles,cycles}
          # ========
          # Samples: 7K of event 'anon group { ref-cycles, cycles }'
          # Event count (approx.): 6876107743
          #
          #         Overhead  Command      Shared Object                      Symbol
          # ................  .......  .................  ..........................
              99.84%  99.76%  noploop  noploop            [.] main
               0.07%   0.00%  noploop  ld-2.15.so         [.] strcmp
               0.03%   0.00%  noploop  [kernel.kallsyms]  [k] timerqueue_del
               0.03%   0.03%  noploop  [kernel.kallsyms]  [k] sched_clock_cpu
               0.02%   0.00%  noploop  [kernel.kallsyms]  [k] account_user_time
               0.01%   0.00%  noploop  [kernel.kallsyms]  [k] __alloc_pages_nodemask
               0.00%   0.00%  noploop  [kernel.kallsyms]  [k] native_write_msr_safe
               0.00%   0.11%  noploop  [kernel.kallsyms]  [k] _raw_spin_lock
               0.00%   0.06%  noploop  [kernel.kallsyms]  [k] find_get_page
               0.00%   0.02%  noploop  [kernel.kallsyms]  [k] rcu_check_callbacks
               0.00%   0.02%  noploop  [kernel.kallsyms]  [k] __current_kernel_time
      
        As you can see the Overhead column now contains both of ref-cycles and
        cycles and header line shows group information also - 'anon group {
        ref-cycles, cycles }'.  The output is sorted by period of group leader
        first.
      
        If perf.data file doesn't contain group information, this --group
        option does nothing.  So if you want enable event group view by
        default you can set it in ~/.perfconfig file:
      
          $ cat ~/.perfconfig
          [report]
          group = true
      
        It can be overridden with command line if you want:
      
          $ perf report --no-group
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9c4c5fd9
  5. 31 Jan, 2013 2 commits
    • Sukadev Bhattiprolu's avatar
      perf: Document the ABI of perf sysfs entries · 2ac3634a
      Sukadev Bhattiprolu authored
      This patchset addes two new sets of files to sysfs for POWER architecture.
      
      	- perf event config format in /sys/devices/cpu/format/event
      	- generic and POWER-specific perf events in /sys/devices/cpu/events/
      
      The format of the first file is already documented in:
      
      	sysfs-bus-event_source-devices-format
      
      Document the format of the second set of files '/sys/devices/cpu/events/*'
      which would also become part of the ABI.
      
      Changelog[v4]:
      	[Jiri Olsa]: Mention that multiple event= like terms can be specified
      	in the 'events' file.
      	[Jiri Olsa]: Remove the documentation for the 'config format' file
      	as it is already documented in 'Documentation/ABI/testing/'.
      	[Jiri Olsa]: Move ABI documentation from 'stable/' to 'testing/'
      
      Changelog[v3]:
      	[Greg KH] Include ABI documentation.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Anton Blanchard <anton@au1.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: linuxppc-dev@ozlabs.org
      Link: http://lkml.kernel.org/r/20130123062645.GG13720@us.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2ac3634a
    • Sukadev Bhattiprolu's avatar
      perf/POWER7: Make some POWER7 events available in sysfs · 886c3b2d
      Sukadev Bhattiprolu authored
      Make some POWER7-specific perf events available in sysfs.
      
      	$ /bin/ls -1 /sys/bus/event_source/devices/cpu/events/
      	branch-instructions
      	branch-misses
      	cache-misses
      	cache-references
      	cpu-cycles
      	instructions
      	PM_BRU_FIN
      	PM_BRU_MPRED
      	PM_CMPLU_STALL
      	PM_CYC
      	PM_GCT_NOSLOT_CYC
      	PM_INST_CMPL
      	PM_LD_MISS_L1
      	PM_LD_REF_L1
      	stalled-cycles-backend
      	stalled-cycles-frontend
      
      where the 'PM_*' events are POWER specific and the others are the
      generic events.
      
      This will enable users to specify these events with their symbolic
      names rather than with their raw code.
      
      	perf stat -e 'cpu/PM_CYC' ...
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Anton Blanchard <anton@au1.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: linuxppc-dev@ozlabs.org
      Link: http://lkml.kernel.org/r/20130123062528.GE13720@us.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      886c3b2d