Don't disable vendor tracing when --only_userspace
We shouldn't disable vendor tracing when the --only_userspace
option is set. This matches the "enable vendor tracing" path which
is already behind an if (onlyUserspace) guard.
Test: make
Bug: 130202267
Change-Id: Ia76ee5286c6cf3f69165362dd3ab95f0d7812714
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp
index 39b3aac..d276696 100644
--- a/cmds/atrace/atrace.cpp
+++ b/cmds/atrace/atrace.cpp
@@ -1465,10 +1465,11 @@
// Reset the trace buffer size to 1.
if (traceStop) {
- cleanUpVendorTracing();
cleanUpUserspaceTracing();
- if (!onlyUserspace)
+ if (!onlyUserspace) {
+ cleanUpVendorTracing();
cleanUpKernelTracing();
+ }
}
return g_traceAborted ? 1 : 0;