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: Roland Dreier <rdreier@cisco.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Steven Rostedt and committed by Ingo Molnar 7dbdee2e 469535a5

+2 -2
+2 -2
scripts/recordmcount.pl
··· 393 393 $read_function = 0; 394 394 } 395 395 # print out any recorded offsets 396 - update_funcs() if ($text_found); 396 + update_funcs() if (defined($ref_func)); 397 397 398 398 # reset all markers and arrays 399 399 $text_found = 0; ··· 444 444 } 445 445 446 446 # dump out anymore offsets that may have been found 447 - update_funcs() if ($text_found); 447 + update_funcs() if (defined($ref_func)); 448 448 449 449 # If we did not find any mcount callers, we are done (do nothing). 450 450 if (!$opened) {