Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -34592,7 +34592,7 @@ package android.os { method public static void endAsyncSection(java.lang.String, int); method public static void endSection(); method public static boolean isEnabled(); method public static void setCounter(java.lang.String, int); method public static void setCounter(java.lang.String, long); } public class TransactionTooLargeException extends android.os.RemoteException { core/java/android/os/Trace.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public final class Trace { private static native void nativeSetTracingEnabled(boolean allowed); @FastNative private static native void nativeTraceCounter(long tag, String name, int value); private static native void nativeTraceCounter(long tag, String name, long value); @FastNative private static native void nativeTraceBegin(long tag, String name); @FastNative Loading Loading @@ -365,7 +365,7 @@ public final class Trace { * @param counterName The counter name to appear in the trace. * @param counterValue The counter value. */ public static void setCounter(String counterName, int counterValue) { public static void setCounter(String counterName, long counterValue) { if (isTagEnabled(TRACE_TAG_APP)) { nativeTraceCounter(TRACE_TAG_APP, counterName, counterValue); } Loading core/jni/android_os_Trace.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -52,9 +52,9 @@ static jlong android_os_Trace_nativeGetEnabledTags(JNIEnv*, jclass) { } static void android_os_Trace_nativeTraceCounter(JNIEnv* env, jclass, jlong tag, jstring nameStr, jint value) { jlong tag, jstring nameStr, jlong value) { withString(env, nameStr, [tag, value](char* str) { atrace_int(tag, str, value); atrace_int64(tag, str, value); }); } Loading Loading @@ -106,7 +106,7 @@ static const JNINativeMethod gTraceMethods[] = { // ----------- @FastNative ---------------- { "nativeTraceCounter", "(JLjava/lang/String;I)V", "(JLjava/lang/String;J)V", (void*)android_os_Trace_nativeTraceCounter }, { "nativeTraceBegin", "(JLjava/lang/String;)V", Loading native/android/libandroid.map.txt +3 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,9 @@ LIBANDROID { ATrace_beginSection; # introduced=23 ATrace_endSection; # introduced=23 ATrace_isEnabled; # introduced=23 ATrace_beginAsyncSection; # introduced=29 ATrace_endAsyncSection; # introduced=29 ATrace_setCounter; # introduced=29 android_getaddrinfofornetwork; # introduced=23 android_setprocnetwork; # introduced=23 android_setsocknetwork; # introduced=23 Loading native/android/trace.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,15 @@ void ATrace_beginSection(const char* sectionName) { void ATrace_endSection() { atrace_end(ATRACE_TAG_APP); } void ATrace_beginAsyncSection(const char* sectionName, int32_t cookie) { atrace_async_begin(ATRACE_TAG_APP, sectionName, cookie); } void ATrace_endAsyncSection(const char* sectionName, int32_t cookie) { atrace_async_end(ATRACE_TAG_APP, sectionName, cookie); } void ATrace_setCounter(const char* counterName, int64_t counterValue) { atrace_int64(ATRACE_TAG_APP, counterName, counterValue); } No newline at end of file Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -34592,7 +34592,7 @@ package android.os { method public static void endAsyncSection(java.lang.String, int); method public static void endSection(); method public static boolean isEnabled(); method public static void setCounter(java.lang.String, int); method public static void setCounter(java.lang.String, long); } public class TransactionTooLargeException extends android.os.RemoteException {
core/java/android/os/Trace.java +2 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public final class Trace { private static native void nativeSetTracingEnabled(boolean allowed); @FastNative private static native void nativeTraceCounter(long tag, String name, int value); private static native void nativeTraceCounter(long tag, String name, long value); @FastNative private static native void nativeTraceBegin(long tag, String name); @FastNative Loading Loading @@ -365,7 +365,7 @@ public final class Trace { * @param counterName The counter name to appear in the trace. * @param counterValue The counter value. */ public static void setCounter(String counterName, int counterValue) { public static void setCounter(String counterName, long counterValue) { if (isTagEnabled(TRACE_TAG_APP)) { nativeTraceCounter(TRACE_TAG_APP, counterName, counterValue); } Loading
core/jni/android_os_Trace.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -52,9 +52,9 @@ static jlong android_os_Trace_nativeGetEnabledTags(JNIEnv*, jclass) { } static void android_os_Trace_nativeTraceCounter(JNIEnv* env, jclass, jlong tag, jstring nameStr, jint value) { jlong tag, jstring nameStr, jlong value) { withString(env, nameStr, [tag, value](char* str) { atrace_int(tag, str, value); atrace_int64(tag, str, value); }); } Loading Loading @@ -106,7 +106,7 @@ static const JNINativeMethod gTraceMethods[] = { // ----------- @FastNative ---------------- { "nativeTraceCounter", "(JLjava/lang/String;I)V", "(JLjava/lang/String;J)V", (void*)android_os_Trace_nativeTraceCounter }, { "nativeTraceBegin", "(JLjava/lang/String;)V", Loading
native/android/libandroid.map.txt +3 −0 Original line number Diff line number Diff line Loading @@ -229,6 +229,9 @@ LIBANDROID { ATrace_beginSection; # introduced=23 ATrace_endSection; # introduced=23 ATrace_isEnabled; # introduced=23 ATrace_beginAsyncSection; # introduced=29 ATrace_endAsyncSection; # introduced=29 ATrace_setCounter; # introduced=29 android_getaddrinfofornetwork; # introduced=23 android_setprocnetwork; # introduced=23 android_setsocknetwork; # introduced=23 Loading
native/android/trace.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,15 @@ void ATrace_beginSection(const char* sectionName) { void ATrace_endSection() { atrace_end(ATRACE_TAG_APP); } void ATrace_beginAsyncSection(const char* sectionName, int32_t cookie) { atrace_async_begin(ATRACE_TAG_APP, sectionName, cookie); } void ATrace_endAsyncSection(const char* sectionName, int32_t cookie) { atrace_async_end(ATRACE_TAG_APP, sectionName, cookie); } void ATrace_setCounter(const char* counterName, int64_t counterValue) { atrace_int64(ATRACE_TAG_APP, counterName, counterValue); } No newline at end of file