This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/6921] tracepoint support


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]