Commit Graph

25799 Commits

Author SHA1 Message Date
Mark Salyzyn 1f6e063e06 Merge "logd: report logging memory overhead" am: d3754ff696
am: 386630f4ce

Change-Id: Ia8841921f55a4618e2b1301b911daf780f0f7d56
2016-10-06 14:23:48 +00:00
Dimitry Ivanov e89ec3c4e0 Merge "Revert "Revert "Remove liblog from libcutils as a whole static lib"""
am: 8949696d33

Change-Id: I8099e374eccda844384682256af8d802e3fa0aea
2016-10-06 14:23:25 +00:00
Treehugger Robot 8949696d33 Merge "Revert "Revert "Remove liblog from libcutils as a whole static lib""" 2016-10-06 14:20:41 +00:00
Mark Salyzyn 386630f4ce Merge "logd: report logging memory overhead"
am: d3754ff696

Change-Id: I3e0f11864dab17cc70f0e68a9b69adf8f1edb9d2
2016-10-06 14:19:46 +00:00
Treehugger Robot d3754ff696 Merge "logd: report logging memory overhead" 2016-10-06 14:15:48 +00:00
Dimitry Ivanov 595c1480d0 Revert "Revert "Remove liblog from libcutils as a whole static lib""
This reverts commit f93d732a45.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: Ib6e6c0a01296f0a01d98cbf1a9d2659883280d44
2016-10-06 12:47:07 +00:00
Tao Bao 4fa6e4855b Merge "adb: Remove the obsolete include path to ext4_utils." am: 9f828a5383 am: a00020317e
am: 9766909149

Change-Id: I1059d176220327d6f1ecb5c56dde2bebf31c371f
2016-10-06 06:29:57 +00:00
Tao Bao 9766909149 Merge "adb: Remove the obsolete include path to ext4_utils." am: 9f828a5383
am: a00020317e

Change-Id: I474494405de42c794af3160898a867e766c558b1
2016-10-06 06:26:25 +00:00
Tao Bao a00020317e Merge "adb: Remove the obsolete include path to ext4_utils."
am: 9f828a5383

Change-Id: Ia833226376111a0ead4f0c5b5d79768a8b8dbeb2
2016-10-06 06:23:27 +00:00
Treehugger Robot 9f828a5383 Merge "adb: Remove the obsolete include path to ext4_utils." 2016-10-06 06:18:45 +00:00
Tao Bao fee161d189 adb: Remove the obsolete include path to ext4_utils.
Since commit 8ad80763e4 has removed
'#include "ext4_sb.h"', there's no more reference to ext4_utils headers.

Test: `mmma system/core/adb`

Change-Id: I7ca1a6e91f1e0de84238c2a7facbebe9600a3d87
2016-10-05 18:06:03 -07:00
Mark Salyzyn 9af33ee78c logd: report logging memory overhead
On 64 bit system, calculates to roughly 80 bytes of metadata and
list overhead for each entry.

In unit test example, we report 3388987 bytes of logging data and
overhead total, showmap reports 4652K of dirty data. We still want
to account for the remainder (fragmentation, other sources of
internal allocations etc).

Test: see values and check math
Bug: 31942525
Change-Id: I75f3162ce691faf1ae5a5dec18939fea535ede7e
2016-10-05 15:32:40 -07:00
Andreas Gampe 9f5a6a6078 Merge "Base: Hand complete log message to aborter" am: 0d762648d0 am: e082ce827d
am: 6049a29703

Change-Id: I92b013c4025b4a800cf332bbd3d2802d74e7c45a
2016-10-05 20:06:19 +00:00
Andreas Gampe 6049a29703 Merge "Base: Hand complete log message to aborter" am: 0d762648d0
am: e082ce827d

Change-Id: I0705e17a8250791fa5a8af2af9ca2c93316aee6d
2016-10-05 20:03:46 +00:00
Andreas Gampe e082ce827d Merge "Base: Hand complete log message to aborter"
am: 0d762648d0

