Guest User

Untitled

a guest
Sep 4th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.74 KB | None | 0 0
  1. commit 9f640af99bebc6e96f6e1e9903557e2c8f567483
  2. Author: Jeff Brown <jeffbrown@android.com>
  3. Date: Tue Jul 19 19:01:05 2011 -0700
  4.  
  5. Add a dual clock profiler tracing mode.
  6.  
  7. Dalvik previously supported using either the thread-cpu clock
  8. or the real time clock as the timebase for profiler traces.
  9. This change adds a dual clock mode where both thread-cpu time
  10. and real time timestamps are collected.
  11.  
  12. Using dual clock mode significantly improves TraceView ability
  13. to accurately reconstruct the global timeline of events,
  14. particularly on SMP systems.
  15.  
  16. For now, thread-cpu mode remains the default.
  17.  
  18. Dual clock mode can be enabled by running the following command
  19. and restarting the system server.
  20. adb shell setprop dalvik.vm.extra-opts -Xprofile:dualclock
  21.  
  22. Change-Id: I14db2ae93325ac01efcc8ed02e8747cc0e834e29
  23.  
  24. commit 949c3ec207a7720fb47f7b3ca1f84dfcfd70aaa9
  25. Author: Jeff Brown <jeffbrown@google.com>
  26. Date: Fri Jun 24 17:05:33 2011 -0700
  27.  
  28. Add a dual clock profiler tracing mode.
  29.  
  30. Dalvik previously supported using either the thread-cpu clock
  31. or the real time clock as the timebase for profiler traces.
  32. This change adds a dual clock mode where both thread-cpu time
  33. and real time timestamps are collected.
  34.  
  35. Using dual clock mode significantly improves TraceView ability
  36. to accurately reconstruct the global timeline of events,
  37. particularly on SMP systems.
  38.  
  39. For now, thread-cpu mode remains the default.
  40.  
  41. Dual clock mode can be enabled by running the following command
  42. and restarting the system server.
  43. adb shell setprop dalvik.vm.extra-opts -Xprofile:dualclock
  44.  
  45. Change-Id: I8c0d91a99aa6829dadea328e54dc1225d9827391
  46.  
  47. commit 62fe4c1e9fc28254d357e9755cf4bd2138753c17
  48. Author: buzbee <buzbee@google.com>
  49. Date: Mon Apr 11 14:07:34 2011 -0700
  50.  
  51. Add missing JUMBO opcodes to volatile rewriting
  52.  
  53. The boolean/byte/char/short variants of iget/iput/sget/sput were not
  54. being correctly converted to _VOLATILE opcodes for SMP builds.
  55.  
  56. Change-Id: Ic81d75f9c927325d54a98465c146b6d43ea204f4
  57.  
  58. commit e3c0b54b3f653eb9000116ec1fa18349e0f1ed9c
  59. Author: buzbee <buzbee@google.com>
  60. Date: Thu Apr 7 15:22:06 2011 -0700
  61.  
  62. [JIT] Fix volatile test
  63.  
  64. On SMP systems, Dalvik opcodes referencing volatile fields will be
  65. rewritten to their _VOLATILE variant. On non-SMP systems, though,
  66. this rewriting is not done. The JIT, however, needs to know about
  67. volatility for all systems in order to avoid performing unsafe
  68. optimizations. This change fixes the JIT's volatility test to be
  69. either _VOLATILE opcode or the volatile flag in the field access bits
  70. depending on SMP type.
  71.  
  72. Change-Id: I2edde58dc25f22cba88f62c5f1a2d125473309e6
  73.  
  74. commit 11fb99d598ebe640719743a0d3bd7ed091e5be03
  75. Author: buzbee <buzbee@google.com>
  76. Date: Thu Apr 7 15:22:06 2011 -0700
  77.  
  78. [JIT] Fix volatile test
  79.  
  80. On SMP systems, Dalvik opcodes referencing volatile fields will be
  81. rewritten to their _VOLATILE variant. On non-SMP systems, though,
  82. this rewriting is not done. The JIT, however, needs to know about
  83. volatility for all systems in order to avoid performing unsafe
  84. optimizations. This change fixes the JIT's volatility test to be
  85. either _VOLATILE opcode or the volatile flag in the field access bits
  86. depending on SMP type.
  87.  
  88. Change-Id: If485875c5abbf0147c3ef4b6d557faa89ed85426
  89.  
  90. commit 9ef5ca666a214f2a96b16e0830e19d37742ab8ca
  91. Author: Andy McFadden <fadden@android.com>
  92. Date: Tue Oct 5 17:02:54 2010 -0700
  93.  
  94. Change handling of edge case.
  95.  
  96. Generally speaking, you can't create an instance of a class before
  97. the class is initialized. When you're talking about java.lang.Class
  98. itself, this doesn't apply. We were trying to sneak in a just-in-time
  99. initialization, but the recent addition of SMP-mandated opcode rewrites
  100. screwed things up a bit.
  101.  
  102. Happily, the creation of the java.lang.Class class object now happens
  103. at a known time, which means we can explicitly initialize the class
  104. at the right time (when it's far enough along to be able to execute
  105. the class initializer, but before anything tries to use a virtual
  106. method or instance field in java.lang.Class).
  107.  
  108. Also, changed a LOGE+abort to a simple assert. The test in question is
  109. performed earlier during linking, so this doesn't merit more than an
  110. assertion.
  111.  
  112. Bug 3045762.
  113.  
  114. Change-Id: Ifffb5083a3de108e1d91b3de7b75fd5e97705912
  115.  
  116. commit 9ff5624e8dbd056d2373b3322da42c268d99e45b
  117. Merge: 790d7a4 6b2897b
  118. Author: Dan Bornstein <danfuzz@android.com>
  119. Date: Thu Sep 30 19:22:39 2010 -0700
  120.  
  121. am 6b2897b6: am 2428d518: am f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.
  122.  
  123. Merge commit '6b2897b60410c540ee5686a2e85eb46386f9f745' into dalvik-dev
  124.  
  125. * commit '6b2897b60410c540ee5686a2e85eb46386f9f745':
  126. Be explicit about both uniprocessor and SMP when calling dexopt.
  127.  
  128. commit 6b2897b60410c540ee5686a2e85eb46386f9f745
  129. Merge: 19e8f00 2428d51
  130. Author: Dan Bornstein <danfuzz@android.com>
  131. Date: Thu Sep 30 18:11:15 2010 -0700
  132.  
  133. am 2428d518: am f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.
  134.  
  135. Merge commit '2428d518efb9b5a62d74f44a267f3a6c18982549'
  136.  
  137. * commit '2428d518efb9b5a62d74f44a267f3a6c18982549':
  138. Be explicit about both uniprocessor and SMP when calling dexopt.
  139.  
  140. commit d8b5f50d0c6c9a0ce157e89df4ee1e8eb8b334c3
  141. Author: Andy McFadden <fadden@android.com>
  142. Date: Thu Sep 30 14:02:54 2010 -0700
  143.  
  144. Correct dexopt for uniprocessors.
  145.  
  146. The SMP flag was defaulting to "true" for dexopt, even on uniprocessors.
  147. With this change the VM now has three choices: dexopt for SMP, dexopt
  148. for uniprocessor, or dexopt for current system. The last is used for
  149. just-in-time dexopt (used by -eng and -userdebug builds on bootstrap DEX
  150. files) and installd dexopt (used for apps on all builds).
  151.  
  152. The dexopt used by the build system during -user builds will either be
  153. explicitly SMP or explicitly uniprocessor, since "current system" has
  154. no meaning when you're cross-dexopting.
  155.  
  156. Also, unified the dexopt control flags into a single enum.
  157.  
  158. (cherry-pick from dalvik-dev)
  159.  
  160. Change-Id: Id1d9c548ca8567585a28ef9ee911cc2ac6b116dd
  161.  
  162. commit 2428d518efb9b5a62d74f44a267f3a6c18982549
  163. Merge: f37569d f45b6cb
  164. Author: Dan Bornstein <danfuzz@android.com>
  165. Date: Thu Sep 30 15:11:27 2010 -0700
  166.  
  167. am f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.
  168.  
  169. Merge commit 'f45b6cbed6ce7cb6a38746b5abe0213263106a71' into gingerbread-plus-aosp
  170.  
  171. * commit 'f45b6cbed6ce7cb6a38746b5abe0213263106a71':
  172. Be explicit about both uniprocessor and SMP when calling dexopt.
  173.  
  174. commit b91b37eb8b8746d1057dd86ed3835de824439e65
  175. Author: Andy McFadden <fadden@android.com>
  176. Date: Thu Sep 30 14:02:54 2010 -0700
  177.  
  178. Correct dexopt for uniprocessors.
  179.  
  180. The SMP flag was defaulting to "true" for dexopt, even on uniprocessors.
  181. With this change the VM now has three choices: dexopt for SMP, dexopt
  182. for uniprocessor, or dexopt for current system. The last is used for
  183. just-in-time dexopt (used by -eng and -userdebug builds on bootstrap DEX
  184. files) and installd dexopt (used for apps on all builds).
  185.  
  186. The dexopt used by the build system during -user builds will either be
  187. explicitly SMP or explicitly uniprocessor, since "current system" has
  188. no meaning when you're cross-dexopting.
  189.  
  190. Also, unified the dexopt control flags into a single enum.
  191.  
  192. Change-Id: I02e22d53ccde2e8603cac8090ca3aae59f792f70
  193.  
  194. commit f45b6cbed6ce7cb6a38746b5abe0213263106a71
  195. Author: Dan Bornstein <danfuzz@android.com>
  196. Date: Thu Sep 30 15:04:34 2010 -0700
  197.  
  198. Be explicit about both uniprocessor and SMP when calling dexopt.
  199.  
  200. Change-Id: Ic1b68dddf6822773041de6023c594a062e141325
  201.  
  202. commit 70f9cc618a16272def098ed021bfd41798a2e3d2
  203. Merge: 434cc5e d53caae
  204. Author: Dan Bornstein <danfuzz@android.com>
  205. Date: Tue Sep 28 23:43:34 2010 -0700
  206.  
  207. am d53caae3: am b3a94965: am 148283d7: Plumb SMP optimization control through to dexopt.
  208.  
  209. Merge commit 'd53caae351e40f877a7bcf592a31594ac2be9691' into dalvik-dev
  210.  
  211. * commit 'd53caae351e40f877a7bcf592a31594ac2be9691':
  212. Plumb SMP optimization control through to dexopt.
  213.  
  214. commit 87f666172f55863d6a50762a1a07a31b67eb48f6
  215. Author: Dan Bornstein <danfuzz@android.com>
  216. Date: Tue Sep 28 18:53:28 2010 -0700
  217.  
  218. Add --uniprocessor option to dex-preopt.
  219.  
  220. This tells the preoptimizer to target a uniprocessor (unsurprisingly).
  221. By default, it targets SMP, which makes it do more changes than it has
  222. to for a uniprocessor (e.g. editing how non-wide volatile fields are
  223. accessed within bytecode). To be clear, when SMP-optimized code is run
  224. on a uniprocessor, it should still work. We're just aiming to only
  225. make truly necessary changes during optimization.
  226.  
  227. While I was in the territory, I went ahead and cleaned up some single
  228. vs. double quote hygiene in the file.
  229.  
  230. Change-Id: Ia45992939a436d0be6db8363c43d430de4acb80b
  231.  
  232. commit d53caae351e40f877a7bcf592a31594ac2be9691
  233. Merge: 481c253 b3a9496
  234. Author: Dan Bornstein <danfuzz@android.com>
  235. Date: Tue Sep 28 18:40:01 2010 -0700
  236.  
  237. am b3a94965: am 148283d7: Plumb SMP optimization control through to dexopt.
  238.  
  239. Merge commit 'b3a949656a773953a44b148a6cdcba19f1c48e87'
  240.  
  241. * commit 'b3a949656a773953a44b148a6cdcba19f1c48e87':
  242. Plumb SMP optimization control through to dexopt.
  243.  
  244. commit b3a949656a773953a44b148a6cdcba19f1c48e87
  245. Merge: 6311482 148283d
  246. Author: Dan Bornstein <danfuzz@android.com>
  247. Date: Tue Sep 28 18:37:39 2010 -0700
  248.  
  249. am 148283d7: Plumb SMP optimization control through to dexopt.
  250.  
  251. Merge commit '148283d71a7e35b9b506cbb49294b6822719c25e' into gingerbread-plus-aosp
  252.  
  253. * commit '148283d71a7e35b9b506cbb49294b6822719c25e':
  254. Plumb SMP optimization control through to dexopt.
  255.  
  256. commit 148283d71a7e35b9b506cbb49294b6822719c25e
  257. Author: Dan Bornstein <danfuzz@android.com>
  258. Date: Tue Sep 28 15:46:54 2010 -0700
  259.  
  260. Plumb SMP optimization control through to dexopt.
  261.  
  262. Change-Id: I3bfaf6723e7b14d001f9de60cc1c1fd4f8e1ed99
  263.  
  264. commit 1df319e3674d993a07bc0ff1f56a5915410b5903
  265. Author: Andy McFadden <fadden@android.com>
  266. Date: Wed Sep 15 13:40:01 2010 -0700
  267.  
  268. Use store barrier instead of full barrier.
  269.  
  270. Make use of ANDROID_MEMBAR_STORE when appropriate. In mterp, define a
  271. new SMP_DMB_ST macro that will (soon) expand into "dmb st" on ARMv7-A
  272. platforms configured for SMP.
  273.  
  274. Bug 3003477.
  275.  
  276. Change-Id: I03c09e93e1374d1c668588c9ad52f5c08d3d2435
  277.  
  278. commit 52b31dfea16f5a7b7bffddf65b493336ef0befee
  279. Author: Andy McFadden <fadden@android.com>
  280. Date: Tue Sep 14 16:23:49 2010 -0700
  281.  
  282. Stop cheating in reflective field access.
  283.  
  284. The java.lang.reflect.Field get/set calls have been "cheating" by
  285. reading and writing 32-bit or 64-bit values without regard to the
  286. underlying field type. This worked fine until recently, when we
  287. developed three special cases:
  288.  
  289. (1) writing to a reference field (must notify the GC)
  290. (2) reading/writing a volatile field (must emit barrier on SMP,
  291. and 64-bit accesses must be atomic on all platforms)
  292. (3) writing to a final field (must emit barrier on SMP)
  293.  
  294. This replaces the old "get a pointer and do stuff" approach with a
  295. bunch of switch statements that call the ObjectInlines functions.
  296.  
  297. Bug 2992610
  298.  
  299. Change-Id: Ib30f043d325363743112e9b1bb170d9d232bca6b
  300.  
  301. commit 3f4b63f47f50f200538e83fa3fac06947afa08b4
  302. Author: Andy McFadden <fadden@android.com>
  303. Date: Mon Sep 13 14:04:02 2010 -0700
  304.  
  305. Emit return-void-barrier when appropriate.
  306.  
  307. If SMP is enabled, and we're optimizing a constructor, and the
  308. class in question has final fields, we replace all occurrences of
  309. "return-void" with "return-void-barrier".
  310.  
  311. This is an "essential" optimization for SMP, meaning it will be done
  312. regardless of the verification/optimization settings.
  313.  
  314. Also, split the updateCode() helper function into two versions (one
  315. to update the whole 16-bit code unit, one to replace just the opcode).
  316.  
  317. Also, make the presence of a duplicate class in the bootstrap class
  318. path a failure for optimization as well as verification. Otherwise,
  319. if you have "-Xdexopt:all", you could end up trying to optimize a
  320. class loaded from a bootstrap DEX file, which doesn't work well
  321. since those classes are mapped read-only in dexopt.
  322.  
  323. Bug 2965743.
  324.  
  325. Change-Id: I29e67133731b59beb6af5003f3cd69302c5c20f5
  326.  
  327. commit 291758c5c4902900c6f86794ba8ab9cad9b26197
  328. Author: Andy McFadden <fadden@android.com>
  329. Date: Fri Sep 10 08:04:52 2010 -0700
  330.  
  331. Add return-void-barrier instruction.
  332.  
  333. This introduces the return-void-barrier instruction, which is identical
  334. to return-void on UP systems, but provides an additional store/store
  335. barrier on SMP. This is intended for use in constructors of objects
  336. with final fields.
  337.  
  338. The assembler doesn't like "dmb st", and we don't have an
  339. ANDROID_MEMBAR_STORE barrier defined, so this currently uses full
  340. fences.
  341.  
  342. This just defines the new instruction. It's not actually used yet.
  343.  
  344. Also, removed some stale "unused" files from the x86 and x86-atom
  345. directories.
  346.  
  347. Bug 2965743.
  348.  
  349. Change-Id: I072e372fd2d57f2617a8d4fff5fd4b38bdda75d1
  350.  
  351. commit f862759a5e82f3ddaeb5f32352b4d58c4b2312db
  352. Merge: a3096e3 fb12fb3
  353. Author: Andy McFadden <fadden@android.com>
  354. Date: Thu Sep 9 16:28:43 2010 -0700
  355.  
  356. am fb12fb32: am fdc9cfa3: am 139bd978: Added "dexopt for SMP" flag.
  357.  
  358. Merge commit 'fb12fb3242e8735e07e1a4583517f2e36a79b200' into dalvik-dev
  359.  
  360. * commit 'fb12fb3242e8735e07e1a4583517f2e36a79b200':
  361. Added "dexopt for SMP" flag.
  362.  
  363. commit fb12fb3242e8735e07e1a4583517f2e36a79b200
  364. Merge: 611f0c0 fdc9cfa
  365. Author: Andy McFadden <fadden@android.com>
  366. Date: Thu Sep 9 16:19:42 2010 -0700
  367.  
  368. am fdc9cfa3: am 139bd978: Added "dexopt for SMP" flag.
  369.  
  370. Merge commit 'fdc9cfa3bcf418d59c47a8d114ec84452b2f1d11'
  371.  
  372. * commit 'fdc9cfa3bcf418d59c47a8d114ec84452b2f1d11':
  373. Added "dexopt for SMP" flag.
  374.  
  375. commit fdc9cfa3bcf418d59c47a8d114ec84452b2f1d11
  376. Merge: 070fcec 139bd97
  377. Author: Andy McFadden <fadden@android.com>
  378. Date: Thu Sep 9 16:16:57 2010 -0700
  379.  
  380. am 139bd978: Added "dexopt for SMP" flag.
  381.  
  382. Merge commit '139bd97804a69634e7c4cecf06910a050a4ac093' into gingerbread-plus-aosp
  383.  
  384. * commit '139bd97804a69634e7c4cecf06910a050a4ac093':
  385. Added "dexopt for SMP" flag.
  386.  
  387. commit 139bd97804a69634e7c4cecf06910a050a4ac093
  388. Author: Andy McFadden <fadden@android.com>
  389. Date: Thu Sep 9 12:54:43 2010 -0700
  390.  
  391. Added "dexopt for SMP" flag.
  392.  
  393. Currently, dexopt always runs on the target device, which means that
  394. decisions about whether or not to convert certain opcodes to SMP-safe
  395. variants could be made based on #ifdefs.
  396.  
  397. Since we are planning to run dexopt on the host, we need to be able
  398. to configure SMP-mode independently. This change adds a global variable
  399. that the dexopt code can check.
  400.  
  401. There is currently no command-line argument to set this, since it will
  402. be set by "dexopt" rather than "dalvikvm", and the exact method of
  403. launching dexopt from the host build is still mildly TBD.
  404.  
  405. Bug 2981136.
  406.  
  407. (cherry-pick from dalvik-dev)
  408.  
  409. Change-Id: I7474f79a25368223ecf1e491458f4a82e85db01f
  410.  
  411. commit c58b9ef90319c4edad93300151c088434092e9e0
  412. Author: Andy McFadden <fadden@android.com>
  413. Date: Thu Sep 9 12:54:43 2010 -0700
  414.  
  415. Added "dexopt for SMP" flag.
  416.  
  417. Currently, dexopt always runs on the target device, which means that
  418. decisions about whether or not to convert certain opcodes to SMP-safe
  419. variants could be made based on #ifdefs.
  420.  
  421. Since we are planning to run dexopt on the host, we need to be able
  422. to configure SMP-mode independently. This change adds a global variable
  423. that the dexopt code can check.
  424.  
  425. There is currently no command-line argument to set this, since it will
  426. be set by "dexopt" rather than "dalvikvm", and the exact method of
  427. launching dexopt from the host build is still mildly TBD.
  428.  
  429. Bug 2981136.
  430.  
  431. Change-Id: If20aa6f513896fd8b35394388eaca6214f0449a7
  432.  
  433. commit 042876deaa858c1087285366db0a4971917a431e
  434. Merge: a18a796 39796a6
  435. Author: Brian Carlstrom <bdc@google.com>
  436. Date: Tue Aug 24 09:03:08 2010 -0700
  437.  
  438. am 39796a6a: am 30febfdf: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-gingerbread
  439.  
  440. Merge commit '39796a6aa79f687ac0b1254f6a8be048ad1243d8'
  441.  
  442. * commit '39796a6aa79f687ac0b1254f6a8be048ad1243d8': (26 commits)
  443. Remove an assertion that cannot be guaranteed.
  444. Always support debugging and profiling.
  445. Fix a critical space leak introduced by concurrent sweeping.
  446. Add a little bit of paranoia to the odex data reader.
  447. Nudge a couple of log messages.
  448. Fix build breakage caused by the countInstancesOfClass change.
  449. Add a method for counting the extant instances of a class.
  450. Added fsync call to dexopt.
  451. JIT: Fix for armv5te-VFP bug [Issue 2916682]
  452. Cast to a byte pointer before performing arithmetic.
  453. Limit scanning to cards within the committed region of the heap.
  454. Remove a malfunctioning predicate used only in assertions.
  455. Remove debugging code and stale comments from the sweep callback.
  456. Fix build breakage caused by a bad merge from master.
  457. JIT: Correct conversion of cb[n]z to cmp/cond_br pair
  458. Print callee information in the JIT profile outout
  459. JIT: Fix for lightweight assembler retry mechanism.
  460. JIT: Fix for 2898397 assert in JIT (chain cell offset)
  461. More SMP fixes.
  462. Fix some potential SMP issues.
  463. ...
  464.  
  465. commit f16cfefc199d1416c5f83446c1d299786accc737
  466. Author: Andy McFadden <fadden@android.com>
  467. Date: Wed Aug 18 15:51:37 2010 -0700
  468.  
  469. Properly handle volatile field accesses from JNI.
  470.  
  471. For uniprocessors, we need to use the 64-bit quasiatomic functions. For
  472. SMP, we need to do that and also issue barriers on all operations.
  473.  
  474. This was mostly a matter of adding a bunch of inline getter/setter
  475. functions and then calling the right one based on whether or not the
  476. field is declared volatile.
  477.  
  478. Also, corrected the output for a failing CHECK_CLASS test in CheckJNI.
  479.  
  480. Bug 2890631.
  481.  
  482. (cherry-pick from dalvik-dev)
  483.  
  484. Change-Id: I3da3b70c906eddd5934347caea83ab041d22cd68
  485.  
  486. commit 9197746491686dd774d556d28a82c5b6e0ff7b09
  487. Author: Andy McFadden <fadden@android.com>
  488. Date: Wed Aug 18 15:51:37 2010 -0700
  489.  
  490. Properly handle volatile field accesses from JNI.
  491.  
  492. For uniprocessors, we need to use the 64-bit quasiatomic functions. For
  493. SMP, we need to do that and also issue barriers on all operations.
  494.  
  495. This was mostly a matter of adding a bunch of inline getter/setter
  496. functions and then calling the right one based on whether or not the
  497. field is declared volatile.
  498.  
  499. Also, corrected the output for a failing CHECK_CLASS test in CheckJNI.
  500.  
  501. Bug 2890631.
  502.  
  503. Change-Id: Ib18ed1ce136eef03120ae70cacc39aa33df1490a
  504.  
  505. commit 77aa7adc7a9ac30351b8ee6f8d8162032f1ef61a
  506. Merge: 89c7943 3469a7e
  507. Author: Andy McFadden <fadden@android.com>
  508. Date: Fri Aug 6 11:26:45 2010 -0700
  509.  
  510. Merge "Fix some potential SMP issues." into dalvik-dev
  511.  
  512. commit fc3d31683a0120ba005f45f98dcbe1001064dafb
  513. Author: Andy McFadden <fadden@android.com>
  514. Date: Thu Aug 5 14:34:26 2010 -0700
  515.  
  516. More SMP fixes.
  517.  
  518. Convert some ANDROID_MEMBAR_FULL uses into equivalent atomic ops. A
  519. couple of "bool" had to convert to "int" since we don't have atomic
  520. ops for bools.
  521.  
  522. Replaced a local implementation of atomic inc with a call to the
  523. atomic inc function.
  524.  
  525. Change-Id: I948b8080d743552bde014d3a6e716ed2c30ebef8
  526.  
  527. commit 3469a7e404591fe158a60b4d05b0f2c768bcfce2
  528. Author: Andy McFadden <fadden@android.com>
  529. Date: Wed Aug 4 16:09:10 2010 -0700
  530.  
  531. Fix some potential SMP issues.
  532.  
  533. Wandered through Thread.c looking for SMP trouble spots. Changed a
  534. couple of stores to android_atomic_release_store, and added some
  535. comments.
  536.  
  537. Also, wrapped the self-suspend stuff that's in the thread status change
  538. code so it only happens if we're actually going to suspend the thread.
  539.  
  540. Change-Id: I2d3feae7ce8937eada9111bd31928b61875a86d3
  541.  
  542. commit 917cbaab38a29fb3e92682235c640c27fa4a41e8
  543. Merge: b67b034 35ff69b
  544. Author: buzbee <buzbee@google.com>
  545. Date: Thu Jul 29 14:34:33 2010 -0700
  546.  
  547. am 35ff69be: JIT: temporarily disable the JIT and concurrent GC on SMP systems
  548.  
  549. Merge commit '35ff69be47f3f2bd33f2a2d8562eaa2ac3dc9f1d' into dalvik-dev
  550.  
  551. * commit '35ff69be47f3f2bd33f2a2d8562eaa2ac3dc9f1d':
  552. JIT: temporarily disable the JIT and concurrent GC on SMP systems
  553.  
  554. commit 35ff69be47f3f2bd33f2a2d8562eaa2ac3dc9f1d
  555. Author: buzbee <buzbee@google.com>
  556. Date: Thu Jul 29 13:17:35 2010 -0700
  557.  
  558. JIT: temporarily disable the JIT and concurrent GC on SMP systems
  559.  
  560. Change-Id: If2d489b2aca39cd0297453f311a5c3ce80f577d9
  561.  
  562. commit ecf8f6ede2c00350a36297dd7427afff9d9cb154
  563. Author: buzbee <buzbee@google.com>
  564. Date: Tue Jul 20 14:53:42 2010 -0700
  565.  
  566. JIT: Support for Dalvik volatiles (issue 2781881)
  567.  
  568. Also, on SMP systems generate memory barriers.
  569.  
  570. Change-Id: If64f7c98a8de426930b8f36ac77913e53b7b2d7a
  571.  
  572. commit 1e83b4d026199073c057edcb7836d06ae0716390
  573. Author: Andy McFadden <fadden@android.com>
  574. Date: Thu Jul 15 17:20:24 2010 -0700
  575.  
  576. Implement JNI UnregisterNatives.
  577.  
  578. This function is of limited use, but one of our partners found a need
  579. for it, so it's finally getting implemented. It clears all JNI native
  580. method bindings in a given class.
  581.  
  582. It turns out there are some interesting potential races which can be
  583. avoided by treading lightly. The utility function that updates the
  584. Method struct has been modified appropriately.
  585.  
  586. (There's a race on ARM SMP in the original implementation, in which
  587. we could still observe "insns" as NULL after nativeFunc is pointing at
  588. the JNI bridge. Handled in this change with an explicit full barrier,
  589. which is overkill. We can make it better as part of the general
  590. barrier-removal pass in bug 2781972 -- really wants an acquiring load
  591. on nativeFunc, though that's a waste for internal native calls.)
  592.  
  593. Also, stifled an unnecessary warning about redefining a native method
  594. implementation (which is explicitly allowed). Limited the scope of
  595. an inappropriate "const" declaration.
  596.  
  597. Bug 2697885.
  598.  
  599. Change-Id: Ie406e25de3f77d00fe3e9130b406abcb45c3d60e
  600.  
  601. commit 3be6164a73167d992ffd075162b458576a792375
  602. Merge: 903405d 139516e
  603. Author: Andy McFadden <fadden@android.com>
  604. Date: Wed Jul 7 14:41:04 2010 -0700
  605.  
  606. Merge "Only emit cat1 volatile ops in SMP builds." into dalvik-dev
  607.  
  608. commit 139516ee8f527aca18ae658087f28d825bfdf1c9
  609. Author: Andy McFadden <fadden@android.com>
  610. Date: Wed Jul 7 14:09:09 2010 -0700
  611.  
  612. Only emit cat1 volatile ops in SMP builds.
  613.  
  614. After consultation with the JITSquad, we no longer emit volatile
  615. field access instructions for category 1 values unless ANDROID_SMP
  616. is nonzero.
  617.  
  618. See also bug 2781881.
  619.  
  620. Change-Id: I58041572f6cf9308a8a125200dc419ce9d3d8d12
  621.  
  622. commit fb119e6cf8b47d53f024cae889487a17eacbf19f
  623. Author: Andy McFadden <fadden@android.com>
  624. Date: Mon Jun 28 16:21:20 2010 -0700
  625.  
  626. Emit volatile field access instructions.
  627.  
  628. Easier said than done. The trick is that we need to ensure that the
  629. instruction replacement happens even if the verifier and optimizer
  630. are not enabled in dexopt.
  631.  
  632. We're currently doing the -wide-volatile replacement during
  633. verification, but that's not so great, since we collapse things like
  634. iget-byte and iget-char into a single iget-volatile, losing the field
  635. width. We could recover it from the field declaration, but doing it
  636. during verification is really just sort of wrong to begin with.
  637.  
  638. The substitution isn't technically an "optimization", but it's easiest
  639. to do it during the opt pass, and we already have a convenient "is
  640. optimized" flag that helps ensure that we do the replacement pass
  641. exactly once.
  642.  
  643. Optimizing at run time means making a private copy of shared pages,
  644. because the pages are mapped shared/read-only out of the DEX file.
  645. We could use up a lot of physical memory if we applied all possible
  646. optimizations, so we need a notion of "essential" and "non-essential"
  647. optimizations. If we're not running in dexopt, we only do the
  648. essential ones, which should leave most methods untouched.
  649.  
  650. Replacement of 32-bit instructions is only strictly necessary when
  651. we're building for SMP. On a uniprocessor, the 32-bit operations
  652. are inherently atomic, and memory barriers aren't required. However,
  653. the JIT may benefit from having volatile accesses identified by opcode.
  654. Since the current branch doesn't support any SMP products, I'm enabling
  655. the instruction generation for all platforms so that we can give it
  656. some exercise.
  657.  
  658. While making this change I noticed that the exclusion mechanism for
  659. breakpoints and optimization/verification was only serving to avoid
  660. a data race (e.g. breakpoint being overwritten by an instruction
  661. rewrite). It wasn't guaranteed to prevent races when two threads
  662. toggled pages between read-write and read-only while making an update,
  663. since a 4K page can hold code for more than one class. This has been
  664. corrected by adding a mutex.
  665.  
  666. This change:
  667. - Introduces the notion of essential vs. non-essential optimizations.
  668. - Adds generation of 32-bit *-volatile instructions for all platforms.
  669. - Moves generation of *-wide-volatile from the verifier to the optimizer.
  670. - Allows the optimizer to modify code at run time.
  671. - Tweaks optimizeMethod() for "best effort" rather than "fail early".
  672. - Adds a DEX-granularity mutex to the bytecode update functions.
  673.  
  674. This also begins the removal of PROFILE_FIELD_ACCESS, which hasn't been
  675. used for much and is mostly just in the way.
  676.  
  677. Change-Id: I4ac9fa5e1ac5f9a1d106c662c3deee90d62895aa
  678.  
  679. commit 1640b00d461a974eed2c87be793c6bd2ace97899
  680. Merge: 357a687 0890e5b
  681. Author: Andy McFadden <fadden@android.com>
  682. Date: Mon Jun 21 11:14:49 2010 -0700
  683.  
  684. Merge "Fiddle with SMP_DMB." into dalvik-dev
  685.  
  686. commit 0890e5bf0b2a502ca1030e9773fabc16ef1b5981
  687. Author: Andy McFadden <fadden@android.com>
  688. Date: Fri Jun 18 14:04:12 2010 -0700
  689.  
  690. Fiddle with SMP_DMB.
  691.  
  692. This changes it from a macro that takes an argument to a simpler
  693. macro that is named explicitly by the 8 instructions that want it.
  694.  
  695. Change-Id: Ie17a9722823d590851776b6b9b057eadf22fa6a8
  696.  
  697. commit c35a2ef53d0cccd6f924eeba36633220ec67c32e
  698. Author: Andy McFadden <fadden@android.com>
  699. Date: Thu Jun 17 12:36:00 2010 -0700
  700.  
  701. Add opcodes for volatile field accesses
  702.  
  703. This adds instructions for {i,s}{get,put}{,-object}-volatile, for a
  704. total of eight new instructions.
  705.  
  706. On SMP systems, these instructions will be substituted in for existing
  707. field access instructions, either by dexopt or during just-in-time
  708. verification. Unlike the wide-volatile instructions, these will not be
  709. used at all when the VM is not built for SMP.
  710.  
  711. (Ideally we'd omit the volatile instruction implementations entirely on
  712. non-SMP builds, but that requires a little work in gen-mterp.py.)
  713.  
  714. The change defines and implements the opcodes and support methods, but
  715. does not cause them to be used.
  716.  
  717. Also, changed dvmQuasiAtomicRead64's argument to be const.
  718.  
  719. Change-Id: I9e44fe881e87f27aa41f6c6e898ec4402cb5493e
  720.  
  721. commit 54c91f8f33fc12d741aaa0dcdb375991e252c994
  722. Merge: 1f7f41f deeeeb2
  723. Author: Andy McFadden <fadden@android.com>
  724. Date: Fri Jun 18 09:54:31 2010 -0700
  725.  
  726. Merge "Dalvik SMP update" into dalvik-dev
  727.  
  728. commit deeeeb264fc6f4ab7f5cb6e01b9dd76f487ff914
  729. Author: Andy McFadden <fadden@android.com>
  730. Date: Wed Jun 16 08:32:04 2010 -0700
  731.  
  732. Dalvik SMP update
  733.  
  734. Fix some SMP correctness issues in the VM:
  735.  
  736. - Correct AtomicCache implementation, inserting barriers where needed
  737. and correcting existing usage.
  738. - Emphasize that String startup isn't expected to be reentrant, and
  739. use atomic ops to ensure that we explode if anybody tries it.
  740. - Use 64-bit quasiatomic ops to manage the "last activity" timer in
  741. JDWP. (Also, provide some documented but unimplemented behavior.)
  742. - Updated the volatile operations in sun.misc.Unsafe to include
  743. appropriate barriers.
  744.  
  745. (This does not purport to correct all SMP issues, just some of the
  746. more obvious ones.)
  747.  
  748. Change-Id: I06957ebcf2724fe7a228b30d00194b9b4808fae0
  749.  
  750. commit 797502e587808b30b9e0b170cfbca8d4cba10699
  751. Merge: fbdcfb9 ead3d06
  752. Author: Andy McFadden <fadden@android.com>
  753. Date: Sun May 30 21:20:47 2010 -0700
  754.  
  755. am ead3d06b: am 67e82fb1: Merge "Atomic/SMP update, part 2." into kraken
  756.  
  757. commit fb07cb6f8b31e8c56029c056f06b29705c0ca599
  758. Author: Andy McFadden <fadden@android.com>
  759. Date: Thu May 27 10:23:41 2010 -0700
  760.  
  761. Atomic/SMP update, part 2. (manual to dalvik-dev)
  762.  
  763. Updated "generic" quasiatomic implementation to use atomic release store
  764. instead of atomic swap when releasing the lock.
  765.  
  766. Track change to name of memory barrier.
  767.  
  768. Change-Id: I229fc2aec8996db07b84f2d1bcfbe4346a810d85
  769.  
  770. commit ead3d06bca526d1a709786f73ad658a95f5927a2
  771. Merge: b129337 67e82fb
  772. Author: Andy McFadden <fadden@android.com>
  773. Date: Fri May 28 13:02:16 2010 -0700
  774.  
  775. am 67e82fb1: Merge "Atomic/SMP update, part 2." into kraken
  776.  
  777. commit 67e82fb113d18e77c0ee2f7c06e832f3b73649b1
  778. Merge: a02fe78 4dd7263
  779. Author: Andy McFadden <fadden@android.com>
  780. Date: Fri May 28 13:00:21 2010 -0700
  781.  
  782. Merge "Atomic/SMP update, part 2." into kraken
  783.  
  784. commit 4dd72631b5fcdcc4b21d096d27021801e2f8df1c
  785. Author: Andy McFadden <fadden@android.com>
  786. Date: Thu May 27 10:23:41 2010 -0700
  787.  
  788. Atomic/SMP update, part 2.
  789.  
  790. Updated "generic" quasiatomic implementation to use atomic release store
  791. instead of atomic swap when releasing the lock.
  792.  
  793. Track change to name of memory barrier.
  794.  
  795. Change-Id: Ie6ec37bca6984553f665bd25385210ea6c8e0943
  796.  
  797. commit fc0dcfa2ea4325b1e2a5fc938b57f1b2a50d5f67
  798. Merge: 2725c3a f00de1b
  799. Author: Andy McFadden <fadden@android.com>
  800. Date: Fri May 21 12:08:06 2010 -0700
  801.  
  802. am f00de1ba: am 6a877083: Atomic/SMP update.
  803.  
  804. commit f00de1ba77f74ffae921ff2fa0d881d455d95b4c
  805. Merge: 7b30673 6a87708
  806. Author: Andy McFadden <fadden@android.com>
  807. Date: Fri May 21 12:06:30 2010 -0700
  808.  
  809. am 6a877083: Atomic/SMP update.
  810.  
  811. commit 6a877083893fb466ebb6ee6bcbdc5f1ca8609cb1
  812. Author: Andy McFadden <fadden@android.com>
  813. Date: Wed May 19 22:36:33 2010 -0700
  814.  
  815. Atomic/SMP update.
  816.  
  817. Moved quasiatomic 64-bit operations in here. They still need work.
  818.  
  819. Use the new libcutils atomic-inline header for our memory barriers.
  820. Adjust makefiles to set SMP definition appropriately.
  821.  
  822. Change-Id: Id2ab2123724bb0baeb32f862b5568392aba35a59
Add Comment
Please, Sign In to add comment