public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 6/8] ftrace: Out of line ftrace_trigger_soft_disabled
Date: Fri, 16 May 2014 14:43:13 -0700	[thread overview]
Message-ID: <1400276595-6965-7-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1400276595-6965-1-git-send-email-andi@firstfloor.org>

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

Out of lining this function saves about 14k text

   text	   data	    bss	    dec	    hex	filename
14094629	2004040	1507328	17605997	10ca56d	vmlinux-before-ftrace
14079650	2008136	1507328	17595114	10c7aea	vmlinux-ftrace

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 include/linux/ftrace_event.h        | 23 +----------------------
 kernel/trace/trace_events_trigger.c | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index d16da3e..70be665 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -416,28 +416,7 @@ extern enum event_trigger_type event_triggers_call(struct ftrace_event_file *fil
 extern void event_triggers_post_call(struct ftrace_event_file *file,
 				     enum event_trigger_type tt);
 
-/**
- * ftrace_trigger_soft_disabled - do triggers and test if soft disabled
- * @file: The file pointer of the event to test
- *
- * If any triggers without filters are attached to this event, they
- * will be called here. If the event is soft disabled and has no
- * triggers that require testing the fields, it will return true,
- * otherwise false.
- */
-static inline bool
-ftrace_trigger_soft_disabled(struct ftrace_event_file *file)
-{
-	unsigned long eflags = file->flags;
-
-	if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
-		if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
-			event_triggers_call(file, NULL);
-		if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
-			return true;
-	}
-	return false;
-}
+extern bool ftrace_trigger_soft_disabled(struct ftrace_event_file *file);
 
 /*
  * Helper function for event_trigger_unlock_commit{_regs}().
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index 4747b47..136c181 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -28,6 +28,31 @@
 static LIST_HEAD(trigger_commands);
 static DEFINE_MUTEX(trigger_cmd_mutex);
 
+
+/**
+ * ftrace_trigger_soft_disabled - do triggers and test if soft disabled
+ * @file: The file pointer of the event to test
+ *
+ * If any triggers without filters are attached to this event, they
+ * will be called here. If the event is soft disabled and has no
+ * triggers that require testing the fields, it will return true,
+ * otherwise false.
+ */
+bool
+ftrace_trigger_soft_disabled(struct ftrace_event_file *file)
+{
+	unsigned long eflags = file->flags;
+
+	if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
+		if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
+			event_triggers_call(file, NULL);
+		if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
+			return true;
+	}
+	return false;
+}
+EXPORT_SYMBOL(ftrace_trigger_soft_disabled);
+
 static void
 trigger_data_free(struct event_trigger_data *data)
 {
-- 
1.9.0


  parent reply	other threads:[~2014-05-16 21:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 21:43 Fix some common inline bloat Andi Kleen
2014-05-16 21:43 ` [PATCH 1/8] ixgbe: Out of line ixgbe_read/write_reg Andi Kleen
2014-05-19  9:14   ` David Laight
2014-05-19 22:00   ` Rustad, Mark D
2014-05-19 23:25     ` Andi Kleen
2014-05-20 17:06       ` Rustad, Mark D
2014-05-16 21:43 ` [PATCH 2/8] radeonfb: Out of line errata workarounds Andi Kleen
2014-05-16 21:43 ` [PATCH 3/8] list: Out of line INIT_LIST_HEAD and list_del Andi Kleen
2014-05-17  0:03   ` Dave Jones
2014-05-17  2:37     ` Andi Kleen
2014-05-17  0:03   ` Eric Dumazet
2014-05-16 21:43 ` [PATCH 4/8] e1000e: Out of line __ew32_prepare/__ew32 Andi Kleen
2014-05-17  3:23   ` Stephen Hemminger
2014-05-16 21:43 ` [PATCH 5/8] x86: Out of line get_dma_ops Andi Kleen
2014-05-16 21:43 ` Andi Kleen [this message]
2014-05-16 21:43 ` [PATCH 7/8] radeon: Out of line radeon_get_ib_value Andi Kleen
2014-05-20 16:16   ` Marek Olšák
2014-05-20 17:04     ` Andi Kleen
2014-05-20 18:14     ` Christian König
2014-05-16 21:43 ` [PATCH 8/8] Kbuild: add inline-account tool to find inline bloat Andi Kleen
2014-05-17  8:31   ` Sam Ravnborg
2014-05-17  9:36     ` Sam Ravnborg
2014-05-17 16:51       ` Andi Kleen

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=1400276595-6965-7-git-send-email-andi@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.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