Change-Id: I33dd453e91aa60f3d797d4bd2db53d9ac1599a0b
2016-10-05 20:00:46 +00:00
Treehugger Robot 0d762648d0 Merge "Base: Hand complete log message to aborter" 2016-10-05 19:53:25 +00:00
Elliott Hughes c9dc124e2f Merge "Test for _WIN32 in instead of USE_MINGW." am: ec99158580 am: 2e7e065db9
am: 04819403d6

Change-Id: I03fc482f4d0aab72991b351e855b8e240ed3abd9
2016-10-05 18:38:10 +00:00
Elliott Hughes 04819403d6 Merge "Test for _WIN32 in instead of USE_MINGW." am: ec99158580
am: 2e7e065db9

Change-Id: I9c7bee42bf1d7522d4dd95b5bb8a925841f96624
2016-10-05 18:35:40 +00:00
Elliott Hughes 2e7e065db9 Merge "Test for _WIN32 in instead of USE_MINGW."
am: ec99158580

Change-Id: If3c40977dfa4853a7dc719a9c6904f530ccf3001
2016-10-05 18:33:11 +00:00
Treehugger Robot ec99158580 Merge "Test for _WIN32 in instead of USE_MINGW." 2016-10-05 18:30:06 +00:00
Elliott Hughes 34a4f0b8c7 Test for _WIN32 in instead of USE_MINGW.
Bug: http://b/23392815
Test: builds
Change-Id: I7fce8de1f0e2314170cce456cd49346dcee9d134
2016-10-05 09:37:44 -07:00
Wei Wang 46a59f8e07 Merge "Modify log level for service and ueventd" am: 891d0ba904 am: 42335b04b4
am: 06515d3231

Change-Id: Ie15a869062ef43f1c4ef2fb1540836971fa23363
2016-10-05 04:42:16 +00:00
Wei Wang 06515d3231 Merge "Modify log level for service and ueventd" am: 891d0ba904
am: 42335b04b4

Change-Id: I6da15c085defb6ac23224673f8eb37af0eb221bc
2016-10-05 04:39:46 +00:00
Wei Wang 42335b04b4 Merge "Modify log level for service and ueventd"
am: 891d0ba904

Change-Id: Ida9ac705e0f763deb731e3f6ed0ac84933294601
2016-10-05 04:37:47 +00:00
Treehugger Robot 891d0ba904 Merge "Modify log level for service and ueventd" 2016-10-05 04:34:42 +00:00
Andreas Gampe b4e32f3b33 Base: Hand complete log message to aborter
Undo zero-termination-substitution for linebreaks when logging.
This results in handing the complete log message to the aborter.
Add a test.

Bug: 31893081
Test: mmma system/core/base && $ANDROID_HOST_OUT/nativetest64/libbase_test/libbase_test64
Change-Id: I2ef6c6351db2fd494a02985f634f439104136227
2016-10-04 19:19:59 -07:00
Wei Wang a285dac9c0 Modify log level for service and ueventd
Bug: 31938558
Test: flash and take a boot log
Change-Id: I5c6823614e1df760128519dfb294f3a44efa6bac
2016-10-04 14:50:48 -07:00
Mark Salyzyn 74ba3b0ce6 Merge "system/core: drop or replace log/logger.h" am: 1f90485804 am: cb670780be
am: 6e5ffe2680

Change-Id: I4c1351fb61b3357d059a8e1da4ce14e3701e17af
2016-10-04 18:37:14 +00:00
Mark Salyzyn 6e5ffe2680 Merge "system/core: drop or replace log/logger.h" am: 1f90485804
am: cb670780be

Change-Id: I532a0f6143511f53f3303751f95de115ac034cd7
2016-10-04 18:33:44 +00:00
Mark Salyzyn cb670780be Merge "system/core: drop or replace log/logger.h"
am: 1f90485804

