perfetto: expose PerfettoSDK Java libs to ART modules - #7230
Conversation
ebfcc7e to
21d2d15
Compare
🎨 Perfetto UI Builds
|
21d2d15 to
1079a17
Compare
Expose Perfetto Java SDK and JNI libraries for Libcore / ART integration: - Add jarjar rules for dalvik.system.dev.perfetto.sdk with libcore-scoped visibility in Android.bp.extras. - Define libperfetto_jni_static and libperfetto_jni_static_src in src/android_sdk/jni/BUILD.gn. - Conditionally expose JNI_OnLoad_Perfetto when PERFETTO_JNI_ART_STATIC_INTEGRATION is defined. - Update tools/gen_android_bp to generate libperfetto_jni_static and perfetto_trace_lib_libcore_java, and configure min_sdk_version: "apex_inherit".
1079a17 to
5de935a
Compare
|
The PR looks good to me! I chatted with @primiano, though, and we’d like to discuss the wider use of the SDK especially for frequent logging in libcore before moving forward. We’re not sure this is the right time for it, so it would be good to align with you and @zezeozue first. Can we setup a meeting next week, pls |
| @@ -0,0 +1,5 @@ | |||
| rule dev.perfetto.sdk.** dalvik.system.dev.perfetto.sdk.@1 | |||
There was a problem hiding this comment.
I think you need to add anothe branch in https://crsrc.org/c/third_party/perfetto/src/android_sdk/java/main/dev/perfetto/sdk/PerfettoNativeLibrary.java;l=37 for libcore otherwise we'll try to load a absent lib
System.loadLibrary(isFramework ? "perfetto_framework_jni" : "perfetto_jni");
| [ "-DPERFETTO_JNI_JARJAR_PREFIX=com/android/internal/" ] | ||
| } | ||
|
|
||
| source_set("libperfetto_jni_static_src") { |
There was a problem hiding this comment.
nit: can we call this libperfetto_libcore_jni_src and also change libperfetto_jni_static to libperfetto_libcore_jni would better aling with others
Expose Perfetto Java SDK and JNI libraries for Libcore / ART integration: