From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbdH2LRJ (ORCPT ); Tue, 29 Aug 2017 07:17:09 -0400 Received: from terminus.zytor.com ([65.50.211.136]:38031 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdH2LRH (ORCPT ); Tue, 29 Aug 2017 07:17:07 -0400 Date: Tue, 29 Aug 2017 04:12:22 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, rostedt@goodmis.org, mingo@kernel.org, luto@kernel.org, bp@alien8.de Reply-To: hpa@zytor.com, tglx@linutronix.de, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, peterz@infradead.org, rostedt@goodmis.org, mingo@kernel.org, luto@kernel.org, bp@alien8.de In-Reply-To: <20170828064957.770651777@linutronix.de> References: <20170828064957.770651777@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/tracing: Build tracepoints only when they are used Git-Commit-ID: 73285527804402befe5d5140aeede21c16544b4c 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: 73285527804402befe5d5140aeede21c16544b4c Gitweb: http://git.kernel.org/tip/73285527804402befe5d5140aeede21c16544b4c Author: Thomas Gleixner AuthorDate: Mon, 28 Aug 2017 08:47:36 +0200 Committer: Ingo Molnar CommitDate: Tue, 29 Aug 2017 12:07:24 +0200 x86/tracing: Build tracepoints only when they are used The tracepoint macro magic emits code for all tracepoints in a event header file. That code stays around even if the tracepoint is not used at all. The linker does not discard it. Build the various irq_vector tracepoints dependent on the appropriate CONFIG switches. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064957.770651777@linutronix.de Signed-off-by: Ingo Molnar --- arch/x86/include/asm/trace/irq_vectors.h | 36 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/arch/x86/include/asm/trace/irq_vectors.h b/arch/x86/include/asm/trace/irq_vectors.h index a1bdc25..1599d39 100644 --- a/arch/x86/include/asm/trace/irq_vectors.h +++ b/arch/x86/include/asm/trace/irq_vectors.h @@ -7,6 +7,8 @@ #include #include +#ifdef CONFIG_X86_LOCAL_APIC + extern int trace_resched_ipi_reg(void); extern void trace_resched_ipi_unreg(void); @@ -53,18 +55,6 @@ DEFINE_EVENT_FN(x86_irq_vector, name##_exit, \ DEFINE_IRQ_VECTOR_EVENT(local_timer); /* - * The ifdef is required because that tracepoint macro hell emits tracepoint - * code in files which include this header even if the tracepoint is not - * enabled. Brilliant stuff that. - */ -#ifdef CONFIG_SMP -/* - * reschedule - called when entering/exiting a reschedule vector handler - */ -DEFINE_RESCHED_IPI_EVENT(reschedule); -#endif - -/* * spurious_apic - called when entering/exiting a spurious apic vector handler */ DEFINE_IRQ_VECTOR_EVENT(spurious_apic); @@ -80,6 +70,7 @@ DEFINE_IRQ_VECTOR_EVENT(error_apic); */ DEFINE_IRQ_VECTOR_EVENT(x86_platform_ipi); +#ifdef CONFIG_IRQ_WORK /* * irq_work - called when entering/exiting a irq work interrupt * vector handler @@ -96,6 +87,18 @@ DEFINE_IRQ_VECTOR_EVENT(irq_work); * 4) goto 1 */ TRACE_EVENT_PERF_PERM(irq_work_exit, is_sampling_event(p_event) ? -EPERM : 0); +#endif + +/* + * The ifdef is required because that tracepoint macro hell emits tracepoint + * code in files which include this header even if the tracepoint is not + * enabled. Brilliant stuff that. + */ +#ifdef CONFIG_SMP +/* + * reschedule - called when entering/exiting a reschedule vector handler + */ +DEFINE_RESCHED_IPI_EVENT(reschedule); /* * call_function - called when entering/exiting a call function interrupt @@ -108,24 +111,33 @@ DEFINE_IRQ_VECTOR_EVENT(call_function); * single interrupt vector handler */ DEFINE_IRQ_VECTOR_EVENT(call_function_single); +#endif +#ifdef CONFIG_X86_MCE_THRESHOLD /* * threshold_apic - called when entering/exiting a threshold apic interrupt * vector handler */ DEFINE_IRQ_VECTOR_EVENT(threshold_apic); +#endif +#ifdef CONFIG_X86_MCE_AMD /* * deferred_error_apic - called when entering/exiting a deferred apic interrupt * vector handler */ DEFINE_IRQ_VECTOR_EVENT(deferred_error_apic); +#endif +#ifdef CONFIG_X86_THERMAL_VECTOR /* * thermal_apic - called when entering/exiting a thermal apic interrupt * vector handler */ DEFINE_IRQ_VECTOR_EVENT(thermal_apic); +#endif + +#endif /* CONFIG_X86_LOCAL_APIC */ #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH .