)]}'
{
  "commit": "da6495d06f1798ea81cebbfbdd44f16135e1a3cd",
  "tree": "fe2b7bf4d3f15d06da42731645b8fe7115084b5b",
  "parents": [
    "da3dec3c19d1489f5997aea9dafd34b68c2b515b"
  ],
  "author": {
    "name": "TraianX Schiau",
    "email": "traianx.schiau@intel.com",
    "time": "Wed Dec 17 10:53:41 2014 +0200"
  },
  "committer": {
    "name": "Mark Salyzyn",
    "email": "salyzyn@google.com",
    "time": "Wed Jan 14 19:12:47 2015 +0000"
  },
  "message": "logd: Fix pruning\n\nIn a scenario in which an on-line (blocking) client is running and\na clean is attempted (logcat -c), the following can be observed:\n\n1) the on-line logger seems to freeze\n2) any other clear attempt will have no effect\n\nWhat is actually happening:\n\nIn this case prune function will \"instruct\" the oldest timeEntry\nto skip a huge number (very close to ULONG_MAX) of messages, this\nbeing the cause of 1.\n\nSince the consumer thread will skip all the log entries, mStart\nupdating will also be skipped. So a new cleaning attempt will have\nthe same oldest entry, nothing will be done.\n\nFix description:\na. keep a separated skipAhead count for individual log buffers (log_id_t)\n      LogTimeEntry::LogTimeEntry\n      LogTimeEntry::FilterSecondPass\n      LogTimeEntry::skipAhead\n      LogTimeEntry::riggerSkip_Locked\n\nb. update LogTimeEntry::mStart even if the current message is skipped\n      LogTimeEntry::FilterSecondPass\n\nc. while pruning, only take into account the LogTimeEntrys that are monitoring\n   the log_id in question, and provide a public method of checking this.\n      LogTimeEntry::isWatching\n      LogTimeEntry::FilterFirstPass\n      LogTimeEntry::FilterSecondPass\n\nd. Reset the skip cont befor the client thtread starts to sleep, at this point\n   we should be up to date.\n      LogTimeEntry::cleanSkip_Locked\n      LogTimeEntry::threadStart\n\nChange-Id: I1b369dc5b02476e633e52578266a644e37e188a5\nSigned-off-by: TraianX Schiau \u003ctraianx.schiau@intel.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1c74ba5acc646ab3cd2fe6d14944903d5d2ab54d",
      "old_mode": 33188,
      "old_path": "logd/LogBuffer.cpp",
      "new_id": "6307bed636eaa5b23a9f4f42e67609d23891f42b",
      "new_mode": 33188,
      "new_path": "logd/LogBuffer.cpp"
    },
    {
      "type": "modify",
      "old_id": "ea4e8c83d5bd29f2c113b296807aa66c3bc1b836",
      "old_mode": 33188,
      "old_path": "logd/LogTimes.cpp",
      "new_id": "5f9db8da5bbc113722fcf51e73d18e798850081c",
      "new_mode": 33188,
      "new_path": "logd/LogTimes.cpp"
    },
    {
      "type": "modify",
      "old_id": "0bfa7a22fecadb1fc87cec40a1660f62e2e28b46",
      "old_mode": 33188,
      "old_path": "logd/LogTimes.h",
      "new_id": "81aedfb689daabf920a108db51682f47dcc28483",
      "new_mode": 33188,
      "new_path": "logd/LogTimes.h"
    }
  ]
}
