From: Thomas Gleixner <tglx@linutronix.de>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org, LKML <linux-kernel@vger.kernel.org>,
tipbuild@zytor.com, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [tip:WIP.x86/apic 40/43] arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg'
Date: Fri, 25 Aug 2017 14:26:18 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1708251426050.1883@nanos> (raw)
In-Reply-To: <alpine.DEB.2.20.1708251416460.1883@nanos>
On Fri, 25 Aug 2017, Thomas Gleixner wrote:
CC + Rostedt
> On Fri, 25 Aug 2017, kbuild test robot wrote:
>
> > Hi Thomas,
> >
> > It's probably a bug fix that unveils the link errors.
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/apic
> > head: 395b2c62edea5a2bb8a8786392feb12fae5917a7
> > commit: 902f1bb88397dd6769c98b2177bbda134b3a1ef2 [40/43] x86/idt: Deinline setup functions
> > config: i386-randconfig-s0-201734 (attached as .config)
> > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
> > reproduce:
> > git checkout 902f1bb88397dd6769c98b2177bbda134b3a1ef2
> > # save the attached .config to linux build tree
> > make ARCH=i386
> >
> > All errors (new ones prefixed by >>):
> >
> > >> arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg'
> > >> arch/x86/kernel/irq.o:(__tracepoints+0x174): undefined reference to `trace_resched_ipi_unreg'
> > arch/x86/kernel/irq.o:(__tracepoints+0x184): undefined reference to `trace_resched_ipi_reg'
> > arch/x86/kernel/irq.o:(__tracepoints+0x188): undefined reference to `trace_resched_ipi_unreg'
> >
>
> That link error is caused by the tracepoint code being stupid enough to
> generate tracepoint stuff in an object file whether they are used or not.
>
> The issue here is that the reschedule ipi tracepoint has an initializer
> function which is only compiled in when CONFIG_SMP=y.
>
> That tracepoint is not used in irq.o at all, but still the tracepoint macro
> hell generates something for it:
>
> objdump -t ../build-386/arch/x86/kernel/irq.o | grep resched
> 00000048 l O _ftrace_events 00000004 __event_reschedule_exit
> 00000a00 l O .data 0000004c event_reschedule_exit
> 0000004c l O _ftrace_events 00000004 __event_reschedule_entry
> 00000a60 l O .data 0000004c event_reschedule_entry
> 00000048 l O __tracepoints_ptrs 00000004 __tracepoint_ptr_reschedule_exit
> 00000188 l O __tracepoints_strings 00000010 __tpstrtab_reschedule_exit
> 0000004c l O __tracepoints_ptrs 00000004 __tracepoint_ptr_reschedule_entry
> 00000198 l O __tracepoints_strings 00000011 __tpstrtab_reschedule_entry
> 0000017c g O __tracepoints 00000014 __tracepoint_reschedule_entry
> 00000000 *UND* 00000000 trace_resched_ipi_reg
> 00000168 g O __tracepoints 00000014 __tracepoint_reschedule_exit
> 00000000 *UND* 00000000 trace_resched_ipi_unreg
>
> Brilliant stuff that. I'll hide the tracepoint behind a CONFIG_SMP ifdef
> for now.
>
> Thanks,
>
> tglx
>
prev parent reply other threads:[~2017-08-25 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 11:37 kbuild test robot
2017-08-25 12:22 ` Thomas Gleixner
2017-08-25 12:26 ` Thomas Gleixner [this message]
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=alpine.DEB.2.20.1708251426050.1883@nanos \
--to=tglx@linutronix.de \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tipbuild@zytor.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 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®