<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/oprofile, branch v3.1.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>atomic: use &lt;linux/atomic.h&gt;</title>
<updated>2011-07-26T23:49:47+00:00</updated>
<author>
<name>Arun Sharma</name>
<email>asharma@fb.com</email>
</author>
<published>2011-07-26T23:09:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60063497a95e716c9a689af3be2687d261f115b4'/>
<id>60063497a95e716c9a689af3be2687d261f115b4</id>
<content type='text'>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows us to move duplicated code in &lt;asm/atomic.h&gt;
(atomic_inc_not_zero() for now) to &lt;linux/atomic.h&gt;

Signed-off-by: Arun Sharma &lt;asharma@fb.com&gt;
Reviewed-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf: Remove the nmi parameter from the oprofile_perf backend</title>
<updated>2011-07-21T18:41:58+00:00</updated>
<author>
<name>Will Deacon</name>
<email>will.deacon@arm.com</email>
</author>
<published>2011-07-08T17:34:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7fcfd1abd6480d3b9ef17f5759c175e036e835cf'/>
<id>7fcfd1abd6480d3b9ef17f5759c175e036e835cf</id>
<content type='text'>
In commit a8b0ca17b80e ("perf: Remove the nmi parameter from the
swevent and overflow interface") one site was overlooked.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20110708173442.GB31972@e102144-lin.cambridge.arm.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In commit a8b0ca17b80e ("perf: Remove the nmi parameter from the
swevent and overflow interface") one site was overlooked.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/20110708173442.GB31972@e102144-lin.cambridge.arm.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf: Add context field to perf_event</title>
<updated>2011-07-01T09:06:38+00:00</updated>
<author>
<name>Avi Kivity</name>
<email>avi@redhat.com</email>
</author>
<published>2011-06-29T15:42:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4dc0da86967d5463708631d02a70cfed5b104884'/>
<id>4dc0da86967d5463708631d02a70cfed5b104884</id>
<content type='text'>
The perf_event overflow handler does not receive any caller-derived
argument, so many callers need to resort to looking up the perf_event
in their local data structure.  This is ugly and doesn't scale if a
single callback services many perf_events.

Fix by adding a context parameter to perf_event_create_kernel_counter()
(and derived hardware breakpoints APIs) and storing it in the perf_event.
The field can be accessed from the callback as event-&gt;overflow_handler_context.
All callers are updated.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The perf_event overflow handler does not receive any caller-derived
argument, so many callers need to resort to looking up the perf_event
in their local data structure.  This is ugly and doesn't scale if a
single callback services many perf_events.

Fix by adding a context parameter to perf_event_create_kernel_counter()
(and derived hardware breakpoints APIs) and storing it in the perf_event.
The field can be accessed from the callback as event-&gt;overflow_handler_context.
All callers are updated.

Signed-off-by: Avi Kivity &lt;avi@redhat.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1309362157-6596-2-git-send-email-avi@redhat.com
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: Fix locking dependency in sync_start()</title>
<updated>2011-05-31T14:33:34+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-05-26T16:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=130c5ce716c9bfd1c2a2ec840a746eb7ff9ce1e6'/>
<id>130c5ce716c9bfd1c2a2ec840a746eb7ff9ce1e6</id>
<content type='text'>
This fixes the A-&gt;B/B-&gt;A locking dependency, see the warning below.

The function task_exit_notify() is called with (task_exit_notifier)
.rwsem set and then calls sync_buffer() which locks buffer_mutex. In
sync_start() the buffer_mutex was set to prevent notifier functions to
be started before sync_start() is finished. But when registering the
notifier, (task_exit_notifier).rwsem is locked too, but now in
different order than in sync_buffer(). In theory this causes a locking
dependency, what does not occur in practice since task_exit_notify()
is always called after the notifier is registered which means the lock
is already released.

However, after checking the notifier functions it turned out the
buffer_mutex in sync_start() is unnecessary. This is because
sync_buffer() may be called from the notifiers even if sync_start()
did not finish yet, the buffers are already allocated but empty. No
need to protect this with the mutex.

So we fix this theoretical locking dependency by removing buffer_mutex
in sync_start(). This is similar to the implementation before commit:

 750d857 oprofile: fix crash when accessing freed task structs

which introduced the locking dependency.

Lockdep warning:

oprofiled/4447 is trying to acquire lock:
 (buffer_mutex){+.+...}, at: [&lt;ffffffffa0000e55&gt;] sync_buffer+0x31/0x3ec [oprofile]

but task is already holding lock:
 ((task_exit_notifier).rwsem){++++..}, at: [&lt;ffffffff81058026&gt;] __blocking_notifier_call_chain+0x39/0x67

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 ((task_exit_notifier).rwsem){++++..}:
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff81463a2b&gt;] down_write+0x44/0x67
       [&lt;ffffffff810581c0&gt;] blocking_notifier_chain_register+0x52/0x8b
       [&lt;ffffffff8105a6ac&gt;] profile_event_register+0x2d/0x2f
       [&lt;ffffffffa00013c1&gt;] sync_start+0x47/0xc6 [oprofile]
       [&lt;ffffffffa00001bb&gt;] oprofile_setup+0x60/0xa5 [oprofile]
       [&lt;ffffffffa00014e3&gt;] event_buffer_open+0x59/0x8c [oprofile]
       [&lt;ffffffff810cd3b9&gt;] __dentry_open+0x1eb/0x308
       [&lt;ffffffff810cd59d&gt;] nameidata_to_filp+0x60/0x67
       [&lt;ffffffff810daad6&gt;] do_last+0x5be/0x6b2
       [&lt;ffffffff810dbc33&gt;] path_openat+0xc7/0x360
       [&lt;ffffffff810dbfc5&gt;] do_filp_open+0x3d/0x8c
       [&lt;ffffffff810ccfd2&gt;] do_sys_open+0x110/0x1a9
       [&lt;ffffffff810cd09e&gt;] sys_open+0x20/0x22
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (buffer_mutex){+.+...}:
       [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff814634f0&gt;] mutex_lock_nested+0x63/0x309
       [&lt;ffffffffa0000e55&gt;] sync_buffer+0x31/0x3ec [oprofile]
       [&lt;ffffffffa0001226&gt;] task_exit_notify+0x16/0x1a [oprofile]
       [&lt;ffffffff81467b96&gt;] notifier_call_chain+0x37/0x63
       [&lt;ffffffff8105803d&gt;] __blocking_notifier_call_chain+0x50/0x67
       [&lt;ffffffff81058068&gt;] blocking_notifier_call_chain+0x14/0x16
       [&lt;ffffffff8105a718&gt;] profile_task_exit+0x1a/0x1c
       [&lt;ffffffff81039e8f&gt;] do_exit+0x2a/0x6fc
       [&lt;ffffffff8103a5e4&gt;] do_group_exit+0x83/0xae
       [&lt;ffffffff8103a626&gt;] sys_exit_group+0x17/0x1b
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

