diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-03-18 16:42:08 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-03-18 16:42:08 -0400 |
commit | 9b66956cb4660bd49983482c3529ca069fa97b3e (patch) | |
tree | 61188ae22fd841431a137ba36c6fe26e9bf9b941 | |
parent | 0c2737e3960f076c7487984512ebefcb8d4c5f8f (diff) |
trace-cmd: Fix record of function_graph
For safety reasons we always set ftrace_stack_trace to zero when
starting function tracer. But we seem to be doing that for
function_graph tracer as well, where that option does not exist.
Don't fail if it does not exist, quietly move on.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-record.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/trace-record.c b/trace-record.c index 1ad1e19..58c9915 100644 --- a/trace-record.c +++ b/trace-record.c | |||
@@ -581,6 +581,8 @@ static void set_plugin(const char *name) | |||
581 | path = tracecmd_get_tracing_file("options/func_stack_trace"); | 581 | path = tracecmd_get_tracing_file("options/func_stack_trace"); |
582 | fp = fopen(path, "w"); | 582 | fp = fopen(path, "w"); |
583 | tracecmd_put_tracing_file(path); | 583 | tracecmd_put_tracing_file(path); |
584 | if (!fp) | ||
585 | return; | ||
584 | fwrite(&zero, 1, 1, fp); | 586 | fwrite(&zero, 1, 1, fp); |
585 | fclose(fp); | 587 | fclose(fp); |
586 | } | 588 | } |