Change-Id: I5b4f756c3a683f2d8e0ebdb79600d4e30bc26849
2016-10-04 18:32:14 +00:00
Mark Salyzyn 1f90485804 Merge "system/core: drop or replace log/logger.h" 2016-10-04 18:27:46 +00:00
Mark Salyzyn 37c9451349 system/core: drop or replace log/logger.h
debuggerd does not require log/logger.h, can use android/log.h
In some cases, mark why log/logger.h was required.

Test: Compile and boot smoke test
Bug: 26552300
Bug: 31289077
Bug: 31456426
Change-Id: Ia34987e25a01d81971ec8d785415f732b8376c4f
2016-10-04 09:09:10 -07:00
Mohan Srinivasan 96eba22338 Merge "liblog: logd: Add android_lookupEventTag_len()" am: 093951a230 am: aed39f1f3d
am: 2acb41b46c

Change-Id: Ifd5da3780cf05863b71fad9583b1b83f4962b46f
2016-10-03 22:47:51 +00:00
Mohan Srinivasan 2acb41b46c Merge "liblog: logd: Add android_lookupEventTag_len()" am: 093951a230
am: aed39f1f3d

Change-Id: If1615c62df20df58eda2910455f2a1e05268fba7
2016-10-03 22:42:20 +00:00
Mohan Srinivasan aed39f1f3d Merge "liblog: logd: Add android_lookupEventTag_len()"
am: 093951a230

Change-Id: I2e9a3c1132dc7cd6e22d55cc2983720f7b8510b9
2016-10-03 22:40:19 +00:00
Mohan Srinivasan 093951a230 Merge "liblog: logd: Add android_lookupEventTag_len()" 2016-10-03 22:34:15 +00:00
Dimitry Ivanov 897fa44319 Merge "Revert "Remove liblog from libcutils as a whole static lib"" am: d4446ccce8 am: 3e5bb6dc6e
am: 1814d808f3

Change-Id: If6507fc771cce958f0cbfe7ecc18407826494326
2016-10-03 22:33:41 +00:00
Dimitry Ivanov 1814d808f3 Merge "Revert "Remove liblog from libcutils as a whole static lib"" am: d4446ccce8
am: 3e5bb6dc6e

Change-Id: I6ec33c2aefa86f088701340b73205efab82a422d
2016-10-03 22:28:37 +00:00
Dimitry Ivanov 3e5bb6dc6e Merge "Revert "Remove liblog from libcutils as a whole static lib""
am: d4446ccce8

Change-Id: I6bd8c8756d0318ac5b78395bc3c6fdcee11d2ec0
2016-10-03 22:26:06 +00:00
Dimitry Ivanov d4446ccce8 Merge "Revert "Remove liblog from libcutils as a whole static lib"" 2016-10-03 22:21:19 +00:00
Dimitry Ivanov f93d732a45 Revert "Remove liblog from libcutils as a whole static lib"
This reverts commit 6dd58c00ca.

Bug: http://b/31289077
Bug: http://b/27171986
Change-Id: I519d77de118f02346a4f89b197ca4df7e9f883ac
2016-10-03 22:18:49 +00:00
Dimitry Ivanov 17c88c7743 Merge "Remove liblog from libcutils as a whole static lib" am: dd01f980e5 am: 7e06b19328
am: e9f4c175f3

Change-Id: I3b71d2aeb0591937a3ee974fb5fdaa868c03bd29
2016-10-03 18:47:14 +00:00
Dimitry Ivanov e9f4c175f3 Merge "Remove liblog from libcutils as a whole static lib" am: dd01f980e5
am: 7e06b19328

Change-Id: I4c8f090dc4c92075c6cc370ea701197633df2bcd
2016-10-03 18:41:56 +00:00
Dimitry Ivanov 7e06b19328 Merge "Remove liblog from libcutils as a whole static lib"
am: dd01f980e5

Change-Id: I9fdba3d75802889ca3f9d9aa4ed7d708023f1e27
2016-10-03 18:37:56 +00:00
Dimitry Ivanov dd01f980e5 Merge "Remove liblog from libcutils as a whole static lib" 2016-10-03 18:26:45 +00:00
Mark Salyzyn 807e40ecc9 liblog: logd: Add android_lookupEventTag_len()
Allows us to mitigate the impact of MAP_PRIVATE and copy on write by
calling android_lookupEventTag_len instead of android_lookupEventTag,
and delaying the copy on write impact to the later.  We return a
string length in a supplied location along with the string pointer
with android_lookupEventTag_len(const EventTagMap* map, size_t* len,
int tag).  The string is not guaranteed to be nul terminated.  Since
android_lookupEventTag() called even once can cause the memory
impact, we will mark it as deprecated, but we currently have no
timeframe for removal since this is a very old interface.

Add an API for __android_log_is_loggable_len() that accepts the non
null terminated content and fixup callers that would gain because the
length is known prior to the call either in the compiler or at
runtime.  Tackle transition to android_lookupEventTag_len() and
fixup callers.

On any application that performs logging (eg: com.android.phone)

/proc/<pid>/smaps before:

xxxxxxxxxx-xxxxxxxxxx rw-p 00000000 fd:00 463 /system/etc/event-log-tags
Size:                 20 kB
Rss:                  20 kB
Pss:                   1 kB
Shared_Clean:          0 kB
Shared_Dirty:         20 kB
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:            0 kB
Anonymous:            20 kB
AnonHugePages:         0 kB
Swap:                  0 kB
SwapPss:               0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd wr mr mw me ac

/proc/<pid>/smaps after:

xxxxxxxxxx-xxxxxxxxxx rw-p 00000000 fd:00 1773 /system/etc/event-log-tags
Size:                 20 kB
Rss:                  20 kB
Pss:                   1 kB
Shared_Clean:         20 kB  (was 0kB)
Shared_Dirty:          0 kB  (was 20kB)
Private_Clean:         0 kB
Private_Dirty:         0 kB
Referenced:           20 kB  (was 0kB)
Anonymous:             0 kB  (was 20kB)
AnonHugePages:         0 kB
Swap:                  0 kB
SwapPss:               0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB
VmFlags: rd wr mr mw me ac

Added liblog-unit-tests --gtest_filter=liblog.event_log_tags to
check for Shared_Clean: to not be 0 and Anonymous: to be 0 for
all processes referencing event-log-tags.  Which can include multiple
references to /system/etc/event-log-tags and future possible refs to
/data/misc/logd/event-log-tags and /dev/event-log-tags.  We want
failure messages to help point to errant code using the deprecated
interface.

This change saves 1/4MB of memory or more on a typical system.

Test: gTest liblog-unit-tests
Bug: 31456426
Change-Id: I9e08e44d9092bd96fe704b5709242e7195281d33
2016-10-03 11:08:34 -07:00
Dimitry Ivanov 6dd58c00ca Remove liblog from libcutils as a whole static lib
libcutils no longer needs to export liblog symbols.

Bug: http://b/31289077
Bug: http://b/27171986
Test: make
Change-Id: I546a5bce56c0c88ac2493c320298d4dc13954566
2016-10-03 03:07:13 -07:00
Elliott Hughes 5c54bb548a Merge "Log failed load_properties_from_file calls." am: 57513bd5a3 am: 9abb85ebe0
am: 6d60731271

Change-Id: I603025e42824e11817042d98ad7a7387b83fe99c
2016-10-01 01:23:18 +00:00
Elliott Hughes 6d60731271 Merge "Log failed load_properties_from_file calls." am: 57513bd5a3
am: 9abb85ebe0

Change-Id: Icebec299d2f3f5b02654bba12fdd28ea0199a61f
2016-10-01 01:18:15 +00:00
Elliott Hughes 9abb85ebe0 Merge "Log failed load_properties_from_file calls."
am: 57513bd5a3

Change-Id: I7cdf54c423c6aa35fb061af31a0bab42614b2768
2016-10-01 01:14:43 +00:00