1 lock held by oprofiled/4447:
 #0:  ((task_exit_notifier).rwsem){++++..}, at: [&lt;ffffffff81058026&gt;] __blocking_notifier_call_chain+0x39/0x67

stack backtrace:
Pid: 4447, comm: oprofiled Not tainted 2.6.39-00007-gcf4d8d4 #10
Call Trace:
 [&lt;ffffffff81063193&gt;] print_circular_bug+0xae/0xbc
 [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff81062627&gt;] ? mark_lock+0x42f/0x552
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff814634f0&gt;] mutex_lock_nested+0x63/0x309
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffffa0000e55&gt;] sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff81058026&gt;] ? __blocking_notifier_call_chain+0x39/0x67
 [&lt;ffffffff81058026&gt;] ? __blocking_notifier_call_chain+0x39/0x67
 [&lt;ffffffffa0001226&gt;] task_exit_notify+0x16/0x1a [oprofile]
 [&lt;ffffffff81467b96&gt;] notifier_call_chain+0x37/0x63
 [&lt;ffffffff8105803d&gt;] __blocking_notifier_call_chain+0x50/0x67
 [&lt;ffffffff81058068&gt;] blocking_notifier_call_chain+0x14/0x16
 [&lt;ffffffff8105a718&gt;] profile_task_exit+0x1a/0x1c
 [&lt;ffffffff81039e8f&gt;] do_exit+0x2a/0x6fc
 [&lt;ffffffff81465031&gt;] ? retint_swapgs+0xe/0x13
 [&lt;ffffffff8103a5e4&gt;] do_group_exit+0x83/0xae
 [&lt;ffffffff8103a626&gt;] sys_exit_group+0x17/0x1b
 [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

Reported-by: Marcin Slusarz &lt;marcin.slusarz@gmail.com&gt;
Cc: Carl Love &lt;carll@us.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt; # .36+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the A-&gt;B/B-&gt;A locking dependency, see the warning below.

The function task_exit_notify() is called with (task_exit_notifier)
.rwsem set and then calls sync_buffer() which locks buffer_mutex. In
sync_start() the buffer_mutex was set to prevent notifier functions to
be started before sync_start() is finished. But when registering the
notifier, (task_exit_notifier).rwsem is locked too, but now in
different order than in sync_buffer(). In theory this causes a locking
dependency, what does not occur in practice since task_exit_notify()
is always called after the notifier is registered which means the lock
is already released.

However, after checking the notifier functions it turned out the
buffer_mutex in sync_start() is unnecessary. This is because
sync_buffer() may be called from the notifiers even if sync_start()
did not finish yet, the buffers are already allocated but empty. No
need to protect this with the mutex.

So we fix this theoretical locking dependency by removing buffer_mutex
in sync_start(). This is similar to the implementation before commit:

 750d857 oprofile: fix crash when accessing freed task structs

which introduced the locking dependency.

Lockdep warning:

oprofiled/4447 is trying to acquire lock:
 (buffer_mutex){+.+...}, at: [&lt;ffffffffa0000e55&gt;] sync_buffer+0x31/0x3ec [oprofile]

but task is already holding lock:
 ((task_exit_notifier).rwsem){++++..}, at: [&lt;ffffffff81058026&gt;] __blocking_notifier_call_chain+0x39/0x67

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 ((task_exit_notifier).rwsem){++++..}:
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff81463a2b&gt;] down_write+0x44/0x67
       [&lt;ffffffff810581c0&gt;] blocking_notifier_chain_register+0x52/0x8b
       [&lt;ffffffff8105a6ac&gt;] profile_event_register+0x2d/0x2f
       [&lt;ffffffffa00013c1&gt;] sync_start+0x47/0xc6 [oprofile]
       [&lt;ffffffffa00001bb&gt;] oprofile_setup+0x60/0xa5 [oprofile]
       [&lt;ffffffffa00014e3&gt;] event_buffer_open+0x59/0x8c [oprofile]
       [&lt;ffffffff810cd3b9&gt;] __dentry_open+0x1eb/0x308
       [&lt;ffffffff810cd59d&gt;] nameidata_to_filp+0x60/0x67
       [&lt;ffffffff810daad6&gt;] do_last+0x5be/0x6b2
       [&lt;ffffffff810dbc33&gt;] path_openat+0xc7/0x360
       [&lt;ffffffff810dbfc5&gt;] do_filp_open+0x3d/0x8c
       [&lt;ffffffff810ccfd2&gt;] do_sys_open+0x110/0x1a9
       [&lt;ffffffff810cd09e&gt;] sys_open+0x20/0x22
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (buffer_mutex){+.+...}:
       [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
       [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
       [&lt;ffffffff814634f0&gt;] mutex_lock_nested+0x63/0x309
       [&lt;ffffffffa0000e55&gt;] sync_buffer+0x31/0x3ec [oprofile]
       [&lt;ffffffffa0001226&gt;] task_exit_notify+0x16/0x1a [oprofile]
       [&lt;ffffffff81467b96&gt;] notifier_call_chain+0x37/0x63
       [&lt;ffffffff8105803d&gt;] __blocking_notifier_call_chain+0x50/0x67
       [&lt;ffffffff81058068&gt;] blocking_notifier_call_chain+0x14/0x16
       [&lt;ffffffff8105a718&gt;] profile_task_exit+0x1a/0x1c
       [&lt;ffffffff81039e8f&gt;] do_exit+0x2a/0x6fc
       [&lt;ffffffff8103a5e4&gt;] do_group_exit+0x83/0xae
       [&lt;ffffffff8103a626&gt;] sys_exit_group+0x17/0x1b
       [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

1 lock held by oprofiled/4447:
 #0:  ((task_exit_notifier).rwsem){++++..}, at: [&lt;ffffffff81058026&gt;] __blocking_notifier_call_chain+0x39/0x67

stack backtrace:
Pid: 4447, comm: oprofiled Not tainted 2.6.39-00007-gcf4d8d4 #10
Call Trace:
 [&lt;ffffffff81063193&gt;] print_circular_bug+0xae/0xbc
 [&lt;ffffffff81064dfb&gt;] __lock_acquire+0x1085/0x1711
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff8106557f&gt;] lock_acquire+0xf8/0x11e
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff81062627&gt;] ? mark_lock+0x42f/0x552
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff814634f0&gt;] mutex_lock_nested+0x63/0x309
 [&lt;ffffffffa0000e55&gt;] ? sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffffa0000e55&gt;] sync_buffer+0x31/0x3ec [oprofile]
 [&lt;ffffffff81058026&gt;] ? __blocking_notifier_call_chain+0x39/0x67
 [&lt;ffffffff81058026&gt;] ? __blocking_notifier_call_chain+0x39/0x67
 [&lt;ffffffffa0001226&gt;] task_exit_notify+0x16/0x1a [oprofile]
 [&lt;ffffffff81467b96&gt;] notifier_call_chain+0x37/0x63
 [&lt;ffffffff8105803d&gt;] __blocking_notifier_call_chain+0x50/0x67
 [&lt;ffffffff81058068&gt;] blocking_notifier_call_chain+0x14/0x16
 [&lt;ffffffff8105a718&gt;] profile_task_exit+0x1a/0x1c
 [&lt;ffffffff81039e8f&gt;] do_exit+0x2a/0x6fc
 [&lt;ffffffff81465031&gt;] ? retint_swapgs+0xe/0x13
 [&lt;ffffffff8103a5e4&gt;] do_group_exit+0x83/0xae
 [&lt;ffffffff8103a626&gt;] sys_exit_group+0x17/0x1b
 [&lt;ffffffff8146ad4b&gt;] system_call_fastpath+0x16/0x1b

