Skip to content

Commit

Permalink
oprofile, s390: Add support for hardware based sampling on System z p…
Browse files Browse the repository at this point in the history
…rocessors

This adds support for hardware based sampling on System z processors
(models z10 and up).

System z's hardware sampling is described in detail in:

   SA23-2260-01 "The Load-Program-Parameter and CPU-Measurement Facilities"

The patch introduces

 - support for System z's hardware sampler in OProfile's kernel module
 - it adds functions that control all hardware sampling related
   operations as:
   - checking if hardware sampling feature is available, i.e.: on
     System z models z10 and up, in LPAR mode only, and authorised
     during LPAR activation
   - allocating memory for the hardware sampling feature
   - starting/stopping hardware sampling

All functions required to start and stop hardware sampling have to be
invoked by the oprofile kernel module as provided by the other patches
of this patch set.

In case hardware based sampling cannot be setup standard timer based
sampling is used by OProfile.

Applied with following changes:
* enable compilation in Makefile

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Maran Pakkirisamy <maranp@linux.vnet.ibm.com>
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Heinz Graalfs authored and Robert Richter committed Feb 15, 2011
1 parent 54ebbe7 commit ec6a3df
Show file tree
Hide file tree
Showing 5 changed files with 1,374 additions and 1 deletion.
3 changes: 3 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ config OPROFILE_EVENT_MULTIPLEX
config HAVE_OPROFILE
bool

config HAVE_HWSAMPLER
bool

config KPROBES
bool "Kprobes"
depends on MODULES
Expand Down
1 change: 1 addition & 0 deletions arch/s390/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ config S390
select ARCH_INLINE_WRITE_UNLOCK_BH
select ARCH_INLINE_WRITE_UNLOCK_IRQ
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE
select HAVE_HWSAMPLER

config SCHED_OMIT_FRAME_POINTER
def_bool y
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/oprofile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
oprofilefs.o oprofile_stats.o \
timer_int.o )

oprofile-y := $(DRIVER_OBJS) init.o backtrace.o
oprofile-y := $(DRIVER_OBJS) init.o backtrace.o hwsampler.o
Loading

0 comments on commit ec6a3df

Please sign in to comment.