trace-cmd reset: Fix -d option
There was a bug where a "trace-cmd record -B foo" would delete the foo
instance when the record was finished even if that instance previously
existed. But that fix was a bit too agreesive. It changed two places:
1) where the bug was, in remove_instance()
2) where the bug was not, in tracecmd_remove_instance() that uses the
instance->flags to know if it should be deleted or not.
The "trace-cmd reset" uses the latter function and if the "-d" option is
set, it is supposed to delete the instance. But because that function was
changed to only delete it if it created it (which reset does not do), it
broke it.
Link: https://lore.kernel.org/linux-trace-devel/[email protected]
Fixes: 9d6f3baa3 ("trace-cmd record/extract: Do not destroy existing instances")
Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 file changed