Reported-by: Marcin Slusarz &lt;marcin.slusarz@gmail.com&gt;
Cc: Carl Love &lt;carll@us.ibm.com&gt;
Cc: &lt;stable@kernel.org&gt; # .36+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: Free potentially owned tasks in case of errors</title>
<updated>2011-05-31T14:33:33+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-05-26T16:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6ac6519b93065625119a347be1cbcc1b89edb773'/>
<id>6ac6519b93065625119a347be1cbcc1b89edb773</id>
<content type='text'>
After registering the task free notifier we possibly have tasks in our
dying_tasks list. Free them after unregistering the notifier in case
of an error.

Cc: &lt;stable@kernel.org&gt; # .36+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After registering the task free notifier we possibly have tasks in our
dying_tasks list. Free them after unregistering the notifier in case
of an error.

Cc: &lt;stable@kernel.org&gt; # .36+
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: Use linux/mutex.h</title>
<updated>2011-05-24T10:45:59+00:00</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2011-05-08T23:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b76a06e08d94b2a63e47837dfe46bbbf0a3af6c2'/>
<id>b76a06e08d94b2a63e47837dfe46bbbf0a3af6c2</id>
<content type='text'>
The oprofile code is still including asm/mutex.h instead of
linux/mutex.h.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The oprofile code is still including asm/mutex.h instead of
linux/mutex.h.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile, s390: Rework hwsampler implementation</title>
<updated>2011-02-15T10:10:20+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-02-11T16:31:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a0d76247e07abd14968adc4486aaa8e270e9c209'/>
<id>a0d76247e07abd14968adc4486aaa8e270e9c209</id>
<content type='text'>
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 &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile, s390: Enhance OProfile to support System zs hardware sampling feature</title>
<updated>2011-02-15T10:08:50+00:00</updated>
<author>
<name>Heinz Graalfs</name>
<email>graalfs@linux.vnet.ibm.com</email>
</author>
<published>2011-01-21T10:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=997dbb4967da248808850c250182ef2528fff2d1'/>
<id>997dbb4967da248808850c250182ef2528fff2d1</id>
<content type='text'>
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 &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Maran Pakkirisamy &lt;maranp@linux.vnet.ibm.com&gt;
Signed-off-by: Heinz Graalfs &lt;graalfs@linux.vnet.ibm.com&gt;
Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Maran Pakkirisamy &lt;maranp@linux.vnet.ibm.com&gt;
Signed-off-by: Heinz Graalfs &lt;graalfs@linux.vnet.ibm.com&gt;
Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: Introduce new oprofile sample add function (oprofile_add_ext_hw_sample)</title>
<updated>2011-02-15T10:07:07+00:00</updated>
<author>
<name>Heinz Graalfs</name>
<email>graalfs@linux.vnet.ibm.com</email>
</author>
<published>2011-01-21T10:06:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=54ebbe7ba51d97a28a9a406203d171d61858e4b9'/>
<id>54ebbe7ba51d97a28a9a406203d171d61858e4b9</id>
<content type='text'>
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 &lt;linux/module.h&gt;
* whitespace changes
* removed conditional compilation (CONFIG_HAVE_HWSAMPLER)
* modified order of functions
* fix missing function definition in header file

