diff options
author | Jamie Gennis <jgennis@google.com> | 2013-04-15 18:53:24 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-16 22:15:21 +0000 |
commit | 6ad0452e6301c0650f58f3991f7c523f6f279ddb (patch) | |
tree | 0f116a6253e62bd96a4deb02c137461516cf6266 /cmds/app_process | |
parent | d12a7645a3bf3ffa83b8041bf343f1dc12a2381f (diff) | |
download | frameworks_base-6ad0452e6301c0650f58f3991f7c523f6f279ddb.zip frameworks_base-6ad0452e6301c0650f58f3991f7c523f6f279ddb.tar.gz frameworks_base-6ad0452e6301c0650f58f3991f7c523f6f279ddb.tar.bz2 |
Disable tracing from Zygote
This change disables all atrace tracing in Zygote immediately after it is
initialized. This is necessary because Zygote has no way to receive
notifications that the enabled trace tags have been changed. Tracing is
re-enabled when other processes fork from Zygote.
Change-Id: If2983858fb0c4890ba9ab041849b1c4d98f66c13
Diffstat (limited to 'cmds/app_process')
-rw-r--r-- | cmds/app_process/app_main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 0668be6..90bcb0f 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -12,6 +12,7 @@ #include <utils/Log.h> #include <cutils/process_name.h> #include <cutils/memory.h> +#include <cutils/trace.h> #include <android_runtime/AndroidRuntime.h> #include <sys/personality.h> @@ -95,6 +96,9 @@ public: virtual void onZygoteInit() { + // Re-enable tracing now that we're no longer in Zygote. + atrace_set_tracing_enabled(true); + sp<ProcessState> proc = ProcessState::self(); ALOGV("App process: starting thread pool.\n"); proc->startThreadPool(); |