diff options
author | Elliott Hughes <enh@google.com> | 2014-08-18 10:26:52 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-08-18 10:39:55 -0700 |
commit | 06451fe081d5ae79121a6f301475c7042f7f3a5d (patch) | |
tree | 438c63291d13649ff64da29b62b9a5f7bf40163c /core/jni/android_util_Binder.cpp | |
parent | 8a28e16cd346bf28d00d8d5935ed092ffb59e5c9 (diff) | |
download | frameworks_base-06451fe081d5ae79121a6f301475c7042f7f3a5d.zip frameworks_base-06451fe081d5ae79121a6f301475c7042f7f3a5d.tar.gz frameworks_base-06451fe081d5ae79121a6f301475c7042f7f3a5d.tar.bz2 |
Use gettid directly in frameworks JNI.
Bug: 17048545
Change-Id: I1cd45d85368c799b75f76e778722979cbbb68ed2
Diffstat (limited to 'core/jni/android_util_Binder.cpp')
-rw-r--r-- | core/jni/android_util_Binder.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index 4b2f740..e0003b8 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -1036,16 +1036,9 @@ static void conditionally_log_binder_call(int64_t start_millis, } // We only measure binder call durations to potentially log them if -// we're on the main thread. Unfortunately sim-eng doesn't seem to -// have gettid, so we just ignore this and don't log if we can't -// get the thread id. +// we're on the main thread. static bool should_time_binder_calls() { -#ifdef HAVE_GETTID - return (getpid() == androidGetTid()); -#else -#warning no gettid(), so not logging Binder calls... - return false; -#endif + return (getpid() == gettid()); } static jboolean android_os_BinderProxy_transact(JNIEnv* env, jobject obj, |