提交 7dbdee2e 编写于 作者: S Steven Rostedt 提交者: Ingo Molnar

tracing: Fix recordmcount.pl to handle sections with only weak functions

Roland Dreier found that a section that contained only a weak
function in one of the staging drivers and this caused
recordmcount.pl to spit out a warning and fail.

Although it is strange that a driver would have a weak function, and
this function only be used in one place, it should not be something
to make recordmcount.pl fail.

This patch fixes the issue in a simple manner: if only weak
functions exist in a section, then that section will not be
recorded.
Reported-by: NRoland Dreier <rdreier@cisco.com>
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 469535a5
......@@ -393,7 +393,7 @@ while (<IN>) {
$read_function = 0;
}
# print out any recorded offsets
update_funcs() if ($text_found);
update_funcs() if (defined($ref_func));
# reset all markers and arrays
$text_found = 0;
......@@ -444,7 +444,7 @@ while (<IN>) {
}
# dump out anymore offsets that may have been found
update_funcs() if ($text_found);
update_funcs() if (defined($ref_func));
# If we did not find any mcount callers, we are done (do nothing).
if (!$opened) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册