mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-29 17:36:29 -05:00
55 lines
1.4 KiB
Diff
55 lines
1.4 KiB
Diff
|
From 2b418c7cdced80f2ecd0e31b357970d51d9e4b25 Mon Sep 17 00:00:00 2001
|
||
|
From: Lorenzo Colitti <lorenzo@google.com>
|
||
|
Date: Sat, 21 Jan 2017 15:00:36 +0900
|
||
|
Subject: [PATCH] Log the time it takes netd to start up.
|
||
|
|
||
|
Currently on, bullhead-eng, I see:
|
||
|
|
||
|
01-21 14:59:26.174 21421 21421 I Netd : Netd started in 2432ms
|
||
|
|
||
|
Test: restarted netd and observed log message.
|
||
|
Bug: 32323979
|
||
|
Bug: 33279878
|
||
|
Change-Id: I7195d06d7ed1a09858185555f60b07e5bfe306ed
|
||
|
---
|
||
|
server/main.cpp | 5 +++++
|
||
|
1 file changed, 5 insertions(+)
|
||
|
|
||
|
diff --git a/server/main.cpp b/server/main.cpp
|
||
|
index ae3a71a3..aab15d66 100644
|
||
|
--- a/server/main.cpp
|
||
|
+++ b/server/main.cpp
|
||
|
@@ -18,6 +18,7 @@
|
||
|
#include <stdlib.h>
|
||
|
#include <signal.h>
|
||
|
#include <errno.h>
|
||
|
+#include <math.h>
|
||
|
#include <string.h>
|
||
|
#include <sys/stat.h>
|
||
|
#include <sys/types.h>
|
||
|
@@ -40,6 +41,7 @@
|
||
|
#include "NetdConstants.h"
|
||
|
#include "NetdNativeService.h"
|
||
|
#include "NetlinkManager.h"
|
||
|
+#include "Stopwatch.h"
|
||
|
#include "DnsProxyListener.h"
|
||
|
#include "MDnsSdListener.h"
|
||
|
#include "FwmarkServer.h"
|
||
|
@@ -63,6 +65,7 @@ android::RWLock android::net::gBigNetdLock;
|
||
|
|
||
|
int main() {
|
||
|
using android::net::gCtls;
|
||
|
+ Stopwatch s;
|
||
|
|
||
|
ALOGI("Netd 1.0 starting");
|
||
|
remove_pid_file();
|
||
|
@@ -122,6 +125,8 @@ int main() {
|
||
|
|
||
|
write_pid_file();
|
||
|
|
||
|
+ ALOGI("Netd started in %dms", static_cast<int>(s.timeTaken()));
|
||
|
+
|
||
|
IPCThreadState::self()->joinThreadPool();
|
||
|
|
||
|
ALOGI("Netd exiting");
|