13 Sep, 2011

1 commit

  • The oprofilefs_lock can be taken in atomic context (in profiling
    interrupts) and therefore cannot cannot be preempted on -rt -
    annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

27 Jul, 2011

1 commit

  • This allows us to move duplicated code in
    (atomic_inc_not_zero() for now) to

    Signed-off-by: Arun Sharma
    Reviewed-by: Eric Dumazet
    Cc: Ingo Molnar
    Cc: David Miller
    Cc: Eric Dumazet
    Acked-by: Mike Frysinger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arun Sharma
     

15 Feb, 2011

3 commits

  • This patch is a rework of the hwsampler oprofile implementation that
    has been applied recently. Now there are less non-architectural
    changes. The only changes are:

    * introduction of oprofile_add_ext_hw_sample(), and
    * removal of section attributes of oprofile_timer_init/_exit().

    To setup hwsampler for oprofile we need to modify start()/stop()
    callbacks and additional hwsampler control files in oprofilefs. We do
    not reinitialize the timer or hwsampler mode by restarting calling
    init/exit() anymore, instead hwsampler_running is used to switch the
    mode directly in oprofile_hwsampler_start/_stop(). For locking reasons
    there is also hwsampler_file that reflects the value in oprofilefs.

    The overall diffstat of the oprofile s390 hwsampler implemenation
    shows the low impact to non-architectural code:

    arch/Kconfig | 3 +
    arch/s390/Kconfig | 1 +
    arch/s390/oprofile/Makefile | 2 +-
    arch/s390/oprofile/hwsampler.c | 1256 ++++++++++++++++++++++++++++++++++
    arch/s390/oprofile/hwsampler.h | 113 +++
    arch/s390/oprofile/hwsampler_files.c | 162 +++++
    arch/s390/oprofile/init.c | 6 +-
    drivers/oprofile/cpu_buffer.c | 24 +-
    drivers/oprofile/timer_int.c | 4 +-
    include/linux/oprofile.h | 7 +
    10 files changed, 1567 insertions(+), 11 deletions(-)

    Acked-by: Heiko Carstens
    Signed-off-by: Robert Richter

    Robert Richter
     
  • OProfile is enhanced to export all files for controlling System z's
    hardware sampling, and to invoke hwsampler exported functions to
    initialize and use System z's hardware sampling.

    The patch invokes hwsampler_setup() during oprofile init and exports
    following hwsampler files under oprofilefs if hwsampler's setup
    succeeded:

    A new directory for hardware sampling based files

    /dev/oprofile/hwsampling/

    The userland daemon must explicitly write to the following files
    to disable (or enable) hardware based sampling

    /dev/oprofile/hwsampling/hwsampler

    to modify the actual sampling rate

    /dev/oprofile/hwsampling/hw_interval

    to modify the amount of sampling memory (measured in 4K pages)

    /dev/oprofile/hwsampling/hw_sdbt_blocks

    The following files are read only and show
    the possible minimum sampling rate

    /dev/oprofile/hwsampling/hw_min_interval

    the possible maximum sampling rate

    /dev/oprofile/hwsampling/hw_max_interval

    The patch splits the oprofile_timer_[init/exit] function so that it
    can be also called through user context (oprofilefs) to avoid kernel
    oops.

    Applied with following changes:
    * whitespace changes in Makefile and timer_int.c

    Signed-off-by: Mahesh Salgaonkar
    Signed-off-by: Maran Pakkirisamy
    Signed-off-by: Heinz Graalfs
    Acked-by: Heiko Carstens
    Signed-off-by: Robert Richter

    Heinz Graalfs
     
  • This patch introduces a new oprofile sample add function
    (oprofile_add_ext_hw_sample) that can also take task_struct as an
    argument, which is used by the hwsampler kernel module when copying
    hardware samples to OProfile buffers.

    Applied with following changes:
    * removed #include
    * whitespace changes
    * removed conditional compilation (CONFIG_HAVE_HWSAMPLER)
    * modified order of functions
    * fix missing function definition in header file

    Signed-off-by: Mahesh Salgaonkar
    Signed-off-by: Maran Pakkirisamy
    Signed-off-by: Heinz Graalfs
    Acked-by: Heiko Carstens
    Signed-off-by: Robert Richter

    Heinz Graalfs
     

27 Jan, 2011

