06 Feb, 2009

1 commit


18 Jan, 2009

1 commit


08 Jan, 2009

11 commits


30 Dec, 2008

4 commits


29 Dec, 2008

2 commits


17 Dec, 2008

1 commit


11 Dec, 2008

2 commits

  • The number of lost samples could be greater than the number of
    received samples. This patches fixes this. The implementation
    introduces return values for add_sample() and add_code().

    Signed-off-by: Robert Richter

    Robert Richter
     
  • This function is no longer available after the port to the new ring
    buffer. Its removal can lead to incomplete sampling sequences since
    IBS samples and backtraces are transfered in multiple samples. Due to
    a full buffer, samples could be lost any time. The userspace daemon
    has to live with such incomplete sampling sequences as long as the
    data within one sample is consistent.

    This will be fixed by changing the internal buffer data there all data
    of one IBS sample or a backtrace is packed in a single ring buffer
    entry. This is possible since the new ring buffer supports variable
    data size.

    Signed-off-by: Robert Richter

    Robert Richter
     

10 Dec, 2008

6 commits

  • This patch replaces the current oprofile cpu buffer implementation
    with the ring buffer provided by the tracing framework. The motivation
    here is to leave the pain of implementing ring buffers to others. Oh,
    no, there are more advantages. Main reason is the support of different
    sample sizes that could be stored in the buffer. Use cases for this
    are IBS and Cell spu profiling. Using the new ring buffer ensures
    valid and complete samples and allows copying the cpu buffer stateless
    without knowing its content. Second it will use generic kernel API and
    also reduce code size. And hopefully, there are less bugs.

    Since the new tracing ring buffer implementation uses spin locks to
    protect the buffer during read/write access, it is difficult to use
    the buffer in an NMI handler. In this case, writing to the buffer by
    the NMI handler (x86) could occur also during critical sections when
    reading the buffer. To avoid this, there are 2 buffers for independent
    read and write access. Read access is in process context only, write
    access only in the NMI handler. If the read buffer runs empty, both
    buffers are swapped atomically. There is potentially a small window
    during swapping where the buffers are disabled and samples could be
    lost.

    Using 2 buffers is a little bit overhead, but the solution is clear
    and does not require changes in the ring buffer implementation. It can
    be changed to a single buffer solution when the ring buffer access is
    implemented as non-locking atomic code.

    The new buffer requires more size to store the same amount of samples
    because each sample includes an u32 header. Also, there is more code
    to execute for buffer access. Nonetheless, the buffer implementation
    is proven in the ftrace environment and worth to use also in oprofile.

    Patches that changes the internal IBS buffer usage will follow.

    Cc: Steven Rostedt
    Signed-off-by: Robert Richter

    Robert Richter
     
  • This is in preparation for changes in the cpu buffer implementation.

    Signed-off-by: Robert Richter

    Robert Richter
     
  • This is in preparation for changes in the cpu buffer implementation.

    Signed-off-by: Robert Richter

    Robert Richter
     
  • This is in preparation for changes in the cpu buffer implementation.

    Signed-off-by: Robert Richter

    Robert Richter
     
  • Signed-off-by: Robert Richter

    Robert Richter
     
  • This fixes the coding style of some comments.

    Signed-off-by: Robert Richter

    Robert Richter
     

24 Oct, 2008

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile: (21 commits)
    OProfile: Fix buffer synchronization for IBS
    oprofile: hotplug cpu fix
    oprofile: fixing whitespaces in arch/x86/oprofile/*
    oprofile: fixing whitespaces in arch/x86/oprofile/*
    oprofile: fixing whitespaces in drivers/oprofile/*
    x86/oprofile: add the logic for enabling additional IBS bits
    x86/oprofile: reordering functions in nmi_int.c
    x86/oprofile: removing unused function parameter in add_ibs_begin()
    oprofile: more whitespace fixes
    oprofile: whitespace fixes
    OProfile: Rename IBS sysfs dir into "ibs_op"
    OProfile: Rework string handling in setup_ibs_files()
    OProfile: Rework oprofile_add_ibs_sample() function
    oprofile: discover counters for op ppro too
    oprofile: Implement Intel architectural perfmon support
    oprofile: Don't report Nehalem as core_2
    oprofile: drop const in num counters field
    Revert "Oprofile Multiplexing Patch"
    x86, oprofile: BUG: using smp_processor_id() in preemptible code
    x86/oprofile: fix on_each_cpu build error
    ...

    Manually fixed trivial conflicts in
    drivers/oprofile/{cpu_buffer.c,event_buffer.h}

    Linus Torvalds
     

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
     

17 Oct, 2008

1 commit

  • This patch addresses problems when hotplugging cpus while
    profiling. Instead of allocating only online cpus, all possible cpu
    buffers are allocated, which allows cpus to be onlined during
    operation. If a cpu is offlined before profiling is shutdown
    wq_sync_buffer checks for this condition then cancels this work and
    does not sync this buffer.

    Signed-off-by: Chris J Arges
    Signed-off-by: Robert Richter

    Chris J Arges
     

16 Oct, 2008

3 commits


13 Oct, 2008

1 commit


30 Sep, 2008

1 commit


26 Aug, 2008

1 commit

  • If an error occurs on opcontrol start, the event and per cpu buffers
    are released. If later opcontrol shutdown is called then the free
    function will be called again to free buffers that no longer
    exist. This results in a kernel oops. The following changes
    prevent the call to delete buffers that don't exist.

    Signed-off-by: Carl Love
    Signed-off-by: Arnd Bergmann
    Acked-by: Robert Richter
    Signed-off-by: Paul Mackerras

    Carl Love
     

26 Jul, 2008

3 commits