Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211933
b: refs/heads/master
c: f92f6e6
h: refs/heads/master
i:
  211931: ea06512
v: v3
  • Loading branch information
Ingo Molnar committed Oct 16, 2010
1 parent 2a26086 commit 1127c6e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd254f295248c98b62ea824f361e10d80a081fe7
refs/heads/master: f92f6e6ee35d2779aa62e70f78ad8e1cd417eb52
2 changes: 1 addition & 1 deletion trunk/scripts/Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ endif

ifdef CONFIG_FTRACE_MCOUNT_RECORD
ifdef BUILD_C_RECORDMCOUNT
cmd_record_mcount = $(srctree)/scripts/recordmcount "$(@)";
cmd_record_mcount = $(objtree)/scripts/recordmcount "$(@)";
else
cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
"$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
Expand Down
22 changes: 20 additions & 2 deletions trunk/scripts/recordmcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,30 @@ do_file(char const *const fname)
int
main(int argc, char const *argv[])
{
const char ftrace[] = "kernel/trace/ftrace.o";
int ftrace_size = sizeof(ftrace) - 1;
int n_error = 0; /* gcc-4.3.0 false positive complaint */
if (argc <= 1)

if (argc <= 1) {
fprintf(stderr, "usage: recordmcount file.o...\n");
else /* Process each file in turn, allowing deep failure. */
return 0;
}

/* Process each file in turn, allowing deep failure. */
for (--argc, ++argv; 0 < argc; --argc, ++argv) {
int const sjval = setjmp(jmpenv);
int len;

/*
* The file kernel/trace/ftrace.o references the mcount
* function but does not call it. Since ftrace.o should
* not be traced anyway, we just skip it.
*/
len = strlen(argv[0]);
if (len >= ftrace_size &&
strcmp(argv[0] + (len - ftrace_size), ftrace) == 0)
continue;

switch (sjval) {
default: {
fprintf(stderr, "internal error: %s\n", argv[0]);
Expand Down

0 comments on commit 1127c6e

Please sign in to comment.