diff mbox

Makefile: Fix backtrace breakage

Message ID 201806210547.w5L5l5Mh029257@www262.sakura.ne.jp (mailing list archive)
State New, archived
Headers show

Commit Message

Tetsuo Handa June 21, 2018, 5:47 a.m. UTC
From 7208bf13827fa7c7d6196ee20f7678eff0d29b36 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Thu, 21 Jun 2018 14:15:10 +0900
Subject: [PATCH] Makefile: Fix backtrace breakage

Dave Chinner noticed that backtrace part is missing in a lockdep report.

  [   68.760085] the existing dependency chain (in reverse order) is:
  [   69.258520]
  [   69.258520] -> #1 (fs_reclaim){+.+.}:
  [   69.623516]
  [   69.623516] -> #0 (sb_internal){.+.+}:
  [   70.152322]
  [   70.152322] other info that might help us debug this:

Since the kernel was using CONFIG_FTRACE_MCOUNT_RECORD=n &&
CONFIG_FRAME_POINTER=n, objtool_args was not properly calculated
due to incorrectly placed "endif" in commit 96f60dfa5819a065 ("trace:
Use -mcount-record for dynamic ftrace").

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 scripts/Makefile.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg Thelen June 21, 2018, 5:56 a.m. UTC | #1
On Wed, Jun 20, 2018 at 10:47 PM Tetsuo Handa
<penguin-kernel@i-love.sakura.ne.jp> wrote:
>
> From 7208bf13827fa7c7d6196ee20f7678eff0d29b36 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Thu, 21 Jun 2018 14:15:10 +0900
> Subject: [PATCH] Makefile: Fix backtrace breakage
>
> Dave Chinner noticed that backtrace part is missing in a lockdep report.
>
>   [   68.760085] the existing dependency chain (in reverse order) is:
>   [   69.258520]
>   [   69.258520] -> #1 (fs_reclaim){+.+.}:
>   [   69.623516]
>   [   69.623516] -> #0 (sb_internal){.+.+}:
>   [   70.152322]
>   [   70.152322] other info that might help us debug this:
>
> Since the kernel was using CONFIG_FTRACE_MCOUNT_RECORD=n &&
> CONFIG_FRAME_POINTER=n, objtool_args was not properly calculated
> due to incorrectly placed "endif" in commit 96f60dfa5819a065 ("trace:
> Use -mcount-record for dynamic ftrace").
>
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: Dave Chinner <david@fromorbit.com>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>

This looks similar to https://lkml.org/lkml/2018/6/8/545

> ---
>  scripts/Makefile.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 34d9e9c..55f22f4 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -239,6 +239,7 @@ cmd_record_mcount =                                         \
>              "$(CC_FLAGS_FTRACE)" ]; then                       \
>                 $(sub_cmd_record_mcount)                        \
>         fi;
> +endif
>  endif # CONFIG_FTRACE_MCOUNT_RECORD
>
>  ifdef CONFIG_STACK_VALIDATION
> @@ -263,7 +264,6 @@ ifneq ($(RETPOLINE_CFLAGS),)
>    objtool_args += --retpoline
>  endif
>  endif
> -endif
>
>
>  ifdef CONFIG_MODVERSIONS
> --
> 1.8.3.1
>
Andi Kleen June 21, 2018, 8:48 p.m. UTC | #2
On Thu, Jun 21, 2018 at 02:47:05PM +0900, Tetsuo Handa wrote:
> From 7208bf13827fa7c7d6196ee20f7678eff0d29b36 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Thu, 21 Jun 2018 14:15:10 +0900
> Subject: [PATCH] Makefile: Fix backtrace breakage
> 
> Dave Chinner noticed that backtrace part is missing in a lockdep report.
> 
>   [   68.760085] the existing dependency chain (in reverse order) is:
>   [   69.258520]
>   [   69.258520] -> #1 (fs_reclaim){+.+.}:
>   [   69.623516]
>   [   69.623516] -> #0 (sb_internal){.+.+}:
>   [   70.152322]
>   [   70.152322] other info that might help us debug this:

Thanks. Was already fixed earlier I believe.

-Andi
Steven Rostedt June 21, 2018, 9:30 p.m. UTC | #3
On Thu, 21 Jun 2018 13:48:34 -0700
Andi Kleen <ak@linux.intel.com> wrote:

> On Thu, Jun 21, 2018 at 02:47:05PM +0900, Tetsuo Handa wrote:
> > From 7208bf13827fa7c7d6196ee20f7678eff0d29b36 Mon Sep 17 00:00:00 2001
> > From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> > Date: Thu, 21 Jun 2018 14:15:10 +0900
> > Subject: [PATCH] Makefile: Fix backtrace breakage
> > 
> > Dave Chinner noticed that backtrace part is missing in a lockdep report.
> > 
> >   [   68.760085] the existing dependency chain (in reverse order) is:
> >   [   69.258520]
> >   [   69.258520] -> #1 (fs_reclaim){+.+.}:
> >   [   69.623516]
> >   [   69.623516] -> #0 (sb_internal){.+.+}:
> >   [   70.152322]
> >   [   70.152322] other info that might help us debug this:  
> 
> Thanks. Was already fixed earlier I believe.
> 
> 

I actually just pulled the patch in an hour ago, and I'm currently
testing it along with other patches.

Thanks!

-- Steve
Steven Rostedt June 21, 2018, 9:31 p.m. UTC | #4
On Thu, 21 Jun 2018 17:30:27 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> I actually just pulled the patch in an hour ago, and I'm currently
> testing it along with other patches.

To clear up any ambiguity, this is the patch I pulled in:

 http://lkml.kernel.org/r/20180608214746.136554-1-gthelen@google.com

-- Steve
diff mbox

Patch

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 34d9e9c..55f22f4 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -239,6 +239,7 @@  cmd_record_mcount =						\
 	     "$(CC_FLAGS_FTRACE)" ]; then			\
 		$(sub_cmd_record_mcount)			\
 	fi;
+endif
 endif # CONFIG_FTRACE_MCOUNT_RECORD
 
 ifdef CONFIG_STACK_VALIDATION
@@ -263,7 +264,6 @@  ifneq ($(RETPOLINE_CFLAGS),)
   objtool_args += --retpoline
 endif
 endif
-endif
 
 
 ifdef CONFIG_MODVERSIONS