diff options
author | Lingfeng Yang <lfy@google.com> | 2020-09-28 18:56:23 -0700 |
---|---|---|
committer | Lingfeng Yang <lfy@google.com> | 2020-09-28 18:56:23 -0700 |
commit | 9ee90ceb9715808f7d28a360d7f3ed9aede2714d (patch) | |
tree | 2a6243a96d0e6c43ba6fe3ba0941086ff1be4af7 /system/OpenglSystemCommon/HostConnection.cpp | |
parent | ab89e17faf95f6180907067b5f79023972ef48c0 (diff) | |
download | device_generic_goldfish-opengl-9ee90ceb9715808f7d28a360d7f3ed9aede2714d.tar.gz device_generic_goldfish-opengl-9ee90ceb9715808f7d28a360d7f3ed9aede2714d.tar.bz2 device_generic_goldfish-opengl-9ee90ceb9715808f7d28a360d7f3ed9aede2714d.zip |
Make it easier to locally unit test guest/host combined tracing
Change-Id: If7c24e1ac9fa50dba8b85fc12274ecd75fea0e01
Diffstat (limited to 'system/OpenglSystemCommon/HostConnection.cpp')
-rw-r--r-- | system/OpenglSystemCommon/HostConnection.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/system/OpenglSystemCommon/HostConnection.cpp b/system/OpenglSystemCommon/HostConnection.cpp index 7d309fbd..7ddf277f 100644 --- a/system/OpenglSystemCommon/HostConnection.cpp +++ b/system/OpenglSystemCommon/HostConnection.cpp @@ -17,6 +17,10 @@ #include "cutils/properties.h" +#ifdef HOST_BUILD +#include "android/base/Tracing.h" +#endif + #ifdef GOLDFISH_NO_GL struct gl_client_context_t { int placeholder; @@ -359,7 +363,11 @@ HostConnection::HostConnection() : m_grallocOnly(true), m_noHostError(true), m_rendernodeFd(-1), - m_rendernodeFdOwned(false) { } + m_rendernodeFdOwned(false) { +#ifdef HOST_BUILD + android::base::initializeTracing(); +#endif +} HostConnection::~HostConnection() { |