<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/scripts/recordmcount.c, branch v3.18.48</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.48</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.18.48'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-08-22T16:23:26Z</updated>
<entry>
<title>ftrace/recordmcount: Work around for addition of metag magic but not relocations</title>
<updated>2016-08-22T16:23:26Z</updated>
<author>
<name>Laura Abbott</name>
<email>labbott@redhat.com</email>
</author>
<published>2016-07-08T19:18:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a7e3694e2d6d06507e2dbdf792caa5973add295'/>
<id>urn:sha1:8a7e3694e2d6d06507e2dbdf792caa5973add295</id>
<content type='text'>
[ Upstream commit b2e1c26f0b62531636509fbcb6dab65617ed8331 ]

glibc recently did a sync up (94e73c95d9b5 "elf.h: Sync with the gabi
webpage") that added a #define for EM_METAG but did not add relocations

This triggers build errors:

scripts/recordmcount.c: In function 'do_file':
scripts/recordmcount.c:466:28: error: 'R_METAG_ADDR32' undeclared (first use in this function)
  case EM_METAG:  reltype = R_METAG_ADDR32;
                            ^~~~~~~~~~~~~~
scripts/recordmcount.c:466:28: note: each undeclared identifier is reported only once for each function it appears in
scripts/recordmcount.c:468:20: error: 'R_METAG_NONE' undeclared (first use in this function)
     rel_type_nop = R_METAG_NONE;
                    ^~~~~~~~~~~~

Work around this change with some more #ifdefery for the relocations.

Fedora Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1354034

Link: http://lkml.kernel.org/r/1468005530-14757-1-git-send-email-labbott@redhat.com

Cc: stable@vger.kernel.org # v3.9+
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Fixes: 00512bdd4573 ("metag: ftrace support")
Reported-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Laura Abbott &lt;labbott@redhat.com&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>s390/ftrace: remove 31 bit ftrace support</title>
<updated>2014-10-09T07:14:18Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2014-10-07T13:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=53255c9a4dade6ff2162121430d13aaadb38a69c'/>
<id>urn:sha1:53255c9a4dade6ff2162121430d13aaadb38a69c</id>
<content type='text'>
31 bit and 64 bit diverge more and more and it is rather painful
to keep both parts running.
To make things simpler just remove the 31 bit support which nobody
uses anyway.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2014-06-13T04:29:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-13T04:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c1fdb2d3389c5a1e7c559a37a4967c1d2580e75c'/>
<id>urn:sha1:c1fdb2d3389c5a1e7c559a37a4967c1d2580e75c</id>
<content type='text'>
Pull kbuild misc updates from Michal Marek:
 "This is the non-critical part of kbuild for v3.16-rc1:
   - make deb-pkg can do s390x and arm64
   - new patterns in scripts/tags.sh
   - scripts/tags.sh skips userspace tools' sources (which sometimes
     have copies of kernel structures) and symlinks
   - improvements to the objdiff tool
   - two new coccinelle patches
   - other minor fixes"

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts: objdiff: support directories for the augument of record command
  scripts: objdiff: fix a comment
  scripts: objdiff: change the extension of disassembly from .o to .dis
  scripts: objdiff: improve path flexibility for record command
  scripts: objdiff: remove unnecessary code
  scripts: objdiff: direct error messages to stderr
  scripts: objdiff: get the path to .tmp_objdiff more simply
  deb-pkg: Add automatic support for s390x architecture
  coccicheck: Add unneeded return variable test
  kbuild: Fix a typo in documentation
  kbuild: trivial - use tabs for code indent where possible
  kbuild: trivial - remove trailing empty lines
  coccinelle: Check for missing NULL terminators in of_device_id tables
  scripts/tags.sh: ignore symlink'ed source files
  scripts/tags.sh: add regular expression replacement pattern for memcg
  builddeb: add arm64 in the supported architectures
  builddeb: use $OBJCOPY variable instead of objcopy
  scripts/tags.sh: ignore code of user space tools
  scripts/tags.sh: add pattern for DEFINE_HASHTABLE
  .gitignore: ignore Module.symvers in all directories
</content>
</entry>
<entry>
<title>kbuild: trivial - remove trailing empty lines</title>
<updated>2014-06-09T22:04:06Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-05-29T05:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7eb6e340526adf14ed7cf7dfde8b9c6fc0741cfc'/>
<id>urn:sha1:7eb6e340526adf14ed7cf7dfde8b9c6fc0741cfc</id>
<content type='text'>
Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
</content>
</entry>
<entry>
<title>ftrace: Add arm64 support to recordmcount</title>
<updated>2014-05-29T08:04:31Z</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2014-04-30T09:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=af64d2aa872a174772ffc00e2558083f70193acb'/>
<id>urn:sha1:af64d2aa872a174772ffc00e2558083f70193acb</id>
<content type='text'>
Recordmcount utility under scripts is run, after compiling each object,
to find out all the locations of calling _mcount() and put them into
specific seciton named __mcount_loc.
Then linker collects all such information into a table in the kernel image
(between __start_mcount_loc and __stop_mcount_loc) for later use by ftrace.

This patch adds arm64 specific definitions to identify such locations.
There are two types of implementation, C and Perl. On arm64, only C version
is used to build the kernel now that CONFIG_HAVE_C_RECORDMCOUNT is on.
But Perl version is also maintained.

This patch also contains a workaround just in case where a header file,
elf.h, on host machine doesn't have definitions of EM_AARCH64 nor
R_AARCH64_ABS64. Without them, compiling C version of recordmcount will
fail.

Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
</content>
</entry>
<entry>
<title>metag: ftrace support</title>
<updated>2013-03-02T20:09:55Z</updated>
<author>
<name>James Hogan</name>
<email>james.hogan@imgtec.com</email>
</author>
<published>2012-10-05T15:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=00512bdd4573674d10af1c1d60328b4b0f9dcafd'/>
<id>urn:sha1:00512bdd4573674d10af1c1d60328b4b0f9dcafd</id>
<content type='text'>
Add ftrace support for metag.

Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Reviewed-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>ftrace/s390: mcount offset calculation</title>
<updated>2011-05-16T19:05:06Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2011-05-10T08:10:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f29638868280534ed7e2fdd93b31557232597940'/>
<id>urn:sha1:f29638868280534ed7e2fdd93b31557232597940</id>
<content type='text'>
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
at compile time and not in ftrace_call_adjust at run time.

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/x86: mcount offset calculation</title>
<updated>2011-05-16T18:55:57Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2011-05-10T08:10:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=521ccb5c4aece609311bfa7157910a8f0c942af5'/>
<id>urn:sha1:521ccb5c4aece609311bfa7157910a8f0c942af5</id>
<content type='text'>
Do the mcount offset adjustment in the recordmcount.pl/recordmcount.[ch]
at compile time and not in ftrace_call_adjust at run time.

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 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>
</feed>
