summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-10-27 21:24:54 -0700
committerJeff Brown <jeffbrown@google.com>2011-10-28 14:58:39 -0700
commit27a852b620c54e4c722d8af3d954db169fdd7554 (patch)
tree3c7428cfc9c65454a335eef0d5fc5f040da12b81 /libs/binder
parent21f0be6b0d07db2449338b72dc4a52d7eff9a54f (diff)
downloadframeworks_native-27a852b620c54e4c722d8af3d954db169fdd7554.zip
frameworks_native-27a852b620c54e4c722d8af3d954db169fdd7554.tar.gz
frameworks_native-27a852b620c54e4c722d8af3d954db169fdd7554.tar.bz2
Improve the slow query instrumentation.
On user-debug and eng builds, you can set the "db.log.slow_query_threshold" system property to queries that take longer than the specified number of milliseconds. Set it to 0 to log all queries. This property has been around for a while but it was implemented poorly. In particular, it *changed* the behavior of the query by calling getCount() while holding the Db connection. In normal operation, the query will not actually run until later. By putting the timing logic into fillWindow() instead, we ensure that we only measure queries that actually ran. We also capture cases where the cursor window gets filled multiple times. Bug: 5520301 Change-Id: I174f5e1ea15831a1d22a36e9a804d7755f230b38
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/CursorWindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/CursorWindow.cpp b/libs/binder/CursorWindow.cpp
index 1b85a71..60681c4 100644
--- a/libs/binder/CursorWindow.cpp
+++ b/libs/binder/CursorWindow.cpp
@@ -211,7 +211,7 @@ uint32_t CursorWindow::alloc(size_t size, bool aligned) {
uint32_t offset = mHeader->freeOffset + padding;
uint32_t nextFreeOffset = offset + size;
if (nextFreeOffset > mSize) {
- LOGE("Window is full: requested allocation %d bytes, "
+ LOGW("Window is full: requested allocation %d bytes, "
"free space %d bytes, window size %d bytes",
size, freeSpace(), mSize);
return 0;