<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/recordmcount.h, branch v3.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-05-25T23:56:33Z</updated>
<entry>
<title>ftrace/recordmcount: Avoid STT_FUNC symbols as base on ARM</title>
<updated>2011-05-25T23:56:33Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2011-05-11T17:23:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9905ce8ad7b79dddd23c7b4753d0b2cdb65bde3c'/>
<id>urn:sha1:9905ce8ad7b79dddd23c7b4753d0b2cdb65bde3c</id>
<content type='text'>
While find_secsym_ndx often finds the unamed local STT_SECTION, if a
section has only one function in it, the ARM toolchain generates the
STT_FUNC symbol before the STT_SECTION, and recordmcount finds this
instead.

This is problematic on ARM because in ARM ELFs, "if a [STT_FUNC] symbol
addresses a Thumb instruction, its value is the address of the
instruction with bit zero set (in a relocatable object, the section
offset with bit zero set)".  This leads to incorrect mcount addresses
being recorded.

Fix this by not using STT_FUNC symbols as the base on ARM.

Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Link: http://lkml.kernel.org/r/1305134631-31617-1-git-send-email-rabin@rab.in
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/recordmcount: mcount address adjustment</title>
<updated>2011-05-16T18:53:22Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2011-05-10T08:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=07d8b595f367f4604e6027ad4cba33cbe3f55e10'/>
<id>urn:sha1:07d8b595f367f4604e6027ad4cba33cbe3f55e10</id>
<content type='text'>
Introduce mcount_adjust{,_32,_64} to the C implementation of
recordmcount analog to $mcount_adjust in the perl script.
The adjustment is added to the address of the relocations
against the mcount symbol. If this adjustment is done by
recordmcount at compile time the ftrace_call_adjust function
can be turned into a nop.

Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/recordmcount: Add helper function get_sym_str_and_relp()</title>
<updated>2011-05-16T18:48:55Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-04-21T01:13:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=41b402a201a12efdff4acc990e023a89a409cd41'/>
<id>urn:sha1:41b402a201a12efdff4acc990e023a89a409cd41</id>
<content type='text'>
The code to get the symbol, string, and relp pointers in the two functions
sift_rel_mcount() and nop_mcount() are identical and also non-trivial.
Moving this duplicate code into a single helper function makes the code
easier to read and more maintainable.

Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Link: http://lkml.kernel.org/r/20110421023739.723658553@goodmis.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/recordmcount: Remove duplicate code to find mcount symbol</title>
<updated>2011-05-16T18:48:02Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-04-21T00:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=37762cb9977626343b3cd1aab9146313c94748c2'/>
<id>urn:sha1:37762cb9977626343b3cd1aab9146313c94748c2</id>
<content type='text'>
The code in sift_rel_mcount() and nop_mcount() to get the mcount symbol
number is identical. Replace the two locations with a call to a function
that does the work.

Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Link: http://lkml.kernel.org/r/20110421023739.488093407@goodmis.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/recordmcount: Add warning logic to warn on mcount not recorded</title>
<updated>2011-05-16T18:44:20Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-04-12T22:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dfad3d598c4bbbaf137588e22bac1ce624529f7e'/>
<id>urn:sha1:dfad3d598c4bbbaf137588e22bac1ce624529f7e</id>
<content type='text'>
There's some sections that should not have mcount recorded and should not have
modifications to the that code. But currently they waste some time by calling
mcount anyway (which simply returns). As the real answer should be to
either whitelist the section or have gcc ignore it fully.

This change adds a option to recordmcount to warn when it finds a section
that is ignored by ftrace but still contains mcount callers. This is not on
by default as developers may not know if the section should be completely
ignored or added to the whitelist.

Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Link: http://lkml.kernel.org/r/20110421023738.476989377@goodmis.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/recordmcount: Make ignored mcount calls into nops at compile time</title>
<updated>2011-05-16T18:43:32Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-04-08T07:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ffd618fa39284f8cc343894b566dd42ec6e74e77'/>
<id>urn:sha1:ffd618fa39284f8cc343894b566dd42ec6e74e77</id>
<content type='text'>
There are sections that are ignored by ftrace for the function tracing because
the text is in a section that can be removed without notice. The mcount calls
in these sections are ignored and ftrace never sees them. The downside of this
is that the functions in these sections still call mcount. Although the mcount
function is defined in assembly simply as a return, this added overhead is
unnecessary.

The solution is to convert these callers into nops at compile time.
A better solution is to add 'notrace' to the section markers, but as new sections
come up all the time, it would be nice that they are delt with when they
are created.

Later patches will deal with finding these sections and doing the proper solution.

Thanks to H. Peter Anvin for giving me the right nops to use for x86.

Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Link: http://lkml.kernel.org/r/20110421023738.237101176@goodmis.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/recordmcount: Modify only executable sections</title>
<updated>2011-05-16T18:42:56Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-04-13T17:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8abd5724a7f1631ab2276954156c629d4d17149a'/>
<id>urn:sha1:8abd5724a7f1631ab2276954156c629d4d17149a</id>
<content type='text'>
PROGBITS is not enough to determine if the section should be modified
or not. Only process sections that are marked as executable.

Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Link: http://lkml.kernel.org/r/20110421023737.991485123@goodmis.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/trivial: Clean up recordmcount.c to use Linux style comparisons</title>
<updated>2011-05-16T18:38:51Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-04-06T17:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dd5477ff3ba978892014ea5f988cb1bf04aa505e'/>
<id>urn:sha1:dd5477ff3ba978892014ea5f988cb1bf04aa505e</id>
<content type='text'>
The Linux ftrace subsystem style for comparing is:

  var == 1
  var &gt; 0

and not:

  1 == var
  0 &lt; var

It is considered that Linux developers are smart enough not to do the

  if (var = 1)

mistake.

Cc: John Reiser &lt;jreiser@bitwagon.com&gt;
Link: http://lkml.kernel.org/r/20110421023737.290712238@goodmis.org
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>Merge branches 'ftrace', 'gic', 'io', 'kexec', 'mod', 'sa11x0', 'sh' and 'versatile' into devel</title>
<updated>2011-01-05T18:08:10Z</updated>
<author>
<name>Russell King</name>
<email>rmk+kernel@arm.linux.org.uk</email>
</author>
<published>2011-01-05T18:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=31edf274f9aff1ccd39934a0b2fce38f4405c656'/>
<id>urn:sha1:31edf274f9aff1ccd39934a0b2fce38f4405c656</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ARM: 6511/1: ftrace: add ARM support for C version of recordmcount</title>
<updated>2010-12-04T11:30:27Z</updated>
<author>
<name>Rabin Vincent</name>
<email>rabin@rab.in</email>
</author>
<published>2010-11-30T16:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ed60453fa8f8fc3d034dfdf10371a99cc6905626'/>
<id>urn:sha1:ed60453fa8f8fc3d034dfdf10371a99cc6905626</id>
<content type='text'>
Depending on the compiler version, ARM GCC calls the mcount function
either __gnu_mcount_nc or mcount.

Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
</feed>
