Commit 9476bff0 authored by Teng Qin's avatar Teng Qin

Define a constant for USDT program include header

parent 71516733
......@@ -239,7 +239,7 @@ Probe *Context::get(const std::string &probe_name) {
}
bool Context::generate_usdt_args(std::ostream &stream) {
stream << "#include <uapi/linux/ptrace.h>\n";
stream << USDT_PROGRAM_HEADER;
for (auto &p : probes_) {
if (p->enabled() && !p->usdt_getarg(stream))
return false;
......
......@@ -31,6 +31,9 @@ using std::experimental::optional;
using std::experimental::nullopt;
class ArgumentParser;
static const std::string USDT_PROGRAM_HEADER =
"#include <uapi/linux/ptrace.h>\n";
class Argument {
private:
optional<int> arg_size_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment