This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/6921] tracepoint support
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 21 Feb 2009 00:50:24 -0000
- Subject: [Bug translator/6921] tracepoint support
- References: <20080929201133.6921.fche@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jistone at redhat dot com 2009-02-21 00:50 -------
I think we could compile a tiny kernel module to query the available
tracepoints. Something like:
Makefile:
EXTRA_CFLAGS := -g
obj-m := tracequery.o
tracequery.c:
#include <linux/module.h>
#include <linux/tracepoint.h>
// override the declaration macro to synthesize some probe functions
#undef DECLARE_TRACE
#define DECLARE_TRACE(name, proto, args) void stapprobe_##name(proto) {}
// dynamically pull in all tracepoint headers from include/trace/
#include <trace/block.h>
#include <trace/boot.h> // <- not actually a tracepoint, but oh well
#include <trace/sched.h>
int init_module(void) { return 0; }
void cleanup_module(void) { }
MODULE_DESCRIPTION("tracepoint query");
MODULE_LICENSE("GPL");
This gives us a module which we can scan for stapprobe_foo tracepoints. We also
get all the local debuginfo we want without relying on the dreaded
kernel-debuginfo packages.
Thoughts?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=6921
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.