Commit Graph

12 Commits (c39fae1416d59fd565606793f090cebe3720d50d)

Author SHA1 Message Date
Robert Richter 16422a6e2d oprofile: Remove oprofile_multiplexing_init()
oprofile_multiplexing_init() can be removed when moving the
initialization of oprofile_time_slice to oprofile_create_files().

Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20 16:43:19 +02:00
Robert Richter afe1b50fe6 oprofile: Rename variable timeout_jiffies and move to oprofile_files.c
This patch renames timeout_jiffies into an oprofile specific name. The
macro MULTIPLEXING_TIMER_DEFAULT is changed too.

Also, since this variable is controlled using oprofilefs, its
definition is moved to oprofile_files.c.

Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20 16:43:19 +02:00
Jason Yeh 4d4036e0e7 oprofile: Implement performance counter multiplexing
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 <jason.yeh@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
2009-07-20 16:33:53 +02:00
Robert Richter bd2172f580 oprofile: rename kernel-wide identifiers
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>
2008-12-16 17:52:49 +01:00
Robert Richter 37ca5eb341 oprofile: set values to default when creating oprofilefs
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>
2008-12-10 14:20:10 +01:00
Robert Richter 6a18037d41 oprofile: fixing whitespaces in drivers/oprofile/*
Signed-off-by: Robert Richter <robert.richter@amd.com>
2008-10-16 15:01:40 +02:00
Robert Richter 25ad2913ca oprofile: more whitespace fixes
Signed-off-by: Robert Richter <robert.richter@amd.com>
2008-10-15 20:55:51 +02:00
Robert Richter 4c168eaf7e Revert "Oprofile Multiplexing Patch"
Reverting commit 1a960b402a for the main
branch. Multiplexing will be tracked on a separate feature branch.

Conflicts:

    arch/x86/oprofile/nmi_int.c
2008-09-24 11:08:52 +02:00
Jason Yeh 1a960b402a Oprofile Multiplexing Patch
This patch introduces multiplexing support for the Oprofile kernel
module. It basically adds a new function pointer in oprofile_operator
allowing each architecture to supply its callback to switch between
different sets of event when the timer expires. Userspace tools can
modify the time slice through /dev/oprofile/time_slice.

It also modifies the number of counters exposed to the userspace through
/dev/oprofile. For example, the number of counters for AMD CPUs are
changed to 32 and multiplexed in the sets of 4.

Signed-off-by: Jason Yeh <jason.yeh@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: oprofile-list <oprofile-list@lists.sourceforge.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-26 11:48:16 +02:00
Arjan van de Ven d54b1fdb1d [PATCH] mark struct file_operations const 5
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:45 -08:00
Al Viro 9be80c0f0f [PATCH] oprofile trivial user annotations
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-26 07:43:42 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
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!
2005-04-16 15:20:36 -07:00