summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2014-04-28 16:07:23 -0500
committerJP Abgrall2014-04-28 19:37:37 -0500
commit8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a (patch)
treea9777346b5a82e54c698f895271a99e6364c1df6 /logd/LogTimes.cpp
parentab3d49b03527d5fc65664f66ddb78c98450c8c84 (diff)
downloadplatform-system-core-8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a.tar.gz
platform-system-core-8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a.tar.xz
platform-system-core-8daa9af02dc0e63ce220e3fa95bf5fe4d6b7a99a.zip
logd: add thread setname
- permits easier determination of logd thread at fault in a stack trace from debuggerd. Bug: 14275676 Change-Id: Iac2c523147e2bcce34ab7ddcecd02582c5fa7cc0
Diffstat (limited to 'logd/LogTimes.cpp')
-rw-r--r--logd/LogTimes.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/logd/LogTimes.cpp b/logd/LogTimes.cpp
index c32ac2dce..1a9a548f4 100644
--- a/logd/LogTimes.cpp
+++ b/logd/LogTimes.cpp
@@ -14,6 +14,8 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#include <sys/prctl.h>
18
17#include "FlushCommand.h" 19#include "FlushCommand.h"
18#include "LogBuffer.h" 20#include "LogBuffer.h"
19#include "LogTimes.h" 21#include "LogTimes.h"
@@ -107,6 +109,8 @@ void LogTimeEntry::threadStop(void *obj) {
107} 109}
108 110
109void *LogTimeEntry::threadStart(void *obj) { 111void *LogTimeEntry::threadStart(void *obj) {
112 prctl(PR_SET_NAME, "logd.reader.per");
113
110 LogTimeEntry *me = reinterpret_cast<LogTimeEntry *>(obj); 114 LogTimeEntry *me = reinterpret_cast<LogTimeEntry *>(obj);
111 115
112 pthread_cleanup_push(threadStop, obj); 116 pthread_cleanup_push(threadStop, obj);