Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Issue 147533004: Remove unneeded JNI registrations. (Closed)

Created:
6 years, 10 months ago by ostap
Modified:
6 years, 4 months ago
CC:
chromium-reviews, davidben+watch_chromium.org, cbentzel+watch_chromium.org, tburkard+watch_chromium.org, tfarina, jam, joi+watch-content_chromium.org, gavinp+prer_chromium.org, dominich+watch_chromium.org, darin-cc_chromium.org, erikwright+watch_chromium.org, viettrungluu
Base URL:
https://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Remove unneeded JNI registrations. Rather than registering all jni bindings at startup, only get references to the class object for those files which require bindings. All others are satisfied by exporting symbols which can be found automatically by dalvik. This patch replaces excldue-libs=ALL with ld version script to strip unwanted symbols: https://sourceware.org/binutils/docs-2.24/ld/VERSION.html#VERSION BUG=

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Rebased. Linker "version script" used for exports. #

Patch Set 4 : Fix android webview build issues. #

Total comments: 2

Patch Set 5 : Rebaes, added native_exports switch, don't remove empty RegisterNatives. #

Total comments: 24

Patch Set 6 : Rebased and updated by review comments. #

Patch Set 7 : Fix mojo exports. #

Patch Set 8 : Fix windows build. #

Patch Set 9 : Don't use linker script for mojo_native_viewport_service library. #

Total comments: 12

Patch Set 10 : Updated by review comments. #

Total comments: 7

Patch Set 11 : Rebased and updated by review comments. #

Patch Set 12 : Moved dependency for android_exports.lst copy and removed unneeded inner class mapping from GetJNIRā€¦ #

Patch Set 13 : Rebased and fixed by Torne comments. #

Patch Set 14 : Fix mojo build issues #

Patch Set 15 : Rebased. #

Patch Set 16 : Remove whitespace change. #

Patch Set 17 : Rebase #

Patch Set 18 : Rebase. #

Total comments: 1

Patch Set 19 : Fixed dependencies for linker script copy. #

Patch Set 20 : Use link_settings in JNI generator .gypis to provide linker exports list. #

Total comments: 2