Signed-off-by: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Maran Pakkirisamy &lt;maranp@linux.vnet.ibm.com&gt;
Signed-off-by: Heinz Graalfs &lt;graalfs@linux.vnet.ibm.com&gt;
Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;linux/module.h&gt;
* whitespace changes
* removed conditional compilation (CONFIG_HAVE_HWSAMPLER)
* modified order of functions
* fix missing function definition in header file

Signed-off-by: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Signed-off-by: Maran Pakkirisamy &lt;maranp@linux.vnet.ibm.com&gt;
Signed-off-by: Heinz Graalfs &lt;graalfs@linux.vnet.ibm.com&gt;
Acked-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-10-30T18:43:26+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-30T18:43:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f02a38d86a14b6e544e218d806ffb0442785f62b'/>
<id>f02a38d86a14b6e544e218d806ffb0442785f62b</id>
<content type='text'>
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  jump label: Add work around to i386 gcc asm goto bug
  x86, ftrace: Use safe noops, drop trap test
  jump_label: Fix unaligned traps on sparc.
  jump label: Make arch_jump_label_text_poke_early() optional
  jump label: Fix error with preempt disable holding mutex
  oprofile: Remove deprecated use of flush_scheduled_work()
  oprofile: Fix the hang while taking the cpu offline
  jump label: Fix deadlock b/w jump_label_mutex vs. text_mutex
  jump label: Fix module __init section race

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Check irq_remapped instead of remapping_enabled in destroy_irq()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  jump label: Add work around to i386 gcc asm goto bug
  x86, ftrace: Use safe noops, drop trap test
  jump_label: Fix unaligned traps on sparc.
  jump label: Make arch_jump_label_text_poke_early() optional
  jump label: Fix error with preempt disable holding mutex
  oprofile: Remove deprecated use of flush_scheduled_work()
  oprofile: Fix the hang while taking the cpu offline
  jump label: Fix deadlock b/w jump_label_mutex vs. text_mutex
  jump label: Fix module __init section race

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Check irq_remapped instead of remapping_enabled in destroy_irq()
</pre>
</div>
</content>
</entry>
</feed>
