From d99d881952436f5b01364b8f31b1bc90c22a1444 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 6 Mar 2009 15:44:50 -0800 Subject: Support older tracepoints using DEFINE_TRACE At one point, the tracepoints API didn't have DECLARE_TRACE, and the trace headers all used DEFINE_TRACE. This is what got pulled into RHEL, so we need to support this older usage. The rest of the API stays the same though. * buildrun.cxx (make_tracequery): Redefine DEFINE_TRACE as well. --- buildrun.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'buildrun.cxx') diff --git a/buildrun.cxx b/buildrun.cxx index b81cba23..2685949d 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -372,6 +372,11 @@ make_tracequery(systemtap_session& s, string& name) osrc << "#define DECLARE_TRACE(name, proto, args) \\" << endl; osrc << " void stapprobe_##name(proto) {}" << endl; + // older tracepoints used DEFINE_TRACE, so redirect that too + osrc << "#undef DEFINE_TRACE" << endl; + osrc << "#define DEFINE_TRACE(name, proto, args) \\" << endl; + osrc << " DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args))" << endl; + // dynamically pull in all tracepoint headers from include/trace/ glob_t trace_glob; string glob_str(s.kernel_build_tree + "/include/trace/*.h"); -- cgit