1. 10 Mar, 2016 3 commits
    • Sukadev Bhattiprolu's avatar
      powerpc/perf/hv-24x7: Fix usage with chip events. · e5a5886d
      Sukadev Bhattiprolu authored
      24x7 counters can belong to different domains (core, chip, virtual CPU
      etc). For events in the 'chip' domain, sysfs entry currently looks like:
      
      	$ cd /sys/bus/event_source/devices/hv_24x7/events
      	$ cat PM_XLINK_CYCLES__PHYS_CHIP
      	domain=0x1,offset=0x230,core=?,lpar=0x0
      
      where the required parameter, 'core=?' is specified with perf as:
      
      	perf stat -C 0 -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,core=1/ \
      		/bin/true
      
      This is inconsistent in that 'core' is a required parameter for a chip
      event.  Instead, have the the sysfs entry display 'chip=?' for chip
      events:
      
      	$ cd /sys/bus/event_source/devices/hv_24x7/events
      	$ cat PM_XLINK_CYCLES__PHYS_CHIP
      	domain=0x1,offset=0x230,chip=?,lpar=0x0
      
      We also need to add a 'chip' entry in the sysfs format directory:
      
      	$ ls /sys/bus/event_source/devices/hv_24x7/format
      	chip  core  domain  lpar  offset  vcpu
      	^^^^
      	(new)
      
      so the perf tool can automatically check usage and format the chip
      parameter correctly:
      
      	$ perf stat -C 0 -v -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP/ \
      		/bin/true
      	Required parameter 'chip' not specified
      	invalid or unsupported event: 'hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP/'
      
      	$ perf stat -C 0 -v -e hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/ \
      		/bin/true
      	hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/: 0 6628908 6628908
      
      	 Performance counter stats for 'CPU(s) 0':
      
      	         0      hv_24x7/PM_XLINK_CYCLES__PHYS_CHIP,chip=1/
      
      	    0.006606970 seconds time elapsed
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e5a5886d
    • Sukadev Bhattiprolu's avatar
      powerpc/perf: Export Power8 generic and cache events to sysfs · e0728b50
      Sukadev Bhattiprolu authored
      Power8 supports a large number of events in each susbystem so when a
      user runs:
      
      	perf stat -e branch-instructions sleep 1
      	perf stat -e L1-dcache-loads sleep 1
      
      it is not clear as to which PMU events were monitored.
      
      Export the generic hardware and cache perf events for Power8 to sysfs,
      so users can precisely determine the PMU event monitored by the generic
      event.
      
      Eg:
      	cat /sys/bus/event_source/devices/cpu/events/branch-instructions
      	event=0x10068
      
      	$ cat /sys/bus/event_source/devices/cpu/events/L1-dcache-loads
      	event=0x100ee
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e0728b50
    • Sukadev Bhattiprolu's avatar
      powerpc/perf: Remove PME_ prefix for power7 events · d4969e24
      Sukadev Bhattiprolu authored
      We used the PME_ prefix earlier to avoid some macro/variable name
      collisions.  We have since changed the way we define/use the event
      macros so we no longer need the prefix.
      
      By dropping the prefix, we keep the the event macros consistent with
      their official names.
      Reported-by: default avatarMichael Ellerman <ellerman@au1.ibm.com>
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      d4969e24
  2. 09 Mar, 2016 22 commits
  3. 08 Mar, 2016 14 commits
  4. 03 Mar, 2016 1 commit