OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/android/jni_android.h" | 5 #include "base/android/jni_android.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/googletest/include/gtest/gtest.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 namespace android { | 12 namespace android { |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 base::subtle::AtomicWord g_atomic_id = 0; | 16 base::subtle::AtomicWord g_atomic_id = 0; |
17 int LazyMethodIDCall(JNIEnv* env, jclass clazz, int p) { | 17 int LazyMethodIDCall(JNIEnv* env, jclass clazz, int p) { |
18 jmethodID id = base::android::MethodID::LazyGet< | 18 jmethodID id = base::android::MethodID::LazyGet< |
19 base::android::MethodID::TYPE_STATIC>( | 19 base::android::MethodID::TYPE_STATIC>( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 LOG(ERROR) << "JNI LazyMethodIDCall (us) " << | 52 LOG(ERROR) << "JNI LazyMethodIDCall (us) " << |
53 base::TimeDelta(end_lazy - start_lazy).InMicroseconds(); | 53 base::TimeDelta(end_lazy - start_lazy).InMicroseconds(); |
54 LOG(ERROR) << "JNI MethodIDCall (us) " << | 54 LOG(ERROR) << "JNI MethodIDCall (us) " << |
55 base::TimeDelta(end - start).InMicroseconds(); | 55 base::TimeDelta(end - start).InMicroseconds(); |
56 LOG(ERROR) << "JNI " << o; | 56 LOG(ERROR) << "JNI " << o; |
57 } | 57 } |
58 | 58 |
59 | 59 |
60 } // namespace android | 60 } // namespace android |
61 } // namespace base | 61 } // namespace base |
OLD | NEW |