2 commits

  • Always allow backtraces when using oprofile on ARM, even if a PMU
    isn't present. Restores functionality originally introduced in commit
    1b7b56982fdcd9d85effd76f3928cf5d6eb26155 ("oprofile: Always allow
    backtraces on ARM") by Richard Purdie.

    It is not that obvious, but there is now only one oprofile_arch_init()
    function. So the .backtrace callback is available also in timer mode.

    Implemented by removing code and using stubs for oprofile_perf_{init,
    exit} provided by . This allows cleaning of other
    architecture specific implementations too.

    Cc: stable@kernel.org # 37.x
    Signed-off-by: Ari Kauppi
    Acked-by: Will Deacon
    Signed-off-by: Robert Richter

    Ari Kauppi
     
  • The implementations are flagged in Makefile with CONFIG_HW_PERF_EVENTS
    instead of CONFIG_PERF_EVENTS.

    Cc: stable@kernel.org # 37.x
    Signed-off-by: Ari Kauppi
    Signed-off-by: Robert Richter

    Ari Kauppi
     

15 Oct, 2010

1 commit

  • Commit e9677b3ce (oprofile, ARM: Use oprofile_arch_exit() to
    cleanup on failure) caused oprofile_perf_exit to be called
    in the cleanup path of oprofile_perf_init. The __exit tag
    for oprofile_perf_exit should therefore be dropped.

    The same has to be done for exit_driverfs as well, as this
    function is called from oprofile_perf_exit. Else, we get
    the following two linker errors.

    LD .tmp_vmlinux1
    `oprofile_perf_exit' referenced in section `.init.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
    make: *** [.tmp_vmlinux1] Error 1

    LD .tmp_vmlinux1
    `exit_driverfs' referenced in section `.text' of arch/arm/oprofile/built-in.o: defined in discarded section `.exit.text' of arch/arm/oprofile/built-in.o
    make: *** [.tmp_vmlinux1] Error 1

    Signed-off-by: Anand Gadiyar
    Cc: Will Deacon
    Signed-off-by: Robert Richter

    Anand Gadiyar
     

11 Oct, 2010

2 commits

  • Move the perf-events backend from arch/arm/oprofile into
    drivers/oprofile so that the code can be shared between architectures.

    This allows each architecture to maintain only a single copy of the PMU
    accessor functions instead of one for both perf and OProfile. It also
    becomes possible for other architectures to delete much of their
    OProfile code in favour of the common code now available in
    drivers/oprofile/oprofile_perf.c.

    Signed-off-by: Matt Fleming
    Tested-by: Will Deacon
    Signed-off-by: Robert Richter

    Matt Fleming
     
  • Make op_name_from_perf_id() global so that we have a way for each
    architecture to construct an oprofile name for op->cpu_type. We need to
    remove the argument from the function prototype so that we can hide all
    implementation details inside the function.

    Signed-off-by: Matt Fleming
    Signed-off-by: Robert Richter

    Matt Fleming
     

20 Jul, 2009

1 commit

  • The number of hardware counters is limited. The multiplexing feature
    enables OProfile to gather more events than counters are provided by
    the hardware. This is realized by switching between events at an user
    specified time interval.

    A new file (/dev/oprofile/time_slice) is added for the user to specify
    the timer interval in ms. If the number of events to profile is higher
    than the number of hardware counters available, the patch will
    schedule a work queue that switches the event counter and re-writes
    the different sets of values into it. The switching mechanism needs to
    be implemented for each architecture to support multiplexing. This
    patch only implements AMD CPU support, but multiplexing can be easily
    extended for other models and architectures.

    There are follow-on patches that rework parts of this patch.

    Signed-off-by: Jason Yeh
    Signed-off-by: Robert Richter

    Jason Yeh
     

12 Jun, 2009

1 commit


11 Jun, 2009

1 commit


08 Jan, 2009

1 commit


10 Dec, 2008

1 commit


21 Oct, 2008

1 commit

  • The issue is the SPU code is not holding the kernel mutex lock while
    adding samples to the kernel buffer.

    This patch creates per SPU buffers to hold the data. Data
    is added to the buffers from in interrupt context. The data
    is periodically pushed to the kernel buffer via a new Oprofile
    function oprofile_put_buff(). The oprofile_put_buff() function
    is called via a work queue enabling the funtion to acquire the
    mutex lock.

    The existing user controls for adjusting the per CPU buffer
    size is used to control the size of the per SPU buffers.
    Similarly, overflows of the SPU buffers are reported by
    incrementing the per CPU buffer stats. This eliminates the
    need to have architecture specific controls for the per SPU
    buffers which is not acceptable to the OProfile user tool
    maintainer.

    The export of the oprofile add_event_entry() is removed as it
    is no longer needed given this patch.

    Note, this patch has not addressed the issue of indexing arrays
    by the spu number. This still needs to be fixed as the spu
    numbering is not guarenteed to be 0 to max_num_spus-1.

    Signed-off-by: Carl Love
    Signed-off-by: Maynard Johnson
    Signed-off-by: Arnd Bergmann
    Acked-by: Acked-by: Robert Richter
    Signed-off-by: Benjamin Herrenschmidt

    Carl Love
     

26 Jul, 2008

1 commit


21 Jul, 2007

1 commit

  • From: Maynard Johnson

    This patch updates the existing arch/powerpc/oprofile/op_model_cell.c
    to add in the SPU profiling capabilities. In addition, a 'cell' subdirectory
    was added to arch/powerpc/oprofile to hold Cell-specific SPU profiling code.
    Exports spu_set_profile_private_kref and spu_get_profile_private_kref which
    are used by OProfile to store private profile information in spufs data
    structures.

    Also incorporated several fixes from other patches (rrn). Check pointer
    returned from kzalloc. Eliminated unnecessary cast. Better error
    handling and cleanup in the related area. 64-bit unsigned long parameter
    was being demoted to 32-bit unsigned int and eventually promoted back to
    unsigned long.

    Signed-off-by: Carl Love
    Signed-off-by: Maynard Johnson
    Signed-off-by: Bob Nelson
    Signed-off-by: Arnd Bergmann
    Acked-by: Paul Mackerras

    Bob Nelson
     

29 Mar, 2006

2 commits

  • Mark the f_ops members of inodes as const, as well as fix the
    ripple-through this causes by places that copy this f_ops and then "do
    stuff" with it.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • On ppc64 we look at a profiling register to work out the sample address and
    if it was in userspace or kernel.

    The backtrace interface oprofile_add_sample does not allow this. Create
    oprofile_add_ext_sample and make oprofile_add_sample use it too.

    Signed-off-by: Anton Blanchard
    Cc: Philippe Elie
    Cc: John Levon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian Rogan
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds