public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/13100] New: Building tracepoint cache all at once fails when kernel debuginfo installed
@ 2011-08-16 20:50 mjw at redhat dot com
  2011-10-05 19:25 ` [Bug translator/13100] " jistone at redhat dot com
  2011-10-05 20:46 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: mjw at redhat dot com @ 2011-08-16 20:50 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13100

             Bug #: 13100
           Summary: Building tracepoint cache all at once fails when
                    kernel debuginfo installed
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: mjw@redhat.com
    Classification: Unclassified


Commit d4393459 introduced deeper searching for "hidden" tracepoints.
This uses the include files from the kernel debuginfo package.
But this seems to make the first pass of trying to create a tracepoint cache in
one go always fail because now headers are included two times (ones under
/lib/module/.../build/include and once under
/usr/src/debug////////kernel.../include/

Example:
$rm -rf ~/.systemtap
$ stap -e 'probe kernel.trace("sched_wakeup") { log("wake!"); exit(); }'
Warning: make exited with status: 2
[... wait some long time ...]
wake!

Things still work because after that first attempt it tries building each
tracepoint header file individually. So it is really just a transient warning,
causing fallback to a slow caching method.

More verbose logs:

Located kernel source tree (DW_AT_comp_dir) at
'/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64'
Checking tracepoint glob
/lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/*.h
Checking tracepoint glob
/lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/*.h
Checking tracepoint glob
/lib/modules/2.6.35.13-92.fc14.x86_64/build/arch/x86/kvm/*trace.h
Checking tracepoint glob
/lib/modules/2.6.35.13-92.fc14.x86_64/build/fs/xfs/linux-*/xfs_tr*.h
Checking tracepoint glob
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/*.h
Checking tracepoint glob
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/*.h
Checking tracepoint glob
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/arch/x86/kvm/*trace.h
Checking tracepoint glob
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/fs/xfs/linux-*/xfs_tr*.h
Pass 2: getting a tracepoint query for 45 headers: 
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/bkl.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/block.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/ext4.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/irq.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/jbd2.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/kmem.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/kvm.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/lock.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/mce.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/module.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/napi.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/power.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/sched.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/scsi.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/signal.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/skb.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/syscalls.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/timer.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/events/workqueue.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/boot.h
  /lib/modules/2.6.35.13-92.fc14.x86_64/build/include/trace/syscall.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/bkl.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/block.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/ext4.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/irq.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/jbd2.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/kmem.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/kvm.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/lock.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/mce.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/module.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/napi.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/power.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/sched.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/scsi.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/signal.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/skb.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/syscalls.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/timer.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/events/workqueue.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/boot.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/include/trace/syscall.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/arch/x86/kvm/mmutrace.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/arch/x86/kvm/trace.h
 
/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64/fs/xfs/linux-2.6/xfs_trace.h
Running make -C /lib/modules/2.6.35.13-92.fc14.x86_64/build
M=/tmp/staplYckyE/tracequery_kmod_1 modules ARCH=x86_64 V=1
make: Entering directory `/usr/src/kernels/2.6.35.13-92.fc14.x86_64'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (    \
echo;                                \
echo "  ERROR: Kernel configuration is invalid.";        \
echo "         include/generated/autoconf.h or include/config/auto.conf are
missing.";\
echo "         Run 'make oldconfig && make prepare' on kernel src to fix it."; 
  \
echo;                                \
/bin/false)
mkdir -p /tmp/staplYckyE/tracequery_kmod_1/.tmp_versions ; rm -f
/tmp/staplYckyE/tracequery_kmod_1/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/staplYckyE/tracequery_kmod_1
  gcc -Wp,-MD,/tmp/staplYckyE/tracequery_kmod_1/.tracequery_kmod_1.o.d 
-nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.5.1/include
-I/usr/src/kernels/2.6.35.13-92.fc14.x86_64/arch/x86/include -Iinclude 
-include include/generated/autoconf.h -D__KERNEL__ -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-fno-delete-null-pointer-checks -Os -m64 -mtune=generic -mno-red-zone
-mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -pg -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -g
-Wno-implicit-function-declaration -Werror
-I/usr/src/debug////////kernel-2.6.35.fc14/linux-2.6.35.x86_64  -DMODULE
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(tracequery_kmod_1)" 
-D"KBUILD_MODNAME=KBUILD_STR(tracequery_kmod_1)" -D"DEBUG_HASH=10"
-D"DEBUG_HASH2=51" -c -o /tmp/staplYckyE/tracequery_kmod_1/tracequery_kmod_1.o
/tmp/staplYckyE/tracequery_kmod_1/tracequery_kmod_1.c
In file included from
/tmp/staplYckyE/tracequery_kmod_1/tracequery_kmod_1.c:146:0:
include/trace/events/napi.h:12:1: error: redefinition of ‘stapprobe_napi_poll’
include/trace/events/napi.h:12:1: note: previous definition of
‘stapprobe_napi_poll’ was here
make[1]: *** [/tmp/staplYckyE/tracequery_kmod_1/tracequery_kmod_1.o] Error 1
make: *** [_module_/tmp/staplYckyE/tracequery_kmod_1] Error 2
make: Leaving directory `/usr/src/kernels/2.6.35.13-92.fc14.x86_64'
Spawn waitpid result (0x200): 2
Warning: make exited with status: 2
Copying /dev/null to
/home/mark/.systemtap/cache/98/tracequery_9820af1e799794b0d47d40c88a1f5129_4917.ko
Pass 2: getting a tracepoint query for 1 headers: 
[...]

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/13100] Building tracepoint cache all at once fails when kernel debuginfo installed
  2011-08-16 20:50 [Bug translator/13100] New: Building tracepoint cache all at once fails when kernel debuginfo installed mjw at redhat dot com
@ 2011-10-05 19:25 ` jistone at redhat dot com
  2011-10-05 20:46 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jistone at redhat dot com @ 2011-10-05 19:25 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13100

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jistone at redhat dot com

--- Comment #1 from Josh Stone <jistone at redhat dot com> 2011-10-05 19:24:45 UTC ---
The batch tracequery, with all discovered headers at once, was something of an
optimization, and experience has shown it to be too optimistic.  This idea was
so we could have only one kbuild make invocation (which is fairly expensive)
and only one resulting tracequery.ko to juggle.  But the tracepoint headers so
often conflict with each other that we almost always end up falling back to
separate tracequery.ko per header.

So if we accept that as a fact of life, then perhaps we should just restructure
it to always do separate tracequery.ko, but we could combine them into a single
Makefile for then only one kbuild invocation.  That should hopefully relieve
much of the overhead of building them separately, even though they'll still be
forking lots of compiler instances.

If we can find a way to soft-fail any unusable headers, then these objects
could still be combined into one big tracequery.ko.  That would make cache
management easier, but I'm not sure if kbuild can express this easily.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug translator/13100] Building tracepoint cache all at once fails when kernel debuginfo installed
  2011-08-16 20:50 [Bug translator/13100] New: Building tracepoint cache all at once fails when kernel debuginfo installed mjw at redhat dot com
  2011-10-05 19:25 ` [Bug translator/13100] " jistone at redhat dot com
@ 2011-10-05 20:46 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2011-10-05 20:46 UTC (permalink / raw)
  To: systemtap

http://sourceware.org/bugzilla/show_bug.cgi?id=13100

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com
         AssignedTo|systemtap at sourceware dot |fche at redhat dot com
                   |org                         |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

end of thread, other threads:[~2011-10-05 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-16 20:50 [Bug translator/13100] New: Building tracepoint cache all at once fails when kernel debuginfo installed mjw at redhat dot com
2011-10-05 19:25 ` [Bug translator/13100] " jistone at redhat dot com
2011-10-05 20:46 ` fche at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).