Skip to contentSkip to conversation

trace-cmd record: Do not delete existing instance

PATCH New Steven Rostedt 1 participant 1 message Aug 27

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd record: Do not delete existing instance

From: Steven Rostedt <[email protected]>

When trace-cmd record uses -B on an existing instance, it deletes it when finished. If the instance existed when the record started, it should not delete it when finished.

Fixes 49b36d72b4d16 ("libtracefs: Combine allocate and create APIs into one")
---
 tracecmd/trace-record.c | 1 +
 1 file changed, 1 insertion(+)
tracecmd/trace-record.c +1 -0
index e7bb2f58ac4d..1ee3effca114 100644
@@ -384,6 +384,7 @@ struct buffer_instance *allocate_instance(const char *name)
 		instance->tracefs = tracefs_instance_create(name);
 		if (!instance->tracefs)
 			goto error;
+		instance->flags |= BUFFER_FL_KEEP;
 	}
 
 	return instance;
Signature · 1 line
2.53.0