From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756178AbbLDMAU (ORCPT ); Fri, 4 Dec 2015 07:00:20 -0500 Received: from terminus.zytor.com ([198.137.202.10]:60375 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbbLDMAR (ORCPT ); Fri, 4 Dec 2015 07:00:17 -0500 Date: Fri, 4 Dec 2015 03:59:21 -0800 From: tip-bot for Andi Kleen Message-ID: Cc: ak@linux.intel.com, vincent.weaver@maine.edu, rostedt@goodmis.org, peterz@infradead.org, tglx@linutronix.de, efault@gmx.de, linux-kernel@vger.kernel.org, eranian@google.com, mingo@kernel.org, acme@redhat.com, hpa@zytor.com, jolsa@redhat.com, torvalds@linux-foundation.org Reply-To: tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, ak@linux.intel.com, vincent.weaver@maine.edu, torvalds@linux-foundation.org, jolsa@redhat.com, hpa@zytor.com, mingo@kernel.org, acme@redhat.com, eranian@google.com, linux-kernel@vger.kernel.org, efault@gmx.de In-Reply-To: <1449018060-1742-2-git-send-email-andi@firstfloor.org> References: <1449018060-1742-2-git-send-email-andi@firstfloor.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tracepoints: Move struct tracepoint to new tracepoint-defs.h header Git-Commit-ID: 44eed5cd81f3a95ab6dd67b627e0d83a769efa1f X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 44eed5cd81f3a95ab6dd67b627e0d83a769efa1f Gitweb: http://git.kernel.org/tip/44eed5cd81f3a95ab6dd67b627e0d83a769efa1f Author: Andi Kleen AuthorDate: Tue, 1 Dec 2015 17:00:58 -0800 Committer: Ingo Molnar CommitDate: Fri, 4 Dec 2015 10:58:34 +0100 tracepoints: Move struct tracepoint to new tracepoint-defs.h header Steven recommended open coding access to tracepoint->key to add trace points to headers. Unfortunately this is difficult for some headers (such as x86 asm/msr.h) because including tracepoint.h includes so many other headers that it causes include loops. The main problem is the include of linux/rcupdate.h, which pulls in a lot of other headers. The rcu header is only needed when actually defining trace points. Move the struct tracepoint into a separate tracepoint-defs.h header that can be included without pulling in all of RCU. Signed-off-by: Andi Kleen Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: http://lkml.kernel.org/r/1449018060-1742-2-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar --- include/linux/tracepoint-defs.h | 27 +++++++++++++++++++++++++++ include/linux/tracepoint.h | 16 +--------------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/include/linux/tracepoint-defs.h b/include/linux/tracepoint-defs.h new file mode 100644 index 0000000..e1ee97c --- /dev/null +++ b/include/linux/tracepoint-defs.h @@ -0,0 +1,27 @@ +#ifndef TRACEPOINT_DEFS_H +#define TRACEPOINT_DEFS_H 1 + +/* + * File can be included directly by headers who only want to access + * tracepoint->key to guard out of line trace calls. Otherwise + * linux/tracepoint.h should be used. + */ + +#include +#include + +struct tracepoint_func { + void *func; + void *data; + int prio; +}; + +struct tracepoint { + const char *name; /* Tracepoint name */ + struct static_key key; + void (*regfunc)(void); + void (*unregfunc)(void); + struct tracepoint_func __rcu *funcs; +}; + +#endif diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 696a339c..f7c732b 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -17,26 +17,12 @@ #include #include #include -#include +#include struct module; struct tracepoint; struct notifier_block; -struct tracepoint_func { - void *func; - void *data; - int prio; -}; - -struct tracepoint { - const char *name; /* Tracepoint name */ - struct static_key key; - void (*regfunc)(void); - void (*unregfunc)(void); - struct tracepoint_func __rcu *funcs; -}; - struct trace_enum_map { const char *system; const char *enum_string;