Re: [patches] Re: [PATCH v4 0/6] Add dynamic ftrace support for RISC-V platforms

2018-02-23 Thread Palmer Dabbelt

On Tue, 20 Feb 2018 18:45:39 PST (-0800), alan...@andestech.com wrote:

On Tue, Feb 13, 2018 at 01:13:15PM +0800, Alan Quey-Liang Kao(高魁良) wrote:

This patch set includes the building blocks of dynamic ftrace features
for RISC-V machines.

Changes in v4:
 - Organize code structure according to changes in v3
 - Rebase onto the riscv-linux-4.15 branch at github's 
   riscv/riscv-linux repo.  Note that this set is based on the previous

   ftrace patch, which provided basic support.

Changes in v3:
 - Replace the nops at the tracer call sites into "call ftrace_stub"
   instructions for better understanding (1/6, 2/6 and 5/6)

Changes in v2:
 - Fix the return value as writing to kernel text goes wrong (2/6)
 - Replace manual comparisons by calling memcmp (2/6)
 - Simplify the conditional assignment in the Makefile (1/6)

Alan Kao (6):
  riscv/ftrace: Add RECORD_MCOUNT support
  riscv/ftrace: Add dynamic function tracer support
  riscv/ftrace: Add dynamic function graph tracer support
  riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support
  riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support
  riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support

 arch/riscv/Kconfig  |   3 +
 arch/riscv/Makefile |   3 +
 arch/riscv/include/asm/ftrace.h |  56 ++
 arch/riscv/kernel/Makefile  |   5 +-
 arch/riscv/kernel/ftrace.c  | 175 -
 arch/riscv/kernel/mcount-dyn.S  | 239 
 arch/riscv/kernel/mcount.S  |  22 ++--
 arch/riscv/kernel/stacktrace.c  |   6 +
 scripts/recordmcount.pl |   5 +
 9 files changed, 501 insertions(+), 13 deletions(-)
 create mode 100644 arch/riscv/kernel/mcount-dyn.S

--
2.15.1



Any comments? 


Sorry, my email latency is a bit long now as I'm still backed up from FOSDEM.  
This looks good, it should already be in our for-next branch.


Re: [patches] [PATCH v4 0/6] Add dynamic ftrace support for RISC-V platforms

2018-02-22 Thread Alan Kao
On Thu, Feb 22, 2018 at 12:05:11AM +0800, Palmer Dabbelt wrote:
> On Mon, 12 Feb 2018 21:13:15 PST (-0800), alan...@andestech.com wrote:
> > This patch set includes the building blocks of dynamic ftrace features
> > for RISC-V machines.
> >
> > Changes in v4:
> >  - Organize code structure according to changes in v3
> >  - Rebase onto the riscv-linux-4.15 branch at github's
> >riscv/riscv-linux repo.  Note that this set is based on the previous
> >ftrace patch, which provided basic support.
> >
> > Changes in v3:
> >  - Replace the nops at the tracer call sites into "call ftrace_stub"
> >instructions for better understanding (1/6, 2/6 and 5/6)
> >
> > Changes in v2:
> >  - Fix the return value as writing to kernel text goes wrong (2/6)
> >  - Replace manual comparisons by calling memcmp (2/6)
> >  - Simplify the conditional assignment in the Makefile (1/6)
> >
> > Alan Kao (6):
> >   riscv/ftrace: Add RECORD_MCOUNT support
> >   riscv/ftrace: Add dynamic function tracer support
> >   riscv/ftrace: Add dynamic function graph tracer support
> >   riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support
> >   riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support
> >   riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support
> >
> >  arch/riscv/Kconfig  |   3 +
> >  arch/riscv/Makefile |   3 +
> >  arch/riscv/include/asm/ftrace.h |  56 ++
> >  arch/riscv/kernel/Makefile  |   5 +-
> >  arch/riscv/kernel/ftrace.c  | 175 -
> >  arch/riscv/kernel/mcount-dyn.S  | 239 
> > 
> >  arch/riscv/kernel/mcount.S  |  22 ++--
> >  arch/riscv/kernel/stacktrace.c  |   6 +
> >  scripts/recordmcount.pl |   5 +
> >  9 files changed, 501 insertions(+), 13 deletions(-)
> >  create mode 100644 arch/riscv/kernel/mcount-dyn.S
> 
> Thanks!  I've added this to our for-next tree, it should be good to go for 
> 4.17.  Sorry this took a while, I'm still a bit behind from FOSDEM.

Thanks!

Alan


Re: [patches] [PATCH v4 0/6] Add dynamic ftrace support for RISC-V platforms

2018-02-21 Thread Palmer Dabbelt

On Mon, 12 Feb 2018 21:13:15 PST (-0800), alan...@andestech.com wrote:

This patch set includes the building blocks of dynamic ftrace features
for RISC-V machines.

Changes in v4:
 - Organize code structure according to changes in v3
 - Rebase onto the riscv-linux-4.15 branch at github's
   riscv/riscv-linux repo.  Note that this set is based on the previous
   ftrace patch, which provided basic support.

