Loading libs/graphicsenv/GraphicsEnv.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,13 @@ void GraphicsEnv::sendGpuStatsLocked(GpuStatsInfo::Api api, bool isDriverLoaded, } } bool GraphicsEnv::setInjectLayersPrSetDumpable() { if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) { return false; } return true; } void* GraphicsEnv::loadLibrary(std::string name) { const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE, Loading libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +8 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,14 @@ public: // Set which driver is actually loaded. void setDriverLoaded(GpuStatsInfo::Api api, bool isDriverLoaded, int64_t driverLoadingTime); /* * Api for Vk/GL layer injection. Presently, drivers enable certain * profiling features when prctl(PR_GET_DUMPABLE) returns true. * Calling this when layer injection metadata is present allows the driver * to enable profiling even when in a non-debuggable app */ bool setInjectLayersPrSetDumpable(); /* * Apis for ANGLE */ Loading Loading
libs/graphicsenv/GraphicsEnv.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,13 @@ void GraphicsEnv::sendGpuStatsLocked(GpuStatsInfo::Api api, bool isDriverLoaded, } } bool GraphicsEnv::setInjectLayersPrSetDumpable() { if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) { return false; } return true; } void* GraphicsEnv::loadLibrary(std::string name) { const android_dlextinfo dlextinfo = { .flags = ANDROID_DLEXT_USE_NAMESPACE, Loading
libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +8 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,14 @@ public: // Set which driver is actually loaded. void setDriverLoaded(GpuStatsInfo::Api api, bool isDriverLoaded, int64_t driverLoadingTime); /* * Api for Vk/GL layer injection. Presently, drivers enable certain * profiling features when prctl(PR_GET_DUMPABLE) returns true. * Calling this when layer injection metadata is present allows the driver * to enable profiling even when in a non-debuggable app */ bool setInjectLayersPrSetDumpable(); /* * Apis for ANGLE */ Loading