Patch Set 21 : Fix exports in non-JNI shared libs. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+409 lines, -16 lines) Patch
M base/android/jni_generator/jni_generator.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 9 chunks +72 lines, -10 lines 0 comments Download
M base/android/jni_generator/jni_generator_tests.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +40 lines, -1 line 0 comments Download
A base/android/jni_generator/testNativeExportsOption.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +216 lines, -0 lines 0 comments Download
A build/android/android_exports.lst View 1 2 3 4 5 1 chunk +14 lines, -0 lines 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +6 lines, -5 lines 0 comments Download
M build/jar_file_jni_generator.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +17 lines, -0 lines 0 comments Download
M build/jni_generator.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +18 lines, -0 lines 0 comments Download
A build/linker_script_copy.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 74 (0 generated)
ostap
Finalizing patch https://codereview.chromium.org/18161004/ by Yaron's suggestion.
6 years, 10 months ago (2014-01-31 00:30:08 UTC) #1
Yaron
+bulach, -others for now (as they appear to be for OWNERS stamps) I'd also link ...
6 years, 8 months ago (2014-04-02 21:02:52 UTC) #2
ostap
On 2014/04/02 21:02:52, Yaron wrote: > +bulach, -others for now (as they appear to be ...
6 years, 8 months ago (2014-04-03 03:56:23 UTC) #3
bulach
On 2014/04/03 03:56:23, ostap wrote: > On 2014/04/02 21:02:52, Yaron wrote: > > +bulach, -others ...
6 years, 8 months ago (2014-04-07 15:37:26 UTC) #4
ostap
On 2014/04/07 15:37:26, bulach_ooo_14apr wrote: > > At 1st I thought that there could be ...
6 years, 8 months ago (2014-04-07 16:04:07 UTC) #5
bulach
On 2014/04/07 16:04:07, ostap wrote: > On 2014/04/07 15:37:26, bulach_ooo_14apr wrote: > > > At ...
6 years, 8 months ago (2014-04-08 15:33:03 UTC) #6
ostap
On 2014/04/08 15:33:03, bulach_ooo_14apr wrote: > On 2014/04/07 16:04:07, ostap wrote: > > On 2014/04/07 ...
6 years, 8 months ago (2014-04-08 15:53:01 UTC) #7
bulach
good stuff, thanks! I think we're on the right path, adding torne@ for validating the ...
6 years, 8 months ago (2014-04-14 13:16:01 UTC) #8
ostap
https://codereview.chromium.org/147533004/diff/150001/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/147533004/diff/150001/base/android/jni_generator/jni_generator.py#newcode734 base/android/jni_generator/jni_generator.py:734: return '\nextern "C" {\n' + "\n".join(ret) + "\n};" On ...
6 years, 8 months ago (2014-04-15 23:30:19 UTC) #9
bulach
thanks! just a few more nits.. it looks like one function stub wasn't generated, wdyt? ...
6 years, 8 months ago (2014-04-16 11:22:34 UTC) #10
ostap
https://codereview.chromium.org/147533004/diff/230001/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/147533004/diff/230001/base/android/jni_generator/jni_generator.py#newcode739 base/android/jni_generator/jni_generator.py:739: if self.options.native_exports and ret != []: On 2014/04/16 11:22:35, ...
6 years, 8 months ago (2014-04-16 20:36:04 UTC) #11
bulach
lgtm, thanks a ton, truly appreciate! Yaron will be back next week, would you mind ...
6 years, 8 months ago (2014-04-17 12:17:46 UTC) #12
ostap
On 2014/04/17 12:17:46, bulach wrote: > lgtm, thanks a ton, truly appreciate! > > Yaron ...
6 years, 8 months ago (2014-04-17 13:57:58 UTC) #13
bulach
torne may be able to help.. looks like it's trying to find the .lst at: ...
6 years, 8 months ago (2014-04-17 14:09:08 UTC) #14
ostap
On 2014/04/17 14:09:08, bulach wrote: > torne may be able to help.. > looks like ...
6 years, 8 months ago (2014-04-17 17:01:51 UTC) #15
ostap
Added viettrungluu for mojo gyp changes.
6 years, 8 months ago (2014-04-18 03:28:20 UTC) #16
viettrungluu
-> davemoore, instead of me, since he's been looking at android linking stuff (-Wl,--exclude-libs=ALL is ...
6 years, 8 months ago (2014-04-21 19:31:56 UTC) #17
DaveMoore
https://codereview.chromium.org/147533004/diff/170002/mojo/mojo_public.gypi File mojo/mojo_public.gypi (right): https://codereview.chromium.org/147533004/diff/170002/mojo/mojo_public.gypi#newcode24 mojo/mojo_public.gypi:24: ], The only special case related to exports that ...
6 years, 8 months ago (2014-04-21 23:34:50 UTC) #18
Yaron
https://codereview.chromium.org/147533004/diff/170002/mojo/mojo_public.gypi File mojo/mojo_public.gypi (right): https://codereview.chromium.org/147533004/diff/170002/mojo/mojo_public.gypi#newcode24 mojo/mojo_public.gypi:24: ], On 2014/04/21 23:34:51, DaveMoore wrote: > The only ...
6 years, 8 months ago (2014-04-22 01:49:03 UTC) #19
Yaron
https://codereview.chromium.org/147533004/diff/170002/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/147533004/diff/170002/base/android/jni_generator/jni_generator.py#newcode975 base/android/jni_generator/jni_generator.py:975: java_name += '_00024' + native.java_class_name Why is this logic ...
6 years, 8 months ago (2014-04-22 02:43:07 UTC) #20
Torne
On 2014/04/17 17:01:51, ostap wrote: > On 2014/04/17 14:09:08, bulach wrote: > > torne may ...
6 years, 8 months ago (2014-04-22 10:52:58 UTC) #21
Torne
https://codereview.chromium.org/147533004/diff/170002/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/147533004/diff/170002/build/common.gypi#newcode1633 build/common.gypi:1633: 'android_linker_script%': '<!(cd <(DEPTH) && pwd -P)/build/android/android_exports.lst', You mustn't use ...
6 years, 8 months ago (2014-04-22 10:53:20 UTC) #22
ostap
https://codereview.chromium.org/147533004/diff/170002/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/147533004/diff/170002/base/android/jni_generator/jni_generator.py#newcode975 base/android/jni_generator/jni_generator.py:975: java_name += '_00024' + native.java_class_name SoOn 2014/04/22 02:43:08, Yaron ...
6 years, 8 months ago (2014-04-24 03:58:42 UTC) #23
ostap
https://codereview.chromium.org/147533004/diff/170002/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/147533004/diff/170002/base/android/jni_generator/jni_generator.py#newcode975 base/android/jni_generator/jni_generator.py:975: java_name += '_00024' + native.java_class_name On 2014/04/22 02:43:08, Yaron ...
6 years, 8 months ago (2014-04-24 14:09:59 UTC) #24
ostap
On 2014/04/22 10:52:58, Torne wrote: > On 2014/04/17 17:01:51, ostap wrote: > > On 2014/04/17 ...
6 years, 8 months ago (2014-04-24 15:47:52 UTC) #25
Torne
On 2014/04/24 15:47:52, ostap wrote: > On 2014/04/22 10:52:58, Torne wrote: > > I don't ...
6 years, 8 months ago (2014-04-25 13:22:45 UTC) #26
Torne
On 2014/04/25 13:22:45, Torne wrote: > On 2014/04/24 15:47:52, ostap wrote: > > On 2014/04/22 ...
6 years, 8 months ago (2014-04-25 14:07:50 UTC) #27
ostap
On 2014/04/25 14:07:50, Torne wrote: > On 2014/04/25 13:22:45, Torne wrote: > > On 2014/04/24 ...
6 years, 7 months ago (2014-04-28 07:01:15 UTC) #28
Torne
On 2014/04/28 07:01:15, ostap wrote: > Thanks a lot! You're welcome; sorry our build is ...
6 years, 7 months ago (2014-04-28 09:12:24 UTC) #29
Yaron
lgtm thanks
6 years, 7 months ago (2014-04-28 16:02:44 UTC) #30
ostap
On 2014/04/28 16:02:44, Yaron wrote: > lgtm thanks Adding Mark to reviewers for changes in ...
6 years, 7 months ago (2014-04-28 17:27:25 UTC) #31
ostap
On 2014/04/28 17:27:25, ostap wrote: > On 2014/04/28 16:02:44, Yaron wrote: > > lgtm thanks ...
6 years, 7 months ago (2014-05-12 20:09:41 UTC) #32
Mark Mentovai
Seems fine to me as long as Marcus and Yaron are happy. LGTM.
6 years, 7 months ago (2014-05-12 20:22:56 UTC) #33
Yaron
DaveMoore/viettrungluu: can one of you please stamp for mojo/OWNERS?
6 years, 7 months ago (2014-05-21 02:15:17 UTC) #34
viettrungluu
Sorry for not seeing the ping earlier. I have no idea if this is entirely ...
6 years, 7 months ago (2014-05-27 16:34:16 UTC) #35
ostap
The CQ bit was checked by sl.ostapenko@samsung.com
6 years, 7 months ago (2014-05-27 18:27:21 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/147533004/290001
6 years, 7 months ago (2014-05-27 18:29:35 UTC) #37
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium ...
6 years, 7 months ago (2014-05-27 19:20:21 UTC) #38
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-27 19:24:36 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/69933) linux_chromium_gn_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_gn_rel/builds/10610)
6 years, 7 months ago (2014-05-27 19:24:37 UTC) #40
ostap
dimich@chromium.org: Please review changes in components/gcm_driver/gcm_driver_android.cc
6 years, 6 months ago (2014-05-30 17:55:37 UTC) #41
ostap
jochen@chromium.org: Please review changes in components/gcm_driver/gcm_driver_android.cc Thanks
6 years, 6 months ago (2014-06-02 20:51:29 UTC) #42
jochen (gone - plz use gerrit)
lgtm in general, it's preferable to pick an OWNER as close as possible to the ...
6 years, 6 months ago (2014-06-03 13:00:32 UTC) #43
ostap
The CQ bit was checked by sl.ostapenko@samsung.com
6 years, 6 months ago (2014-06-03 19:19:39 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/147533004/330001
6 years, 6 months ago (2014-06-03 19:20:35 UTC) #45
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium ...
6 years, 6 months ago (2014-06-03 19:57:11 UTC) #46
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-03 21:46:07 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/71379)
6 years, 6 months ago (2014-06-03 21:46:07 UTC) #48
ostap
The CQ bit was checked by sl.ostapenko@samsung.com
6 years, 6 months ago (2014-06-06 02:18:10 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/147533004/350001
6 years, 6 months ago (2014-06-06 02:21:09 UTC) #50
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-06 05:07:59 UTC) #51
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-06 05:12:17 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_chromium_gn_compile_rel/builds/11404) android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/192667) chromium_presubmit ...
6 years, 6 months ago (2014-06-06 05:12:18 UTC) #53
ostap
The CQ bit was checked by sl.ostapenko@samsung.com
6 years, 6 months ago (2014-06-06 23:48:47 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sl.ostapenko@samsung.com/147533004/370001
6 years, 6 months ago (2014-06-06 23:51:16 UTC) #55
commit-bot: I haz the power
Change committed as 275652
6 years, 6 months ago (2014-06-07 08:44:59 UTC) #56
Torne
https://codereview.chromium.org/147533004/diff/370001/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/147533004/diff/370001/build/common.gypi#newcode1736 build/common.gypi:1736: 'android_linker_script%': '<!(cd <(DEPTH) && pwd -P)/build/android/android_exports.lst', Unfortunately this has ...
6 years, 6 months ago (2014-06-08 14:18:36 UTC) #57
Torne
On 2014/06/08 14:18:36, Torne wrote: > https://codereview.chromium.org/147533004/diff/370001/build/common.gypi > File build/common.gypi (right): > > https://codereview.chromium.org/147533004/diff/370001/build/common.gypi#newcode1736 > ...
6 years, 6 months ago (2014-06-08 14:21:05 UTC) #58
ostap
On 2014/06/08 14:21:05, Torne wrote: > On 2014/06/08 14:18:36, Torne wrote: > > https://codereview.chromium.org/147533004/diff/370001/build/common.gypi > ...
6 years, 6 months ago (2014-06-08 18:28:05 UTC) #59
Torne
On 2014/06/08 18:28:05, ostap wrote: > On 2014/06/08 14:21:05, Torne wrote: > > On 2014/06/08 ...
6 years, 6 months ago (2014-06-09 09:53:06 UTC) #60
ostap
On 2014/06/09 09:53:06, Torne wrote: > On 2014/06/08 18:28:05, ostap wrote: > > On 2014/06/08 ...
6 years, 6 months ago (2014-06-09 14:46:40 UTC) #61
Torne
On 2014/06/09 14:46:40, ostap wrote: > On 2014/06/09 09:53:06, Torne wrote: > > On 2014/06/08 ...
6 years, 6 months ago (2014-06-09 15:03:30 UTC) #62
ostap
On 2014/06/09 15:03:30, Torne wrote: > On 2014/06/09 14:46:40, ostap wrote: > > > Why ...
6 years, 6 months ago (2014-06-09 21:02:41 UTC) #63
Torne
On 2014/06/09 21:02:41, ostap wrote: > On 2014/06/09 15:03:30, Torne wrote: > > On 2014/06/09 ...
6 years, 6 months ago (2014-06-10 09:23:57 UTC) #64
ostap
On 2014/06/10 09:23:57, Torne wrote: > On 2014/06/09 21:02:41, ostap wrote: > > I've tried ...
6 years, 6 months ago (2014-06-10 16:59:39 UTC) #65
Torne
All gyp settings normally only apply to the current target. If the current target is ...
6 years, 6 months ago (2014-06-11 10:29:47 UTC) #66
ostap
On 2014/06/11 10:29:47, Torne wrote: > https://codereview.chromium.org/147533004/diff/410001/build/common.gypi > File build/common.gypi (left): > > https://codereview.chromium.org/147533004/diff/410001/build/common.gypi#oldcode4220 > ...
6 years, 6 months ago (2014-06-11 16:01:23 UTC) #67
Torne
On 2014/06/11 16:01:23, ostap wrote: > On 2014/06/11 10:29:47, Torne wrote: > > https://codereview.chromium.org/147533004/diff/410001/build/common.gypi > ...
6 years, 6 months ago (2014-06-11 16:03:07 UTC) #68
bulach
On 2014/06/11 16:01:23, ostap wrote: > On 2014/06/11 10:29:47, Torne wrote: > > https://codereview.chromium.org/147533004/diff/410001/build/common.gypi > ...
6 years, 6 months ago (2014-06-11 16:03:46 UTC) #69
ostap
On 2014/06/11 16:03:07, Torne wrote: I uploaded patch that fixes non-JNI shared libs. It also ...
6 years, 6 months ago (2014-06-11 17:59:17 UTC) #70
ostap
On 2014/06/11 16:03:46, bulach wrote: > just FYI, I'll try to land https://codereview.chromium.org/329223002/, i.e., > ...
6 years, 6 months ago (2014-06-11 18:03:31 UTC) #71
Torne
Thanks a lot for iterating on this. The new arrangement of settings in gyp LGTM. ...
6 years, 6 months ago (2014-06-12 09:34:14 UTC) #72
Torne
+mkosiba who has some thoughts on how to improve this.
6 years, 4 months ago (2014-08-07 17:56:37 UTC) #73
mkosiba (inactive)
6 years, 4 months ago (2014-08-12 10:00:25 UTC) #74
Message was sent while issue was closed.
On 2014/08/07 17:56:37, Torne wrote:
> +mkosiba who has some thoughts on how to improve this.

Closing, the code landed as https://codereview.chromium.org/454923002

Powered by Google App Engine
This is Rietveld 408576698