<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/oprofile/cpu_buffer.c, branch v2.6.29</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>oprofile: fix uninitialized use of struct op_entry</title>
<updated>2009-01-17T16:26:39+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2009-01-17T16:13:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fdb6a8f4db813b4e50f4e975efe6be12ba5bf460'/>
<id>fdb6a8f4db813b4e50f4e975efe6be12ba5bf460</id>
<content type='text'>
Impact: fix crash

In case of losing samples struct op_entry could have been used
uninitialized causing e.g. a wrong preemption count or NULL pointer
access. This patch fixes this.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: fix crash

In case of losing samples struct op_entry could have been used
uninitialized causing e.g. a wrong preemption count or NULL pointer
access. This patch fixes this.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: make new cpu buffer functions part of the api</title>
<updated>2009-01-07T21:48:15+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2009-01-07T20:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=14f0ca8eaea42a5b5a69cfcb699665dd2618db5f'/>
<id>14f0ca8eaea42a5b5a69cfcb699665dd2618db5f</id>
<content type='text'>
This patch creates the new functions

 oprofile_write_reserve()
 oprofile_add_data()
 oprofile_write_commit()

and makes them part of the oprofile api.

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 creates the new functions

 oprofile_write_reserve()
 oprofile_add_data()
 oprofile_write_commit()

and makes them part of the oprofile api.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: remove #ifdef CONFIG_OPROFILE_IBS in non-ibs code</title>
<updated>2009-01-07T21:47:56+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2009-01-06T23:20:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ebf8d974e298018f0b4ee02b1b097bf5500d3d27'/>
<id>ebf8d974e298018f0b4ee02b1b097bf5500d3d27</id>
<content type='text'>
The ifdefs can be removed since the code is no longer ibs specific and
can be used for other purposes as well. IBS specific code is only in
op_model_amd.c.

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 ifdefs can be removed since the code is no longer ibs specific and
can be used for other purposes as well. IBS specific code is only in
op_model_amd.c.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: use new data sample format for ibs</title>
<updated>2009-01-07T21:47:23+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2009-01-05T09:35:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1acda878e20ea0cd3708ba66dca67d52eaafdd2b'/>
<id>1acda878e20ea0cd3708ba66dca67d52eaafdd2b</id>
<content type='text'>
The new ring buffer implementation allows the storage of samples with
different size. This patch implements the usage of the new sample
format to store ibs samples in the cpu buffer. Until now, writing to
the cpu buffer could lead to incomplete sampling sequences since IBS
samples were transfered in multiple samples. Due to a full buffer,
data could be lost at any time. This can't happen any more since the
complete data is reserved in advance and then stored in a single
sample.

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 new ring buffer implementation allows the storage of samples with
different size. This patch implements the usage of the new sample
format to store ibs samples in the cpu buffer. Until now, writing to
the cpu buffer could lead to incomplete sampling sequences since IBS
samples were transfered in multiple samples. Due to a full buffer,
data could be lost at any time. This can't happen any more since the
complete data is reserved in advance and then stored in a single
sample.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: add op_cpu_buffer_add_data()</title>
<updated>2009-01-07T21:41:47+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2008-12-25T16:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d9928c25a6960cf128c2078a89fe6f8e0180ff60'/>
<id>d9928c25a6960cf128c2078a89fe6f8e0180ff60</id>
<content type='text'>
This function can be used to attach data to a sample. It returns the
remaining free buffer size that has been reserved with
op_cpu_buffer_write_reserve().

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 function can be used to attach data to a sample. It returns the
remaining free buffer size that has been reserved with
op_cpu_buffer_write_reserve().

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: rework implementation of cpu buffer events</title>
<updated>2009-01-07T21:40:47+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2008-12-25T16:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ae735e9964b4584923f2997d98a8d80ae9c1a75c'/>
<id>ae735e9964b4584923f2997d98a8d80ae9c1a75c</id>
<content type='text'>
Special events such as task or context switches are marked with an
escape code in the cpu buffer followed by an event code or a task
identifier. There is one escape code per event. To make escape
sequences also available for data samples the internal cpu buffer
format must be changed. The current implementation does not allow the
extension of event codes since this would lead to collisions with the
task identifiers. To avoid this, this patch introduces an event mask
that allows the storage of multiple events with one escape code. Now,
task identifiers are stored in the data section of the sample. The
implementation also allows the usage of custom data in a sample. As a
side effect the new code is much more readable and easier to
understand.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Special events such as task or context switches are marked with an
escape code in the cpu buffer followed by an event code or a task
identifier. There is one escape code per event. To make escape
sequences also available for data samples the internal cpu buffer
format must be changed. The current implementation does not allow the
extension of event codes since this would lead to collisions with the
task identifiers. To avoid this, this patch introduces an event mask
that allows the storage of multiple events with one escape code. Now,
task identifiers are stored in the data section of the sample. The
implementation also allows the usage of custom data in a sample. As a
side effect the new code is much more readable and easier to
understand.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: modify op_cpu_buffer_read_entry()</title>
<updated>2009-01-07T21:40:02+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2008-12-30T03:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2d87b14cf8d0b07720de26d90789d02124141616'/>
<id>2d87b14cf8d0b07720de26d90789d02124141616</id>
<content type='text'>
This implements the support of samples with attached data.

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 implements the support of samples with attached data.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: add op_cpu_buffer_write_reserve()</title>
<updated>2009-01-07T21:37:44+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2008-12-25T16:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2cc28b9f261dd28d69767a34682ce55a27d928ed'/>
<id>2cc28b9f261dd28d69767a34682ce55a27d928ed</id>
<content type='text'>
This function prepares the cpu buffer to write a sample.

Struct op_entry is used during operations on the ring buffer while
struct op_sample contains the data that is stored in the ring
buffer. Struct entry can be uninitialized. The function reserves a
data array that is specified by size. Use op_cpu_buffer_write_commit()
after preparing the sample. In case of errors a null pointer is
returned, otherwise the pointer to the sample.

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 function prepares the cpu buffer to write a sample.

Struct op_entry is used during operations on the ring buffer while
struct op_sample contains the data that is stored in the ring
buffer. Struct entry can be uninitialized. The function reserves a
data array that is specified by size. Use op_cpu_buffer_write_commit()
after preparing the sample. In case of errors a null pointer is
returned, otherwise the pointer to the sample.

Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: rename add_sample() in cpu_buffer.c</title>
<updated>2009-01-07T21:35:26+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2008-12-23T03:03:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d0e233846dcef56ae78f6d8fd0e0cba85a2a1489'/>
<id>d0e233846dcef56ae78f6d8fd0e0cba85a2a1489</id>
<content type='text'>
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 &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>oprofile: remove backtrace code for ibs</title>
<updated>2009-01-07T16:06:32+00:00</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2008-12-19T11:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8350c78734e67ac1f8bfd4eb14b70ff4d01a9a12'/>
<id>8350c78734e67ac1f8bfd4eb14b70ff4d01a9a12</id>
<content type='text'>
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 &lt;robert.richter@amd.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;robert.richter@amd.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
