All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zong Li <zong@andestech.com>
To: <green.hu@gmail.com>, <deanbo422@gmail.com>,
	<rostedt@goodmis.org>, <mingo@redhat.com>, <arnd@arndb.de>,
	<linux-kernel@vger.kernel.org>
Cc: <zongbox@gmail.com>, <greentime@andestech.com>,
	Zong Li <zong@andestech.com>
Subject: [PATCH 0/6] Support ftrace on NDS32 architecture
Date: Wed, 15 Aug 2018 17:35:17 +0800	[thread overview]
Message-ID: <cover.1534323834.git.zong@andestech.com> (raw)

This patch set implements the ftrace function and function graph tracer
on NDS32 architecture. We try to use C code to do everything, so we don't
need to separate the implementation to assembly code and C code, we just
need one ftrace.c file.

In mcount function, we use the prologue/epilogue which generated by compiler
to help us to save/restore the status. On the other hand, we use naked
attribute of gcc to avoid to generate the prologue/epilogue when we don't
need it(such as ftrace_stub and return_to_handler).

We pass the following tests:

1. FTRACE_STARTUP_TEST: PASS

2. tools/testing/selftests/ftrace/:
 # of passed:  28
 # of failed:  1
 # of unresolved:  0
 # of untested:  0
 # of unsupported:  38
 # of xfailed:  0
 # of undefined(test bug):  0

The failed case is func-filter-glob.tc.
When setting the '*aw*lock' to the set_ftrace_filter in this test case,
we got the error because we have no these functions such as _raw_spin_lock,
_raw_spin_trylock and so on in our kernel.

Zong Li (6):
  nds32/ftrace: Support static function tracer
  nds32/ftrace: Support static function graph tracer
  nds32/ftrace: Add RECORD_MCOUNT support
  nds32/ftrace: Support dynamic function tracer
  nds32/ftrace: Support dynamic function graph tracer
  nds32/stack: Get real return address by using ftrace_graph_ret_addr

 arch/nds32/Kconfig              |   4 +
 arch/nds32/Makefile             |   4 +
 arch/nds32/include/asm/ftrace.h |  46 +++++++
 arch/nds32/kernel/Makefile      |   6 +
 arch/nds32/kernel/ftrace.c      | 297 ++++++++++++++++++++++++++++++++++++++++
 arch/nds32/kernel/stacktrace.c  |   4 +
 arch/nds32/kernel/traps.c       |  30 +---
 scripts/recordmcount.pl         |   3 +
 8 files changed, 370 insertions(+), 24 deletions(-)
 create mode 100644 arch/nds32/include/asm/ftrace.h
 create mode 100644 arch/nds32/kernel/ftrace.c

-- 
2.7.4


             reply	other threads:[~2018-08-15  9:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15  9:35 Zong Li [this message]
2018-08-15  9:35 ` [PATCH 1/6] nds32/ftrace: Support static function tracer Zong Li
2018-08-15 20:11   ` Steven Rostedt
2018-08-15  9:35 ` [PATCH 2/6] nds32/ftrace: Support static function graph tracer Zong Li
2018-08-15  9:35 ` [PATCH 3/6] nds32/ftrace: Add RECORD_MCOUNT support Zong Li
2018-08-15  9:35 ` [PATCH 4/6] nds32/ftrace: Support dynamic function tracer Zong Li
2018-08-15  9:35 ` [PATCH 5/6] nds32/ftrace: Support dynamic function graph tracer Zong Li
2018-08-15  9:35 ` [PATCH 6/6] nds32/stack: Get real return address by using ftrace_graph_ret_addr Zong Li
2018-08-21  7:03 ` [PATCH 0/6] Support ftrace on NDS32 architecture Greentime Hu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1534323834.git.zong@andestech.com \
    --to=zong@andestech.com \
    --cc=arnd@arndb.de \
    --cc=deanbo422@gmail.com \
    --cc=green.hu@gmail.com \
    --cc=greentime@andestech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=zongbox@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.