digitalmars.D - really good talk about the Hotspot VM
- Benjamin Thaut (20/20) Jul 16 2015 This talk is really good and contains a lot of usefull
- Justin Whear (2/3) Jul 16 2015 How is this possible? Time travel?
- Benjamin Thaut (4/8) Jul 16 2015 I confused that one. He actually states that he has 35 years of
- extrawurst (2/6) Jul 16 2015 was wondering the same :D
- "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= (13/21) Jul 17 2015 It wasn't the case, but it could have been possible as the
- extrawurst (3/21) Jul 17 2015 Interesting insights! Thank you!
- rsw0x (3/7) Jul 16 2015 Treating D's GC the same as a managed language running in a VM's
- Benjamin Thaut (8/16) Jul 16 2015 Why? The only real difference is that a java vm generates the
- Paulo Pinto (12/31) Jul 16 2015 Not even that, as there are AOT compilers for Java, so VM ==
- rsw0x (8/26) Jul 16 2015 If you have a way to implement self-healing code in D please
- rsw0x (5/25) Jul 16 2015 And yes, I'm well aware that someone will get pedantic and preach
- Kagamin (6/15) Jul 19 2015 Like what? Implementation may be difficult, but payback - fast
- ketmar (2/3) Jul 19 2015 ...slow and ugly code...=
- ketmar (2/13) Jul 16 2015 two words: "memory barriers".=
- deadalnix (6/24) Jul 17 2015 Because in Java, everything is in the VM and you can play all
This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=vzzABBxo44g The speaker has 30 years of experience working on javas hotspot vm and shares his opinions on what you should do. My takeaways from this talk are: GC: -You want a fully percise GC (e.g. know _all_ pointers even the ones on the stack), the benenift outweights the cost for tracking pointers. -You do not want to pin allocations in the gc heap as it is to restrictive for your gc implementation. -GC safepoints worked out really well. TLS: To get fast thread local storage, align the start of the stack so you can chop of a few bits of the stack pointer to get to the TLS-section. We might be able to use this on platforms with slow TLS? Kind Regards Benjamin Thaut
Jul 16 2015
On Thu, 16 Jul 2015 17:30:05 +0000, Benjamin Thaut wrote:The speaker has 30 years of experience working on javas hotspot vmHow is this possible? Time travel?
Jul 16 2015
On Thursday, 16 July 2015 at 17:37:44 UTC, Justin Whear wrote:On Thu, 16 Jul 2015 17:30:05 +0000, Benjamin Thaut wrote:I confused that one. He actually states that he has 35 years of experience building compilers and 20 years on the Hotspot VM, which still is a huge amount of experience.The speaker has 30 years of experience working on javas hotspot vmHow is this possible? Time travel?
Jul 16 2015
On Thursday, 16 July 2015 at 17:37:44 UTC, Justin Whear wrote:On Thu, 16 Jul 2015 17:30:05 +0000, Benjamin Thaut wrote:was wondering the same :DThe speaker has 30 years of experience working on javas hotspot vmHow is this possible? Time travel?
Jul 16 2015
On Friday, 17 July 2015 at 06:51:27 UTC, extrawurst wrote:On Thursday, 16 July 2015 at 17:37:44 UTC, Justin Whear wrote:It wasn't the case, but it could have been possible as the starting point for HotSpot VM was developed for other languages than Java. If you look at the first point: "HotSpot started as a Self VM ported to Java" Self is 28 years old and had eventually a VM based on a Strongtalk VM by another company that begun development 21 years ago. Sun bought it 18 years ago and released HotSpot 16 years ago. https://en.wikipedia.org/wiki/Strongtalk https://code.google.com/p/strongtalk/ (Lars Bak worked on Strongtalk VM, HotSpot, V8 and Dart VM… so they are probably related designwise, one way or another.)On Thu, 16 Jul 2015 17:30:05 +0000, Benjamin Thaut wrote:was wondering the same :DThe speaker has 30 years of experience working on javas hotspot vmHow is this possible? Time travel?
Jul 17 2015
On Friday, 17 July 2015 at 07:36:29 UTC, Ola Fosheim Grøstad wrote:On Friday, 17 July 2015 at 06:51:27 UTC, extrawurst wrote:Interesting insights! Thank you!On Thursday, 16 July 2015 at 17:37:44 UTC, Justin Whear wrote:It wasn't the case, but it could have been possible as the starting point for HotSpot VM was developed for other languages than Java. If you look at the first point: "HotSpot started as a Self VM ported to Java" Self is 28 years old and had eventually a VM based on a Strongtalk VM by another company that begun development 21 years ago. Sun bought it 18 years ago and released HotSpot 16 years ago. https://en.wikipedia.org/wiki/Strongtalk https://code.google.com/p/strongtalk/ (Lars Bak worked on Strongtalk VM, HotSpot, V8 and Dart VM… so they are probably related designwise, one way or another.)[...]was wondering the same :D
Jul 17 2015
On Thursday, 16 July 2015 at 17:30:06 UTC, Benjamin Thaut wrote:This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=vzzABBxo44g [...]Treating D's GC the same as a managed language running in a VM's GC will only end in disappointment.
Jul 16 2015
On Thursday, 16 July 2015 at 17:52:33 UTC, rsw0x wrote:On Thursday, 16 July 2015 at 17:30:06 UTC, Benjamin Thaut wrote:Why? The only real difference is that a java vm generates the machine code during runtime while the D compiler generates the machine code ahead of time. The underlying implementation of the important GC parts (e.g. pointer discovery, safe points, etc) are still the same. And if you look for a state of the art GC, they only exist for VMs. I don't know any other compiled language with a GC you could compare against.This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=vzzABBxo44g [...]Treating D's GC the same as a managed language running in a VM's GC will only end in disappointment.
Jul 16 2015
On Thursday, 16 July 2015 at 21:04:33 UTC, Benjamin Thaut wrote:On Thursday, 16 July 2015 at 17:52:33 UTC, rsw0x wrote:Not even that, as there are AOT compilers for Java, so VM == language runtime. With the ongoing work on Graal and Substrate, even Oracle might be supporting AOT on the reference implementation. For me the best part was he saying nowadays he would just bootstrap Java, not use C or C++.On Thursday, 16 July 2015 at 17:30:06 UTC, Benjamin Thaut wrote:Why? The only real difference is that a java vm generates the machine code during runtime while the D compiler generates the machine code ahead of time. The underlying implementation of the important GC parts (e.g. pointer discovery, safe points, etc) are still the same. And if you look for a state of the art GC, they only exist for VMs.This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=vzzABBxo44g [...]Treating D's GC the same as a managed language running in a VM's GC will only end in disappointment.I don't know any other compiled language with a GC you could compare against..NET? Given that they offer NGEN, MDIL and now .NET Native, besides JIT. 4.6 is also bringing new GC improvements. -- Paulo
Jul 16 2015
On Thursday, 16 July 2015 at 21:04:33 UTC, Benjamin Thaut wrote:On Thursday, 16 July 2015 at 17:52:33 UTC, rsw0x wrote:If you have a way to implement self-healing code in D please share it. Or forwarding pointers, or card marking, or read/write barriers without abusing the MMU(which is dog slow,) or... Any of these would require massive changes to D that will never happen. But while everyone is tripping over themselves to try and copy something that will *not* work in D, they refuse to acknowledge what massive benefits D's GC can provide over Java's.On Thursday, 16 July 2015 at 17:30:06 UTC, Benjamin Thaut wrote:Why? The only real difference is that a java vm generates the machine code during runtime while the D compiler generates the machine code ahead of time. The underlying implementation of the important GC parts (e.g. pointer discovery, safe points, etc) are still the same. And if you look for a state of the art GC, they only exist for VMs. I don't know any other compiled language with a GC you could compare against.This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=vzzABBxo44g [...]Treating D's GC the same as a managed language running in a VM's GC will only end in disappointment.
Jul 16 2015
On Thursday, 16 July 2015 at 22:23:41 UTC, rsw0x wrote:On Thursday, 16 July 2015 at 21:04:33 UTC, Benjamin Thaut wrote:And yes, I'm well aware that someone will get pedantic and preach to me about using page protection to implement these things(despite mentioning it,) but it is _slow_, and you will be SOL in a few years when nobody uses 4K pages anymore.On Thursday, 16 July 2015 at 17:52:33 UTC, rsw0x wrote:If you have a way to implement self-healing code in D please share it. Or forwarding pointers, or card marking, or read/write barriers without abusing the MMU(which is dog slow,) or... Any of these would require massive changes to D that will never happen. But while everyone is tripping over themselves to try and copy something that will *not* work in D, they refuse to acknowledge what massive benefits D's GC can provide over Java's.[...]Why? The only real difference is that a java vm generates the machine code during runtime while the D compiler generates the machine code ahead of time. The underlying implementation of the important GC parts (e.g. pointer discovery, safe points, etc) are still the same. And if you look for a state of the art GC, they only exist for VMs. I don't know any other compiled language with a GC you could compare against.
Jul 16 2015
On Thursday, 16 July 2015 at 22:23:41 UTC, rsw0x wrote:If you have a way to implement self-healing code in D please share it. Or forwarding pointers, or card marking, or read/write barriers without abusing the MMU(which is dog slow,) or... Any of these would require massive changes to D that will never happen. But while everyone is tripping over themselves to try and copy something that will *not* work in D, they refuse to acknowledge what massive benefits D's GC can provide over Java's.Like what? Implementation may be difficult, but payback - fast and easy code - is huge. It's a matter of choice. What's wrong if people could choose the faster option for their code? BTW, isn't card marking the same as write barrier and why would you need to abuse anything slow for it?
Jul 19 2015
On Sun, 19 Jul 2015 11:29:04 +0000, Kagamin wrote:Like what? Implementation may be difficult, but payback...slow and ugly code...=
Jul 19 2015
On Thu, 16 Jul 2015 21:04:32 +0000, Benjamin Thaut wrote:On Thursday, 16 July 2015 at 17:52:33 UTC, rsw0x wrote:two words: "memory barriers".=On Thursday, 16 July 2015 at 17:30:06 UTC, Benjamin Thaut wrote:=20 Why?This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=3DvzzABBxo44g [...]Treating D's GC the same as a managed language running in a VM's GC will only end in disappointment.
Jul 16 2015
On Thursday, 16 July 2015 at 17:30:06 UTC, Benjamin Thaut wrote:This talk is really good and contains a lot of usefull information very densly packed: https://www.youtube.com/watch?v=vzzABBxo44g The speaker has 30 years of experience working on javas hotspot vm and shares his opinions on what you should do. My takeaways from this talk are: GC: -You want a fully percise GC (e.g. know _all_ pointers even the ones on the stack), the benenift outweights the cost for tracking pointers. -You do not want to pin allocations in the gc heap as it is to restrictive for your gc implementation. -GC safepoints worked out really well.Because in Java, everything is in the VM and you can play all kind of trick that wouldn't work for us.TLS: To get fast thread local storage, align the start of the stack so you can chop of a few bits of the stack pointer to get to the TLS-section. We might be able to use this on platforms with slow TLS?That is beautiful ! But does not quite work with Fibers. Still, I want to believe, there is most likely something here that is worth looking into.
Jul 17 2015