Skip to content
Snippets Groups Projects
  1. Jan 07, 2009
  2. Dec 29, 2008
  3. Dec 16, 2008
  4. Dec 10, 2008
    • Robert Richter's avatar
      oprofile: fix lost sample counter · 211117ff
      Robert Richter authored
      
      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: default avatarRobert Richter <robert.richter@amd.com>
      211117ff
    • Robert Richter's avatar
      oprofile: remove nr_available_slots() · 1d7503b5
      Robert Richter authored
      
      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: default avatarRobert Richter <robert.richter@amd.com>
      1d7503b5
    • Robert Richter's avatar
      oprofile: port to the new ring_buffer · 6dad828b
      Robert Richter authored
      
      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 <rostedt@goodmis.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      6dad828b
    • Robert Richter's avatar
      oprofile: moving cpu_buffer_reset() to cpu_buffer.h · fbc9bf9f
      Robert Richter authored
      
      This is in preparation for changes in the cpu buffer implementation.
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      fbc9bf9f
    • Robert Richter's avatar
      oprofile: adding cpu_buffer_write_commit() · 229234ae
      Robert Richter authored
      
      This is in preparation for changes in the cpu buffer implementation.
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      229234ae
    • Robert Richter's avatar
      oprofile: adding cpu buffer r/w access functions · 7d468abe
      Robert Richter authored
      
      This is in preparation for changes in the cpu buffer implementation.
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      7d468abe
    • Robert Richter's avatar
      oprofile: whitspace changes only · cdc1834d
      Robert Richter authored
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      cdc1834d
    • Robert Richter's avatar
      oprofile: comment cleanup · fd13f6c8
      Robert Richter authored
      
      This fixes the coding style of some comments.
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      fd13f6c8
  5. Oct 20, 2008
    • Carl Love's avatar
      powerpc/oprofile: Fix mutex locking for cell spu-oprofile · a5598ca0
      Carl Love authored
      
      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: default avatarCarl Love <carll@us.ibm.com>
      Signed-off-by: default avatarMaynard Johnson <maynardj@us.ibm.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarAcked-by: Robert Richter <robert.richter@amd.com>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a5598ca0
  6. Oct 17, 2008
  7. Oct 16, 2008
  8. Oct 15, 2008
  9. Aug 25, 2008
  10. Jul 26, 2008
  11. May 14, 2008
  12. Apr 28, 2008
  13. Nov 14, 2007
  14. Nov 22, 2006
  15. Mar 28, 2006
  16. Mar 23, 2006
    • Andrew Morton's avatar
      [PATCH] more for_each_cpu() conversions · 394e3902
      Andrew Morton authored
      
      When we stop allocating percpu memory for not-possible CPUs we must not touch
      the percpu data for not-possible CPUs at all.  The correct way of doing this
      is to test cpu_possible() or to use for_each_cpu().
      
      This patch is a kernel-wide sweep of all instances of NR_CPUS.  I found very
      few instances of this bug, if any.  But the patch converts lots of open-coded
      test to use the preferred helper macros.
      
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Acked-by: default avatarKyle McMartin <kyle@parisc-linux.org>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Christian Zankel <chris@zankel.net>
      Cc: Philippe Elie <phil.el@wanadoo.fr>
      Cc: Nathan Scott <nathans@sgi.com>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      394e3902
  17. Jan 08, 2006
  18. Jul 27, 2005
Loading