cutils: add a way to disable tracing for a process

This change adds the atrace_set_tracing_enabled call to libcutils.  The call
can be used to disable all tracing (of the atrace variety) for the current
process.  This is to be used to disable tracing in the Zygote process, as there
is no way for Zygote to be notified of changes to the enabled trace tags.

Change-Id: I0b691cc0dcfc65b16e3d17e1db2866a4deb253a7
diff --git a/include/cutils/trace.h b/include/cutils/trace.h
index 55aabdd..0885a1d 100644
--- a/include/cutils/trace.h
+++ b/include/cutils/trace.h
@@ -107,11 +107,17 @@
 void atrace_set_debuggable(bool debuggable);
 
 /**
+ * Set whether tracing is enabled for the current process.  This is used to
+ * prevent tracing within the Zygote process.
+ */
+void atrace_set_tracing_enabled(bool enabled);
+
+/**
  * Flag indicating whether setup has been completed, initialized to 0.
  * Nonzero indicates setup has completed.
  * Note: This does NOT indicate whether or not setup was successful.
  */
-extern int32_t atrace_is_ready;
+extern volatile int32_t atrace_is_ready;
 
 /**
  * Set of ATRACE_TAG flags to trace for, initialized to ATRACE_TAG_NOT_READY.