commit | 190cb7dd5e14e586916da51fdecaf446697633ef | [log] [tgz] |
---|---|---|
author | Wei Wang <wvw@google.com> | Thu Mar 08 13:33:12 2018 -0800 |
committer | Wei Wang <wvw@google.com> | Thu Mar 08 22:09:22 2018 +0000 |
tree | 0d48c65c2ff15455cb4a17d7986769e678515eef | |
parent | 3a7e825dc64e6903b441023d7534664b8f105c8c [diff] [blame] |
atrace: only start trace when starting trace Bug: 74396309 Test: atrace --async_stop > trace Change-Id: I50a2bc224d6c48aa7cecf69a57b30c8ccc88b9e0
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp index 898aa90..57745ef 100644 --- a/cmds/atrace/atrace.cpp +++ b/cmds/atrace/atrace.cpp
@@ -1221,8 +1221,10 @@ } bool ok = true; - ok &= setUpTrace(); - ok &= startTrace(); + if (traceStart) { + ok &= setUpTrace(); + ok &= startTrace(); + } if (ok && traceStart) { if (!traceStream) {