<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/samples/trace_events/trace-events-sample.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-10-28T03:35:31Z</updated>
<entry>
<title>Fix tracing sample code warning.</title>
<updated>2017-10-28T03:35:31Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2017-10-28T03:35:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a0cb2b5c390151837b08e5f7bca4a6ecddbcd39c'/>
<id>urn:sha1:a0cb2b5c390151837b08e5f7bca4a6ecddbcd39c</id>
<content type='text'>
Commit 6575257c60e1 ("tracing/samples: Fix creation and deletion of
simple_thread_fn creation") introduced a new warning due to using a
boolean as a counter.

Just make it "int".

Fixes: 6575257c60e1 ("tracing/samples: Fix creation and deletion of simple_thread_fn creation")
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tracing/samples: Fix creation and deletion of simple_thread_fn creation</title>
<updated>2017-10-17T18:55:24Z</updated>
<author>
<name>Steven Rostedt (VMware)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2017-10-17T18:55:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6575257c60e1a26a5319ccf2b5ce5b6449001017'/>
<id>urn:sha1:6575257c60e1a26a5319ccf2b5ce5b6449001017</id>
<content type='text'>
Commit 7496946a8 ("tracing: Add samples of DECLARE_EVENT_CLASS() and
DEFINE_EVENT()") added template examples for all the events. It created a
DEFINE_EVENT_FN() example which reused the foo_bar_reg and foo_bar_unreg
functions.

Enabling both the TRACE_EVENT_FN() and DEFINE_EVENT_FN() example trace
events caused the foo_bar_reg to be called twice, creating the test thread
twice. The foo_bar_unreg would remove it only once, even if it was called
multiple times, leaving a thread existing when the module is unloaded,
causing an oops.

Add a ref count and allow foo_bar_reg() and foo_bar_unreg() be called by
multiple trace events.

Cc: stable@vger.kernel.org
Fixes: 7496946a8 ("tracing: Add samples of DECLARE_EVENT_CLASS() and DEFINE_EVENT()")
Signed-off-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>sched/core: Remove the tsk_cpus_allowed() wrapper</title>
<updated>2017-03-02T07:42:24Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@kernel.org</email>
</author>
<published>2017-02-05T14:38:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0c98d344fe5c27f6e4bce42ac503e9e9a51c7d1d'/>
<id>urn:sha1:0c98d344fe5c27f6e4bce42ac503e9e9a51c7d1d</id>
<content type='text'>
So the original intention of tsk_cpus_allowed() was to 'future-proof'
the field - but it's pretty ineffectual at that, because half of
the code uses -&gt;cpus_allowed directly ...

Also, the wrapper makes the code longer than the original expression!

So just get rid of it. This also shrinks &lt;linux/sched.h&gt; a bit.

Acked-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>tracing: Have the reg function allow to fail</title>
<updated>2016-12-09T14:13:30Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2016-11-28T18:03:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8cf868affdc459beee1a941df0cfaba1673740e3'/>
<id>urn:sha1:8cf868affdc459beee1a941df0cfaba1673740e3</id>
<content type='text'>
Some tracepoints have a registration function that gets enabled when the
tracepoint is enabled. There may be cases that the registraction function
must fail (for example, can't allocate enough memory). In this case, the
tracepoint should also fail to register, otherwise the user would not know
why the tracepoint is not working.

Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: Anton Blanchard &lt;anton@samba.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add samples of DECLARE_EVENT_CLASS() and DEFINE_EVENT()</title>
<updated>2015-02-09T23:05:51Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-02-09T22:14:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7496946a88ab48830f3101c08f8e770cc0902bbb'/>
<id>urn:sha1:7496946a88ab48830f3101c08f8e770cc0902bbb</id>
<content type='text'>
Add to samples/trace_events/ the macros DECLARE_EVENT_CLASS() and
DEFINE_EVENT() and recommend using them over multiple TRACE_EVENT()
macros if the multiple events have the same format.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add TRACE_EVENT_FN example</title>
<updated>2015-02-09T23:05:39Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-02-09T21:32:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6adc13f8c096736957444ffa2aa11421b5671aef'/>
<id>urn:sha1:6adc13f8c096736957444ffa2aa11421b5671aef</id>
<content type='text'>
If a function should be called before a tracepoint is enabled
and/or after it is disabled, the TRACE_EVENT_FN() serves this
purpose. But it is not well documented. Having it as a sample would
help developers to know how to use it.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Add TRACE_EVENT_CONDITION sample</title>
<updated>2015-02-09T21:05:55Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-02-09T21:05:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c4c7eb29382c456b9be9858c357a490ae0ccd0f6'/>
<id>urn:sha1:c4c7eb29382c456b9be9858c357a490ae0ccd0f6</id>
<content type='text'>
The sample code lacks an example of TRACE_EVENT_CONDITION, and it
has been expressed to me that this feature for TRACE_EVENT is not
well known and not used when it could be.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing: Update the TRACE_EVENT fields available in the sample code</title>
<updated>2015-02-09T20:27:04Z</updated>
<author>
<name>Steven Rostedt (Red Hat)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2015-02-09T20:27:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4e20e3a60b57efa1e5c26324ce0260d58be6c81b'/>
<id>urn:sha1:4e20e3a60b57efa1e5c26324ce0260d58be6c81b</id>
<content type='text'>
The sample code in samples/trace_events/ is extremely out of date and does
not show all the new fields that have been added since the sample code
was written. As most people are unaware of these new fields, adding sample
code and explanations of those fields should help out.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracing/events: don't say hi when loading the trace event sample</title>
<updated>2009-05-06T08:38:18Z</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-05-06T02:32:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fd6da10a617f483348ee32bcfe53fd20c302eca1'/>
<id>urn:sha1:fd6da10a617f483348ee32bcfe53fd20c302eca1</id>
<content type='text'>
The sample is useful for testing, and I'm using it. But after
loading the module, it keeps saying hi every 10 seconds, this may
be disturbing.

Also Steven said commenting out the "hi" helped in causing races. :)

[ Impact: make testing a bit easier ]

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
LKML-Reference: &lt;4A00F6AD.2070008@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracing/events: add trace-events-sample</title>
<updated>2009-04-15T02:09:18Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2009-04-15T01:37:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9cfe06f8cd5c8c3ad6ab323973e87dde670642b8'/>
<id>urn:sha1:9cfe06f8cd5c8c3ad6ab323973e87dde670642b8</id>
<content type='text'>
This patch adds a sample to the samples directory on how to create
and use TRACE_EVENT trace points.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
