diff options
| author | 2020-12-14 23:12:48 +0000 | |
|---|---|---|
| committer | 2020-12-14 23:12:48 +0000 | |
| commit | 9bfe73dd829625522b70fa706b33c80cce426cb0 (patch) | |
| tree | e554a83d761656481604df2d814793575126b3f1 /libs/binder/IPCThreadState.cpp | |
| parent | c5ebd4871f82475c49e9744561aebcc56b910519 (diff) | |
| parent | 19e05f3fcd2cec535bd0144eed7bdacb9d72d1bf (diff) | |
Merge "libbinder: Better oneway function logs." am: f5009aa2c3 am: 3bb90bc6db am: 19e05f3fcd
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1527179
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Iaec3deae5301c7cbb827d6251923ec58d1a8e194
Diffstat (limited to 'libs/binder/IPCThreadState.cpp')
| -rw-r--r-- | libs/binder/IPCThreadState.cpp | 20 | 
1 files changed, 16 insertions, 4 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index d4c7acfdfd..7d01e0b1c3 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -1248,10 +1248,22 @@ status_t IPCThreadState::executeCommand(int32_t cmd)                  constexpr uint32_t kForwardReplyFlags = TF_CLEAR_BUF;                  sendReply(reply, (tr.flags & kForwardReplyFlags));              } else { -                if (error != OK || reply.dataSize() != 0) { -                    alog << "oneway function results will be dropped but finished with status " -                         << statusToString(error) -                         << " and parcel size " << reply.dataSize() << endl; +                if (error != OK) { +                    alog << "oneway function results for code " << tr.code +                         << " on binder at " +                         << reinterpret_cast<void*>(tr.target.ptr) +                         << " will be dropped but finished with status " +                         << statusToString(error); + +                    // ideally we could log this even when error == OK, but it +                    // causes too much logspam because some manually-written +                    // interfaces have clients that call methods which always +                    // write results, sometimes as oneway methods. +                    if (reply.dataSize() != 0) { +                         alog << " and reply parcel size " << reply.dataSize(); +                    } + +                    alog << endl;                  }                  LOG_ONEWAY("NOT sending reply to %d!", mCallingPid);              }  |