linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:WIP.x86/apic 40/43] arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg'
@ 2017-08-25 11:37 kbuild test robot
  2017-08-25 12:22 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: kbuild test robot @ 2017-08-25 11:37 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: kbuild-all, linux-kernel, tipbuild

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

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'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21676 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:WIP.x86/apic 40/43] arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg'
  2017-08-25 11:37 [tip:WIP.x86/apic 40/43] arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg' kbuild test robot
@ 2017-08-25 12:22 ` Thomas Gleixner
  2017-08-25 12:26   ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2017-08-25 12:22 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, linux-kernel, tipbuild

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:WIP.x86/apic 40/43] arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg'
  2017-08-25 12:22 ` Thomas Gleixner
@ 2017-08-25 12:26   ` Thomas Gleixner
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Gleixner @ 2017-08-25 12:26 UTC (permalink / raw)
  To: kbuild test robot; +Cc: kbuild-all, LKML, tipbuild, Steven Rostedt

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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-25 12:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 11:37 [tip:WIP.x86/apic 40/43] arch/x86/kernel/irq.o:(__tracepoints+0x170): undefined reference to `trace_resched_ipi_reg' kbuild test robot
2017-08-25 12:22 ` Thomas Gleixner
2017-08-25 12:26   ` Thomas Gleixner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).