From 1d4fdcb6def9602ea8ed523e7fa1930502e692db Mon Sep 17 00:00:00 2001 From: Ruchir Rastogi Date: Mon, 6 Apr 2020 14:10:04 -0700 Subject: [PATCH] Remove obsolete/infeasible TODOs (a) Clean up LogEvent::parseBuffer - having those variables be member variables really helps with code readability. (b) Don't hold locks when writing to pipe within ShellSubscriber - ag/150969574 describes why holding a lock is necessary. Test: m Bug: 150312423 (allows this bug to be marked as obsolete) Change-Id: I4903de1dc87a552932b70e5975a7cde91df05b3b --- cmds/statsd/src/logd/LogEvent.h | 3 --- cmds/statsd/src/shell/ShellSubscriber.cpp | 1 - 2 files changed, 4 deletions(-) diff --git a/cmds/statsd/src/logd/LogEvent.h b/cmds/statsd/src/logd/LogEvent.h index 850e2b010f8c0..9e21c777e6ffb 100644 --- a/cmds/statsd/src/logd/LogEvent.h +++ b/cmds/statsd/src/logd/LogEvent.h @@ -218,9 +218,6 @@ private: * The below three variables are only valid during the execution of * parseBuffer. There are no guarantees about the state of these variables * before/after. - * - * TODO (b/150312423): These shouldn't be member variables. We should pass - * them around as parameters. */ uint8_t* mBuf; uint32_t mRemainingLen; // number of valid bytes left in the buffer being parsed diff --git a/cmds/statsd/src/shell/ShellSubscriber.cpp b/cmds/statsd/src/shell/ShellSubscriber.cpp index 1cee4d9babdcb..bed836a1bd90b 100644 --- a/cmds/statsd/src/shell/ShellSubscriber.cpp +++ b/cmds/statsd/src/shell/ShellSubscriber.cpp @@ -152,7 +152,6 @@ void ShellSubscriber::startPull(int64_t myToken) { mPullerMgr->Pull(pullInfo.mPullerMatcher.atom_id(), uids, &data); VLOG("pulled %zu atoms with id %d", data.size(), pullInfo.mPullerMatcher.atom_id()); - // TODO(b/150969574): Don't write to a pipe while holding a lock. if (!writePulledAtomsLocked(data, pullInfo.mPullerMatcher)) { mSubscriptionInfo->mClientAlive = false; mSubscriptionShouldEnd.notify_one();