History log of /system/core/libcutils/trace-dev.inc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
642ef98b3bec7eff738b11fdf5b6dededf08b17b 10-Feb-2018 Daniel Colascione <dancol@google.com> Support * as a wildcard for ATRACE_TAG_APP

Test: strcmp
Change-Id: I33ec3ae071e3856538444663bbabb3c779ed8afa
/system/core/libcutils/trace-dev.inc
e4030384c40a7889fbf0c18ea71335567deae342 22-Nov-2016 Earl Ou <shunhsingou@google.com> 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
/system/core/libcutils/trace-dev.inc