Commit 06e5f82b authored by Joanne Hugé's avatar Joanne Hugé

WIP

parent d7cc4ba3
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
static char *fileprefix; static char *fileprefix;
static char *procfileprefix = "/proc/sys/kernel/"; static char *procfileprefix = "/proc/sys/kernel/";
static char *traceroptions = "trace_options";
static int trace_fd = -1; static int trace_fd = -1;
static int kernvar(int mode, const char *name, char *value, static int kernvar(int mode, const char *name, char *value,
...@@ -95,11 +94,12 @@ static int settracer(char *tracer) { ...@@ -95,11 +94,12 @@ static int settracer(char *tracer) {
void setup_tracer(void) { void setup_tracer(void) {
int ret; fileprefix = procfileprefix;
setkernvar("ftrace_enabled", "1");
// Clear old traces by setting tracer to nop first // Clear old traces by setting tracer to nop first
ret = settracer("nop"); settracer("nop");
ret = settracer("function"); settracer("function");
/* open the tracing on file descriptor */ /* open the tracing on file descriptor */
if (trace_fd == -1) { if (trace_fd == -1) {
......
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