summaryrefslogtreecommitdiff
path: root/libasyncio/AsyncIO.cpp
diff options
context:
space:
mode:
authorEarl Ou <shunhsingou@google.com>2016-11-22 17:04:44 +0800
committerEarl Ou <shunhsingou@google.com>2017-08-03 15:16:44 +0800
commite4030384c40a7889fbf0c18ea71335567deae342 (patch)
tree230c959d5b4bdc6f525f93b0d2098a48f7411724 /libasyncio/AsyncIO.cpp
parent5c655991f51e63f4264619293b393a2c6bddb1fa (diff)
libcutils: write trace event into socket in container
When Android is running in a container, ftrace trace_marker may be disabled, e.g. Chrome OS verified mode. To enable trace, a socket is created for everyone to send trace event. Modify libcutils so apps using it can write trace to the socket. To achieve this goal without touching code for normal device, trace-container.c is created for code specific to container. Shared code between trace-dev.c and trace-container.c is moved to local trace-dev.h. Note that to avoid sharing FDs across different processes, Zygote closes FD and reopen it to /dev/null if it is a socket. Therefore, we need to manually close FD and reopen it again after forking. This is done in the atrace_set_tracing_enabled as Zygote also use it to clear flags during forking. Related change: - http://crrev.com/2400163003 (Chromium) - http://ag/2028075 (Android system/core) - http://ag/1738271 (Android device/google/cheets2) Bug: 29776474, 62410809 Test: run chrome://tracing and see data from the host side. Change-Id: I3fe969e284b972c28e4f32f23cd948aaea61a043
Diffstat (limited to 'libasyncio/AsyncIO.cpp')
0 files changed, 0 insertions, 0 deletions