1. 18 Mar, 2015 1 commit
    • Mark Salyzyn's avatar
      logd: replace internal CLOCK_MONOTONIC use with sequence numbers · f7c0f752
      Mark Salyzyn authored
      - switch to simpler and faster internal sequence number, drops
        a syscall overhead on 32-bit platforms.
      - add ability to break-out of flushTo loop with filter return -1
        allowing in reduction in reader overhead.
      
      Change-Id: Ic5cb2b9afa4d9470153971fc9197b07279e2b79d
      f7c0f752
  2. 14 Jan, 2015 1 commit
    • TraianX Schiau's avatar
      logd: Fix pruning · da6495d0
      TraianX Schiau authored
      
      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: default avatarTraianX Schiau <traianx.schiau@intel.com>
      da6495d0
  3. 12 Aug, 2014 1 commit
  4. 08 Aug, 2014 1 commit
  5. 14 Mar, 2014 1 commit
  6. 26 Feb, 2014 2 commits
    • Mark Salyzyn's avatar
      logd: Adjust to match defacto coding style · c03e72cc
      Mark Salyzyn authored
      (cherry picked from commit c46f77bd)
      
      Change-Id: I80685cdc7116e10c5a5a77abe856fd96804f9117
      c03e72cc
    • Mark Salyzyn's avatar
      logd: initial checkin. · 0175b074
      Mark Salyzyn authored
      
      * Create a new userspace log daemon for handling logging messages.
      
      Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
      Signed-off-by: default avatarNick Kralevich <nnk@google.com>
      
      * Merge conflicts
      * rename new syslog daemon to logd to prevent confusion with bionic syslog
      * replace racy getGroups call with KISS call to client->getGid()
      * Timestamps are filed at logging source
      * insert entries into list in timestamp order
      * Added LogTimeEntry tail filtration handling
      * Added region locking around LogWriter list
      * separate threads for each writer
      * /dev/socket/logd* permissions
      Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
      
      (cherry picked from commit 3e76e0a4)
      
      Author: Nick Kralevich <nnk@google.com>
      Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
      0175b074
  7. 25 Feb, 2014 1 commit
  8. 14 Feb, 2014 1 commit
    • Nick Kralevich's avatar
      logd: initial checkin. · 3e76e0a4
      Nick Kralevich authored
      
      * Create a new userspace log daemon for handling logging messages.
      
      Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
      Signed-off-by: default avatarNick Kralevich <nnk@google.com>
      
      * Merge conflicts
      * rename new syslog daemon to logd to prevent confusion with bionic syslog
      * replace racy getGroups call with KISS call to client->getGid()
      * Timestamps are filed at logging source
      * insert entries into list in timestamp order
      * Added LogTimeEntry tail filtration handling
      * Added region locking around LogWriter list
      * separate threads for each writer
      * /dev/socket/logd* permissions
      Signed-off-by: default avatarMark Salyzyn <salyzyn@google.com>
      
      Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
      3e76e0a4