Changes in v3:
 - Replace the nops at the tracer call sites into "call ftrace_stub"
   instructions for better understanding (1/6, 2/6 and 5/6)

Changes in v2:
 - Fix the return value as writing to kernel text goes wrong (2/6)
 - Replace manual comparisons by calling memcmp (2/6)
 - Simplify the conditional assignment in the Makefile (1/6)

Alan Kao (6):
  riscv/ftrace: Add RECORD_MCOUNT support
  riscv/ftrace: Add dynamic function tracer support
  riscv/ftrace: Add dynamic function graph tracer support
  riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support
  riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support
  riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support

 arch/riscv/Kconfig  |   3 +
 arch/riscv/Makefile |   3 +
 arch/riscv/include/asm/ftrace.h |  56 ++
 arch/riscv/kernel/Makefile  |   5 +-
 arch/riscv/kernel/ftrace.c  | 175 -
 arch/riscv/kernel/mcount-dyn.S  | 239 
 arch/riscv/kernel/mcount.S  |  22 ++--
 arch/riscv/kernel/stacktrace.c  |   6 +
 scripts/recordmcount.pl |   5 +
 9 files changed, 501 insertions(+), 13 deletions(-)
 create mode 100644 arch/riscv/kernel/mcount-dyn.S


Thanks!  I've added this to our for-next tree, it should be good to go for 
4.17.  Sorry this took a while, I'm still a bit behind from FOSDEM.


Re: [PATCH v4 0/6] Add dynamic ftrace support for RISC-V platforms

2018-02-20 Thread Alan Kao
On Tue, Feb 13, 2018 at 01:13:15PM +0800, Alan Quey-Liang Kao(高魁良) wrote:
> This patch set includes the building blocks of dynamic ftrace features
> for RISC-V machines.
> 
> Changes in v4:
>  - Organize code structure according to changes in v3
>  - Rebase onto the riscv-linux-4.15 branch at github's 
>riscv/riscv-linux repo.  Note that this set is based on the previous
>ftrace patch, which provided basic support.
> 
> Changes in v3:
>  - Replace the nops at the tracer call sites into "call ftrace_stub"
>instructions for better understanding (1/6, 2/6 and 5/6)
> 
> Changes in v2:
>  - Fix the return value as writing to kernel text goes wrong (2/6)
>  - Replace manual comparisons by calling memcmp (2/6)
>  - Simplify the conditional assignment in the Makefile (1/6)
> 
> Alan Kao (6):
>   riscv/ftrace: Add RECORD_MCOUNT support
>   riscv/ftrace: Add dynamic function tracer support
>   riscv/ftrace: Add dynamic function graph tracer support
>   riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support
>   riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support
>   riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support
> 
>  arch/riscv/Kconfig  |   3 +
>  arch/riscv/Makefile |   3 +
>  arch/riscv/include/asm/ftrace.h |  56 ++
>  arch/riscv/kernel/Makefile  |   5 +-
>  arch/riscv/kernel/ftrace.c  | 175 -
>  arch/riscv/kernel/mcount-dyn.S  | 239 
> 
>  arch/riscv/kernel/mcount.S  |  22 ++--
>  arch/riscv/kernel/stacktrace.c  |   6 +
>  scripts/recordmcount.pl |   5 +
>  9 files changed, 501 insertions(+), 13 deletions(-)
>  create mode 100644 arch/riscv/kernel/mcount-dyn.S
> 
> -- 
> 2.15.1
>

Any comments? 


[PATCH v4 0/6] Add dynamic ftrace support for RISC-V platforms

2018-02-12 Thread Alan Kao
This patch set includes the building blocks of dynamic ftrace features
for RISC-V machines.

Changes in v4:
 - Organize code structure according to changes in v3
 - Rebase onto the riscv-linux-4.15 branch at github's 
   riscv/riscv-linux repo.  Note that this set is based on the previous
   ftrace patch, which provided basic support.

Changes in v3:
 - Replace the nops at the tracer call sites into "call ftrace_stub"
   instructions for better understanding (1/6, 2/6 and 5/6)

Changes in v2:
 - Fix the return value as writing to kernel text goes wrong (2/6)
 - Replace manual comparisons by calling memcmp (2/6)
 - Simplify the conditional assignment in the Makefile (1/6)

Alan Kao (6):
  riscv/ftrace: Add RECORD_MCOUNT support
  riscv/ftrace: Add dynamic function tracer support
  riscv/ftrace: Add dynamic function graph tracer support
  riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support
  riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support
  riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support

 arch/riscv/Kconfig  |   3 +
 arch/riscv/Makefile |   3 +
 arch/riscv/include/asm/ftrace.h |  56 ++
 arch/riscv/kernel/Makefile  |   5 +-
 arch/riscv/kernel/ftrace.c  | 175 -
 arch/riscv/kernel/mcount-dyn.S  | 239 
 arch/riscv/kernel/mcount.S  |  22 ++--
 arch/riscv/kernel/stacktrace.c  |   6 +
 scripts/recordmcount.pl |   5 +
 9 files changed, 501 insertions(+), 13 deletions(-)
 create mode 100644 arch/riscv/kernel/mcount-dyn.S

-- 
2.15.1