mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <ak@linux.intel.com>
Subject: [for-next][PATCH 01/19] trace: Use -mcount-record for dynamic ftrace
Date: Tue, 29 May 2018 11:23:05 -0400	[thread overview]
Message-ID: <20180529152326.009479578@goodmis.org> (raw)
In-Reply-To: <20180529152304.885389740@goodmis.org>

[-- Attachment #1: 0001-trace-Use-mcount-record-for-dynamic-ftrace.patch --]
[-- Type: text/plain, Size: 1380 bytes --]

From: Andi Kleen <ak@linux.intel.com>

gcc 5 supports a new -mcount-record option to generate ftrace
tables directly. This avoids the need to run record_mcount
manually.

Use this option when available.

So far doesn't use -mcount-nop, which also exists now.

This is needed to make ftrace work with LTO because the
normal record-mcount script doesn't run over the link
time output.

It should also improve build times slightly in the general
case.
Link: http://lkml.kernel.org/r/20171127213423.27218-12-andi@firstfloor.org

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 scripts/Makefile.build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 8bdb1dc4072c..dcbca18011bb 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -207,6 +207,11 @@ cmd_modversions_c =								\
 endif
 
 ifdef CONFIG_FTRACE_MCOUNT_RECORD
+# gcc 5 supports generating the mcount tables directly
+ifneq ($(call cc-option,-mrecord-mcount,y),y)
+KBUILD_CFLAGS += -mrecord-mcount
+else
+# else do it all manually
 ifdef BUILD_C_RECORDMCOUNT
 ifeq ("$(origin RECORDMCOUNT_WARN)", "command line")
   RECORDMCOUNT_FLAGS = -w
@@ -259,6 +264,7 @@ ifneq ($(RETPOLINE_CFLAGS),)
   objtool_args += --retpoline
 endif
 endif
+endif
 
 
 ifdef CONFIG_MODVERSIONS
-- 
2.17.0

  reply	other threads:[~2018-05-29 15:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 15:23 [for-next][PATCH 00/19] tracing: Updates for 4.18 Steven Rostedt
2018-05-29 15:23 ` Steven Rostedt [this message]
2018-05-29 15:23 ` [for-next][PATCH 02/19] tracepoints: Fix the descriptions of tracepoint_probe_register{_prio} Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 03/19] tracing: Do not reference event data in post call triggers Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 04/19] tracing: Add __find_event_file() to find event files without restrictions Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 05/19] tracing: Have event_trace_init() called by trace_init_tracefs() Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 06/19] tracing: Add brackets in ftrace event dynamic arrays Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 07/19] tracing: Do not show filter file for ftrace internal events Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 08/19] tracing: Add trigger file for trace_markers tracefs/ftrace/print Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 09/19] tracing: Have zero size length in filter logic be full string Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 10/19] tracing: Prevent further users of zero size static arrays in trace events Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 11/19] tracing: Allow histogram triggers to access ftrace internal events Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 12/19] tracing: Document trace_marker triggers Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 13/19] ftrace/selftest: Have the reset_trigger code be a bit more careful Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 14/19] ftrace/selftest: Fix reset_trigger() to handle triggers with filters Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 15/19] tracing/selftest: Add selftests to test trace_marker histogram triggers Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 16/19] tracing/selftest: Add test to test hist trigger between kernel event and trace_marker Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 17/19] tracing/selftest: Add test to test simple snapshot trigger for trace_marker Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 18/19] ring-buffer: Fix a bunch of typos in comments Steven Rostedt
2018-05-29 15:23 ` [for-next][PATCH 19/19] ring-buffer: Fix typo in comment Steven Rostedt

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=20180529152326.009479578@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®