only check file descriptor in tracemark() function
If the tracemark_fd is >= 0, then we know we can write to the trace_marker file. We only need to check that and not version of the kernel or anything else at every instance of calling tracemark(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
8c1e851bfe
commit
ae357be2e8
|
@ -340,7 +340,7 @@ static void tracemark(char *comment)
|
|||
{
|
||||
/* bail out if we're not tracing */
|
||||
/* or if the kernel doesn't support trace_mark */
|
||||
if (!tracelimit || kernelversion < KV_26_33 || tracemark_fd < 0)
|
||||
if (tracemark_fd < 0)
|
||||
return;
|
||||
write(tracemark_fd, comment, strlen(comment));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue