No description
Find a file
TraianX Schiau da6495d06f logd: Fix pruning
In a scenario in which an on-line (blocking) client is running and
a clean is attempted (logcat -c), the following can be observed:

1) the on-line logger seems to freeze
2) any other clear attempt will have no effect

What is actually happening:

In this case prune function will "instruct" the oldest timeEntry
to skip a huge number (very close to ULONG_MAX) of messages, this
being the cause of 1.

Since the consumer thread will skip all the log entries, mStart
updating will also be skipped. So a new cleaning attempt will have
the same oldest entry, nothing will be done.

Fix description:
a. keep a separated skipAhead count for individual log buffers (log_id_t)
      LogTimeEntry::LogTimeEntry
      LogTimeEntry::FilterSecondPass
      LogTimeEntry::skipAhead
      LogTimeEntry::riggerSkip_Locked

b. update LogTimeEntry::mStart even if the current message is skipped
      LogTimeEntry::FilterSecondPass

c. while pruning, only take into account the LogTimeEntrys that are monitoring
   the log_id in question, and provide a public method of checking this.
      LogTimeEntry::isWatching
      LogTimeEntry::FilterFirstPass
      LogTimeEntry::FilterSecondPass

d. Reset the skip cont befor the client thtread starts to sleep, at this point
   we should be up to date.
      LogTimeEntry::cleanSkip_Locked
      LogTimeEntry::threadStart

Change-Id: I1b369dc5b02476e633e52578266a644e37e188a5
Signed-off-by: TraianX Schiau <traianx.schiau@intel.com>
2015-01-14 19:12:47 +00:00
adb Python unit test for adb. 2015-01-13 15:08:56 -08:00
adf libadf: add tests for various failure modes 2014-05-07 15:28:05 -07:00
cpio cpio: Turn on -Werror 2014-05-23 09:48:09 -07:00
debuggerd #include <arpa/inet.h> for htonl. 2014-12-18 23:49:17 +00:00
fastboot kill libunz 2014-12-09 22:24:07 -08:00
fastbootd Fix missing #includes in system/core. 2014-12-29 12:24:25 -08:00
fs_mgr Fix Nick's nits 2014-12-09 19:38:23 -08:00
gpttool gpttool: turn on -Werror 2014-05-05 10:30:04 -07:00
healthd Healthd: Remove unused variables 2014-11-24 18:48:55 -08:00
include Add required casts for clang/llvm -Wc++11-narrowing 2015-01-12 16:53:52 -08:00
init property_service: Added vendor build properties to load_all_props 2015-01-13 18:18:41 -08:00
libbacktrace Cleanup libbacktrace Android.mk 2014-12-12 04:40:06 +00:00
libcutils Remove HAVE_LIBC_SYSTEM_PROPERTIES and HAVE_SYSTEM_PROPERTY_SERVER. 2015-01-12 13:56:34 -08:00
libdiskconfig am eb075e28: am c8179498: am 2f62edf7: Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:19:27 +00:00
libion Libion: Remove unused variables 2014-11-25 10:16:06 -08:00
liblog liblog: Add log_time += operator 2015-01-05 16:27:54 +00:00
libmemtrack Fix missing #includes in system/core. 2014-12-29 12:24:25 -08:00
libmincrypt Disable clang optimization that has segmentation fault. 2014-12-17 14:59:53 -08:00
libnativebridge am c6dead70: Merge "maybe fix mac build" 2014-11-02 14:25:08 +00:00
libnetutils Libnetutils: Remove unused functions & variables 2014-11-24 10:43:53 -08:00
libpixelflinger Linux always has POSIX clocks available. 2015-01-09 16:17:46 -08:00
libprocessgroup Fix missing #includes in system/core. 2014-12-29 12:24:25 -08:00
libsparse Cleanup libsparse Android.mk 2014-12-12 04:19:27 +00:00
libsuspend Libsuspend: Remove unused variable 2014-11-24 18:53:44 -08:00
libsync Add gtest conformance tests for libsync. 2014-10-11 02:10:23 +00:00
libsysutils Fix formatting in 4df4dfedf6. 2014-11-10 15:50:30 -08:00
libusbhost libusbhost: Fix IOCTL call during usb_request_cancel 2014-08-07 14:58:31 -07:00
libutils Fix references to HAVE_PRCTL. 2014-12-15 12:52:53 -08:00
libziparchive Merge "Reject zip archives whose entry names are not valid UTF-8." 2014-12-08 13:08:34 +00:00
libzipfile Clean up libzipfile Android.mk 2014-12-05 15:59:03 +00:00
lmkd Lmkd: Fix unused variables 2014-11-24 20:32:42 -08:00
logcat logcat: use liblog to determine -b all list 2014-12-05 20:14:30 +00:00
logd logd: Fix pruning 2015-01-14 19:12:47 +00:00
logwrapper Fix "ptsname is not thread-safe; use ptsname_r instead" build break. 2014-07-29 11:08:57 -07:00
mkbootimg mkbootimg: turn on -Werror 2014-05-05 10:30:04 -07:00
netcfg Cleanup: Delete dead code. 2014-07-22 15:00:21 -07:00
reboot reboot: Turn on -Werror 2014-05-21 12:58:38 -07:00
rootdir rootdir: add pstore 2015-01-14 17:15:39 +00:00
run-as run-as: build 1161573 failure 2014-05-08 21:18:23 +00:00
sdcard Merge "Allow updates for open file descriptors" 2014-12-10 18:50:08 +00:00
toolbox Lose toolbox notify in favor of toybox inotifyd. 2015-01-14 10:50:17 -08:00
.gitignore Don't compile abort_socket.c for host targets. It is only intended to run on Linux targets. 2009-05-26 13:23:23 -07:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk add cleanspec for lmkd 2014-07-10 14:26:57 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00