aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* oprofile: rename variables in add_ibs_begin()Robert Richter2009-01-07
| | | | | | This unifies usage of variable names within oprofile. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: rename add_sample() in cpu_buffer.cRobert Richter2009-01-07
| | | | | | | Rename the fucntion to op_add_sample() since there is a collision with another one with the same name in buffer_sync.c. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: rename variable ibs_allowed to has_ibs in op_model_amd.cRobert Richter2009-01-07
| | | | | | | This patch renames ibs_allowed to has_ibs. Varible name fits better now. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: making add_sample_entry() inlineRobert Richter2009-01-07
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: remove backtrace code for ibsRobert Richter2009-01-07
| | | | | | | | This code is broken since a TRACE_BEGIN_CODE is never sent to the daemon. The data becomes corrupt since the backtrace is interpreted as ibs sample. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: remove unused ibs macroRobert Richter2009-01-07
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: remove unused components in struct oprofile_cpu_bufferRobert Richter2009-01-07
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: simplify add_ibs_begin()Robert Richter2009-01-07
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: simplify add_sample() in cpu_buffer.cRobert Richter2008-12-29
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: simplify oprofile_begin_trace()Robert Richter2008-12-29
| | | | | | | | This patch removes the unused return parameter in oprofile_begin_trace(). Also, oprofile_begin_trace() and oprofile_end_trace() are inline now. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: simplify sync_buffer()Robert Richter2008-12-29
| | | | | | Make code more readable. No functional changes. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: simplify add_sample()Robert Richter2008-12-29
| | | | | | | This patch removes add_us_sample() and simplifies add_sample(). Code is much more readable now. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: add inline function __oprofile_add_ext_sample()Robert Richter2008-12-29
| | | | | | | | This patch adds the inline function __oprofile_add_ext_sample() to cpu_buffer.c and thus reduces overhead when calling oprofile_add_sample(). Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: reordering some code in cpu_buffer.cRobert Richter2008-12-29
| | | | | | Reordering code to keep alloc/free functions together. Signed-off-by: Robert Richter <robert.richter@amd.com>
* x86/oprofile: fix pci_dev use count for AMD northbridge devicesRobert Richter2008-12-29
| | | | | | | | | | | This patch fixes the PCI device use count for AMD northbridge devices. In case of an IBS LVT initialization failure, the PCI device is released now by calling pci_dev_put(). If there are no initialization errors, the devices are released in pci_get_device() while iterating. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: remove ring buffer inline functions in cpu_buffer.hRobert Richter2008-12-29
| | | | | | | This patch moves ring buffer inline functions to cpu_buffer.c. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: rename cpu buffer functionsRobert Richter2008-12-29
| | | | | | | | This patch renames cpu buffer functions to something more oprofile specific names. Functions will be moved to the global name space. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: rename kernel-wide identifiersRobert Richter2008-12-16
| | | | | | | | This patch renames kernel-wide identifiers to something more oprofile specific names. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: select RING_BUFFERIngo Molnar2008-12-12
| | | | | | | | | | | | | Impact: build fix OProfile now depends on the ring buffer infrastructure: arch/x86/oprofile/built-in.o: In function `oprofile_add_ibs_sample': : undefined reference to `ring_buffer_unlock_commit' Select TRACING and RING_BUFFER when oprofile is enabled. Signed-off-by: Ingo Molnar <mingo@elte.hu>
* ring_buffer: adding EXPORT_SYMBOLsRobert Richter2008-12-12
| | | | | | | | | I added EXPORT_SYMBOL_GPLs for all functions part of the API (ring_buffer.h). This is required since oprofile is using the ring buffer and the compilation as modules would fail otherwise. Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* oprofile: fix lost sample counterRobert Richter2008-12-10
| | | | | | | | 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@amd.com>
* oprofile: remove nr_available_slots()Robert Richter2008-12-10
| | | | | | | | | | | | | | | | 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@amd.com>
* oprofile: port to the new ring_bufferRobert Richter2008-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Robert Richter <robert.richter@amd.com>
* ring_buffer: add remaining cpu functions to ring_buffer.hRobert Richter2008-12-10
| | | | | | | | These functions are not yet in ring_buffer.h though they seems to be part of the API. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: moving cpu_buffer_reset() to cpu_buffer.hRobert Richter2008-12-10
| | | | | | This is in preparation for changes in the cpu buffer implementation. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: adding cpu_buffer_entries()Robert Richter2008-12-10
| | | | | | This is in preparation for changes in the cpu buffer implementation. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: adding cpu_buffer_write_commit()Robert Richter2008-12-10
| | | | | | This is in preparation for changes in the cpu buffer implementation. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: adding cpu buffer r/w access functionsRobert Richter2008-12-10
| | | | | | This is in preparation for changes in the cpu buffer implementation. Signed-off-by: Robert Richter <robert.richter@amd.com>
* ftrace: remove unused function arg in trace_iterator_increment()Robert Richter2008-12-10
| | | | | | | This removes the unused cpu function parameter. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
* ring_buffer: update description for ring_buffer_alloc()Robert Richter2008-12-10
| | | | | | | Trivial patch. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: set values to default when creating oprofilefsRobert Richter2008-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch restores default values for: /dev/oprofile/cpu_buffer_size /dev/oprofile/buffer_watershed /dev/oprofile/buffer_size when creating the oprofilefs: # opcontrol --deinit # opcontrol --init # cat /dev/oprofile/cpu_buffer_size 8192 # echo 5123 > /dev/oprofile/cpu_buffer_size # cat /dev/oprofile/cpu_buffer_size 5123 # opcontrol --deinit # opcontrol --init # cat /dev/oprofile/cpu_buffer_size 8192 # opcontrol --deinit This sets the values in a defined state. Before, there was no way to restore the defaults without rebooting the system or reloading the module. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: implement switch/case in buffer_sync.cRobert Richter2008-12-10
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* x86/oprofile: cleanup IBS init/exit functions in op_model_amd.cRobert Richter2008-12-10
| | | | | | | | Implementation of pairwise init/exit funcions for IBS and IBS NMI setup. There are also some function renames and the removal of forward function declarations. Signed-off-by: Robert Richter <robert.richter@amd.com>
* x86/oprofile: reordering IBS code in op_model_amd.cRobert Richter2008-12-10
| | | | | | This is part of the cpu buffer rework. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: fix typoRobert Richter2008-12-10
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: whitspace changes onlyRobert Richter2008-12-10
| | | | Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: update comment for oprofile_add_sample()Robert Richter2008-12-10
| | | | | | The cpu argument is no longer part of the parameter list. Signed-off-by: Robert Richter <robert.richter@amd.com>
* oprofile: comment cleanupRobert Richter2008-12-10
| | | | | | This fixes the coding style of some comments. Signed-off-by: Robert Richter <robert.richter@amd.com>
* Linux 2.6.28-rc7v2.6.28-rc7Linus Torvalds2008-12-01
|
* Merge branch 'for_linus' of ↵Linus Torvalds2008-12-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (25 commits) em28xx: remove backward compat macro added on a previous fix V4L/DVB (9748): em28xx: fix compile warning V4L/DVB (9743): em28xx: fix oops audio V4L/DVB (9742): em28xx-alsa: implement another locking schema V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick V4L/DVB (9691): gspca: Move the video device to a separate area. V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put. V4L/DVB (9689): gspca: Memory leak when disconnect while streaming. V4L/DVB (9668): em28xx: fix a race condition with hald V4L/DVB (9664): af9015: don't reconnect device in USB-bus V4L/DVB (9647): em28xx: void having two concurrent control URB's V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20 V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner V4L/DVB (9632): make em28xx aux audio input work V4L/DVB (9631): Make s2api work for ATSC support V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom V4L/DVB (9608): Fix section mismatch warning for dm1105 during make ...
| * em28xx: remove backward compat macro added on a previous fixMauro Carvalho Chehab2008-12-01
| | | | | | | | | | | | | | | | | | | | commit 50f3beb50abe0cc0228363af804e50e710b3e5b0 fixed em28xx-alsa locking schema. However, a backport macro was kept. This patch removes the macro, since it is not needed for the module compilation against upstream. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9748): em28xx: fix compile warningHans Verkuil2008-12-01
| | | | | | | | | | | | | | Label fail_unreg is no longer used. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9743): em28xx: fix oops audioDouglas Schilling Landgraf2008-12-01
| | | | | | | | | | | | | | | | | | | | | | Replaced usb_kill_usb for usb_unlink_usb (wait until urb to fully stop require USB core to put the calling process to sleep). Oops: http://www.kerneloops.org/raw.php?rawid=71799&msgid= Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9742): em28xx-alsa: implement another locking schemaMauro Carvalho Chehab2008-11-24
| | | | | | | | | | | | | | Instead of using a spinlock, it is better to call the proper pcm stream locking schema. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStickMichael Krufky2008-11-24
| | | | | | | | | | | | | | | | | | | | New firmware image brings enhanced tuning performance. Firmware is available for download at the following location: http://www.steventoth.net/linux/sms1xxx Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9691): gspca: Move the video device to a separate area.Jean-Francois Moine2008-11-24
| | | | | | | | | | | | | | | | | | | | The video device was part of the gspca device. On device disconnection while streaming, the device structure is freed at close time. In this case, the remaining close job on the video device run out of allocated memory. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put.Jean-Francois Moine2008-11-24
| | | | | | | | | | | | | | | | | | | | | | The previous subdriver protection against rmmod was done via the file operations table in the device descriptor. On device disconnection while streaming, the device structure was freed at close time, and the module_put still used the module name in the freed area. Now, explicit module get/put are done on open and close. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9689): gspca: Memory leak when disconnect while streaming.Jean-Francois Moine2008-11-24
| | | | | | | | | | | | | | | | As a side effect, the sd routine stop0 is called on disconnect. This permits the subdriver to free its resources. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9668): em28xx: fix a race condition with haldMauro Carvalho Chehab2008-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer versions of hald tries to open it to call QUERYCAP. Due to the lack of a proper locking, it is possible to open the device before it finishes initialization. This patch adds a lock to avoid this risk, and to protect the list of em28xx devices. While here, remove the uneeded BKL lock. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| * V4L/DVB (9664): af9015: don't reconnect device in USB-busJose Alberto Reguero2008-11-20
| | | | | | | | | | | | | | | | | | | | Don't reconnect device in the USB-bus. Reconnect command was not executed every time by device firmware and that causes harm. Reconnection is not needed so remove it. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>