Loading core/java/android/database/CursorWindow.java +9 −8 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.ravenwood.annotation.RavenwoodRedirect; import android.ravenwood.annotation.RavenwoodRedirectionClass; import android.ravenwood.annotation.RavenwoodThrow; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.system.CloseGuard; Loading Loading @@ -94,24 +95,24 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { // Below native methods don't do unconstrained work, so are FastNative for performance @FastNative @CriticalNative @RavenwoodThrow private static native void nativeClear(long windowPtr); @FastNative @CriticalNative @RavenwoodRedirect private static native int nativeGetNumRows(long windowPtr); @FastNative @CriticalNative @RavenwoodRedirect private static native boolean nativeSetNumColumns(long windowPtr, int columnNum); @FastNative @RavenwoodRedirect private static native boolean nativeAllocRow(long windowPtr); @FastNative @CriticalNative @RavenwoodThrow private static native void nativeFreeLastRow(long windowPtr); @FastNative @CriticalNative @RavenwoodRedirect private static native int nativeGetType(long windowPtr, int row, int column); @FastNative Loading @@ -121,13 +122,13 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { @RavenwoodRedirect private static native double nativeGetDouble(long windowPtr, int row, int column); @FastNative @CriticalNative @RavenwoodRedirect private static native boolean nativePutLong(long windowPtr, long value, int row, int column); @FastNative @CriticalNative @RavenwoodRedirect private static native boolean nativePutDouble(long windowPtr, double value, int row, int column); @FastNative @CriticalNative @RavenwoodThrow private static native boolean nativePutNull(long windowPtr, int row, int column); Loading core/java/android/os/Binder.java +1 −0 Original line number Diff line number Diff line Loading @@ -1365,6 +1365,7 @@ public class Binder implements IBinder { } } @CriticalNative private static native long getNativeBBinderHolder(); /** Loading core/java/android/os/Trace.java +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ public final class Trace { private static native void nativeTraceCounter(long tag, String name, long value); @FastNative private static native void nativeTraceBegin(long tag, String name); @FastNative @CriticalNative private static native void nativeTraceEnd(long tag); @FastNative private static native void nativeAsyncTraceBegin(long tag, String name, int cookie); Loading core/java/android/tracing/perfetto/DataSource.java +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.util.proto.ProtoInputStream; import dalvik.annotation.optimization.CriticalNative; /** * Templated base class meant to be derived by embedders to create a custom data * source. Loading Loading @@ -194,9 +196,13 @@ public abstract class DataSource<DataSourceInstanceType extends DataSourceInstan private static native void nativeStopDonePerfettoInstanceLocked( long dataSourcePtr, int dsInstanceIdx); @CriticalNative private static native boolean nativePerfettoDsTraceIterateBegin(long dataSourcePtr); @CriticalNative private static native boolean nativePerfettoDsTraceIterateNext(long dataSourcePtr); @CriticalNative private static native void nativePerfettoDsTraceIterateBreak(long dataSourcePtr); @CriticalNative private static native int nativeGetPerfettoDsInstanceIndex(long dataSourcePtr); private static native void nativeWritePackets(long dataSourcePtr, byte[][] packetData); Loading core/jni/android_database_CursorWindow.cpp +21 −22 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ static void nativeWriteToParcel(JNIEnv * env, jclass clazz, jlong windowPtr, } } static void nativeClear(JNIEnv * env, jclass clazz, jlong windowPtr) { static void nativeClear(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); LOG_WINDOW("Clearing window %p", window); status_t status = window->clear(); Loading @@ -164,13 +164,12 @@ static void nativeClear(JNIEnv * env, jclass clazz, jlong windowPtr) { } } static jint nativeGetNumRows(JNIEnv* env, jclass clazz, jlong windowPtr) { static jint nativeGetNumRows(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); return window->getNumRows(); } static jboolean nativeSetNumColumns(JNIEnv* env, jclass clazz, jlong windowPtr, jint columnNum) { static jboolean nativeSetNumColumns(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jint columnNum) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->setNumColumns(columnNum); return status == OK; Loading @@ -182,13 +181,12 @@ static jboolean nativeAllocRow(JNIEnv* env, jclass clazz, jlong windowPtr) { return status == OK; } static void nativeFreeLastRow(JNIEnv* env, jclass clazz, jlong windowPtr) { static void nativeFreeLastRow(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); window->freeLastRow(); } static jint nativeGetType(JNIEnv* env, jclass clazz, jlong windowPtr, jint row, jint column) { static jint nativeGetType(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); LOG_WINDOW("returning column type affinity for %d,%d from %p", row, column, window); Loading Loading @@ -478,8 +476,8 @@ static jboolean nativePutString(JNIEnv* env, jclass clazz, jlong windowPtr, return true; } static jboolean nativePutLong(JNIEnv* env, jclass clazz, jlong windowPtr, jlong value, jint row, jint column) { static jboolean nativePutLong(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jlong value, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->putLong(row, column, value); Loading @@ -492,8 +490,8 @@ static jboolean nativePutLong(JNIEnv* env, jclass clazz, jlong windowPtr, return true; } static jboolean nativePutDouble(JNIEnv* env, jclass clazz, jlong windowPtr, jdouble value, jint row, jint column) { static jboolean nativePutDouble(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jdouble value, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->putDouble(row, column, value); Loading @@ -506,8 +504,7 @@ static jboolean nativePutDouble(JNIEnv* env, jclass clazz, jlong windowPtr, return true; } static jboolean nativePutNull(JNIEnv* env, jclass clazz, jlong windowPtr, jint row, jint column) { static jboolean nativePutNull(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->putNull(row, column); Loading Loading @@ -546,23 +543,25 @@ static const JNINativeMethod sMethods[] = (void*)nativePutString }, // ------- @FastNative below here ---------------------- { "nativeAllocRow", "(J)Z", (void*)nativeAllocRow }, { "nativeGetLong", "(JII)J", (void*)nativeGetLong }, { "nativeGetDouble", "(JII)D", (void*)nativeGetDouble }, // ------- @CriticalNative below here ------------------ { "nativeClear", "(J)V", (void*)nativeClear }, { "nativeGetNumRows", "(J)I", (void*)nativeGetNumRows }, { "nativeSetNumColumns", "(JI)Z", (void*)nativeSetNumColumns }, { "nativeAllocRow", "(J)Z", (void*)nativeAllocRow }, { "nativeFreeLastRow", "(J)V", (void*)nativeFreeLastRow }, { "nativeGetType", "(JII)I", (void*)nativeGetType }, { "nativeGetLong", "(JII)J", (void*)nativeGetLong }, { "nativeGetDouble", "(JII)D", (void*)nativeGetDouble }, { "nativeSetNumColumns", "(JI)Z", (void*)nativeSetNumColumns }, { "nativePutLong", "(JJII)Z", (void*)nativePutLong }, { "nativePutDouble", "(JDII)Z", Loading Loading
core/java/android/database/CursorWindow.java +9 −8 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.ravenwood.annotation.RavenwoodRedirect; import android.ravenwood.annotation.RavenwoodRedirectionClass; import android.ravenwood.annotation.RavenwoodThrow; import dalvik.annotation.optimization.CriticalNative; import dalvik.annotation.optimization.FastNative; import dalvik.system.CloseGuard; Loading Loading @@ -94,24 +95,24 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { // Below native methods don't do unconstrained work, so are FastNative for performance @FastNative @CriticalNative @RavenwoodThrow private static native void nativeClear(long windowPtr); @FastNative @CriticalNative @RavenwoodRedirect private static native int nativeGetNumRows(long windowPtr); @FastNative @CriticalNative @RavenwoodRedirect private static native boolean nativeSetNumColumns(long windowPtr, int columnNum); @FastNative @RavenwoodRedirect private static native boolean nativeAllocRow(long windowPtr); @FastNative @CriticalNative @RavenwoodThrow private static native void nativeFreeLastRow(long windowPtr); @FastNative @CriticalNative @RavenwoodRedirect private static native int nativeGetType(long windowPtr, int row, int column); @FastNative Loading @@ -121,13 +122,13 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { @RavenwoodRedirect private static native double nativeGetDouble(long windowPtr, int row, int column); @FastNative @CriticalNative @RavenwoodRedirect private static native boolean nativePutLong(long windowPtr, long value, int row, int column); @FastNative @CriticalNative @RavenwoodRedirect private static native boolean nativePutDouble(long windowPtr, double value, int row, int column); @FastNative @CriticalNative @RavenwoodThrow private static native boolean nativePutNull(long windowPtr, int row, int column); Loading
core/java/android/os/Binder.java +1 −0 Original line number Diff line number Diff line Loading @@ -1365,6 +1365,7 @@ public class Binder implements IBinder { } } @CriticalNative private static native long getNativeBBinderHolder(); /** Loading
core/java/android/os/Trace.java +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ public final class Trace { private static native void nativeTraceCounter(long tag, String name, long value); @FastNative private static native void nativeTraceBegin(long tag, String name); @FastNative @CriticalNative private static native void nativeTraceEnd(long tag); @FastNative private static native void nativeAsyncTraceBegin(long tag, String name, int cookie); Loading
core/java/android/tracing/perfetto/DataSource.java +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.util.proto.ProtoInputStream; import dalvik.annotation.optimization.CriticalNative; /** * Templated base class meant to be derived by embedders to create a custom data * source. Loading Loading @@ -194,9 +196,13 @@ public abstract class DataSource<DataSourceInstanceType extends DataSourceInstan private static native void nativeStopDonePerfettoInstanceLocked( long dataSourcePtr, int dsInstanceIdx); @CriticalNative private static native boolean nativePerfettoDsTraceIterateBegin(long dataSourcePtr); @CriticalNative private static native boolean nativePerfettoDsTraceIterateNext(long dataSourcePtr); @CriticalNative private static native void nativePerfettoDsTraceIterateBreak(long dataSourcePtr); @CriticalNative private static native int nativeGetPerfettoDsInstanceIndex(long dataSourcePtr); private static native void nativeWritePackets(long dataSourcePtr, byte[][] packetData); Loading
core/jni/android_database_CursorWindow.cpp +21 −22 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ static void nativeWriteToParcel(JNIEnv * env, jclass clazz, jlong windowPtr, } } static void nativeClear(JNIEnv * env, jclass clazz, jlong windowPtr) { static void nativeClear(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); LOG_WINDOW("Clearing window %p", window); status_t status = window->clear(); Loading @@ -164,13 +164,12 @@ static void nativeClear(JNIEnv * env, jclass clazz, jlong windowPtr) { } } static jint nativeGetNumRows(JNIEnv* env, jclass clazz, jlong windowPtr) { static jint nativeGetNumRows(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); return window->getNumRows(); } static jboolean nativeSetNumColumns(JNIEnv* env, jclass clazz, jlong windowPtr, jint columnNum) { static jboolean nativeSetNumColumns(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jint columnNum) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->setNumColumns(columnNum); return status == OK; Loading @@ -182,13 +181,12 @@ static jboolean nativeAllocRow(JNIEnv* env, jclass clazz, jlong windowPtr) { return status == OK; } static void nativeFreeLastRow(JNIEnv* env, jclass clazz, jlong windowPtr) { static void nativeFreeLastRow(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); window->freeLastRow(); } static jint nativeGetType(JNIEnv* env, jclass clazz, jlong windowPtr, jint row, jint column) { static jint nativeGetType(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); LOG_WINDOW("returning column type affinity for %d,%d from %p", row, column, window); Loading Loading @@ -478,8 +476,8 @@ static jboolean nativePutString(JNIEnv* env, jclass clazz, jlong windowPtr, return true; } static jboolean nativePutLong(JNIEnv* env, jclass clazz, jlong windowPtr, jlong value, jint row, jint column) { static jboolean nativePutLong(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jlong value, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->putLong(row, column, value); Loading @@ -492,8 +490,8 @@ static jboolean nativePutLong(JNIEnv* env, jclass clazz, jlong windowPtr, return true; } static jboolean nativePutDouble(JNIEnv* env, jclass clazz, jlong windowPtr, jdouble value, jint row, jint column) { static jboolean nativePutDouble(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jdouble value, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->putDouble(row, column, value); Loading @@ -506,8 +504,7 @@ static jboolean nativePutDouble(JNIEnv* env, jclass clazz, jlong windowPtr, return true; } static jboolean nativePutNull(JNIEnv* env, jclass clazz, jlong windowPtr, jint row, jint column) { static jboolean nativePutNull(CRITICAL_JNI_PARAMS_COMMA jlong windowPtr, jint row, jint column) { CursorWindow* window = reinterpret_cast<CursorWindow*>(windowPtr); status_t status = window->putNull(row, column); Loading Loading @@ -546,23 +543,25 @@ static const JNINativeMethod sMethods[] = (void*)nativePutString }, // ------- @FastNative below here ---------------------- { "nativeAllocRow", "(J)Z", (void*)nativeAllocRow }, { "nativeGetLong", "(JII)J", (void*)nativeGetLong }, { "nativeGetDouble", "(JII)D", (void*)nativeGetDouble }, // ------- @CriticalNative below here ------------------ { "nativeClear", "(J)V", (void*)nativeClear }, { "nativeGetNumRows", "(J)I", (void*)nativeGetNumRows }, { "nativeSetNumColumns", "(JI)Z", (void*)nativeSetNumColumns }, { "nativeAllocRow", "(J)Z", (void*)nativeAllocRow }, { "nativeFreeLastRow", "(J)V", (void*)nativeFreeLastRow }, { "nativeGetType", "(JII)I", (void*)nativeGetType }, { "nativeGetLong", "(JII)J", (void*)nativeGetLong }, { "nativeGetDouble", "(JII)D", (void*)nativeGetDouble }, { "nativeSetNumColumns", "(JI)Z", (void*)nativeSetNumColumns }, { "nativePutLong", "(JJII)Z", (void*)nativePutLong }, { "nativePutDouble", "(JDII)Z", Loading