commit | 42a735327fcf9773e25dca0e4ab86de02cb7eb00 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Tue Jan 04 20:13:58 2022 +0800 |
committer | Mike Yu <yumike@google.com> | Thu Jan 06 13:27:47 2022 +0000 |
tree | 593b86753ac2923ddd9f1ff9bd81a2612af8f12d | |
parent | 9b748ee32cc6118c5c24b49ff938a99554d8f599 [diff] |
DoH: Change to use runtime with current thread scheduler in doh_query() Perfetto shows that using runtime with multi-thread scheduler in doh_query() results in 8 threads created and terminated every time doh_query() is called, which takes approximately 2 ms. So, change the code to use a runtime with current thread scheduler. This approximately reduces the time overhead of doh_query() from 2 ms to 0.5 ms. Bug: 212364676 Test: cd packages/modules/DnsResolver && atest Change-Id: I7652e6982b1485ee435b6399798b19badd264500
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.