Live data from Hacker News

Mysterious Android codebase commit

android.googlesource.com

111–120 of 170 posts

Re: Mysterious Android codebase commit

#111
post #83

Earlier quoted context omitted.

> WebAssembly probably won't [have a GC] for some time Citation needed :) > It also doesn't have ~20 years of performance tuning on different microarchitectures the way the JVM does. JS engines have been tuned very well over the years. Remember that Web Assembly is designed to run in a JS engine.

> Remember that Web Assembly is designed to run in a JS engine. Is it? It's a very low-level bytecode that's designed to be efficiently compiled in one pass, and completely unrelated to the JS engine. It isn't meant (at least at this time) to have an optimizing JIT (like HotSpot or V8). It is meant as a good target for languages that don't rely on/can't benefit greatly from good JIT optimizations, such as C/C++ (or R…

It is (though that's not the only thing it's designed for), but in a JS engine setting it only uses a few specific parts of the JS engine, such as the JIT backend to do the actual code generation work and interoperability with JS.

Indeed, wasm won't likely ever expose directly executable memory. But in the future it may expose JIT capabilities like creating and calling new functions, declaring "patchable" code fragments which can be manipulated through APIs, and so on, and with these capabilities it isn't unreasonable to think about porting JITing VMs onto wasm.

Re: Mysterious Android codebase commit

#112
post #108

Earlier quoted context omitted.

> Of course, if you don't conform, Oracle will sue you into oblivion. What? OpenJDK is as free as they come. No conformance with Java necessary, you can do with it whatever you damn well please. You can use it to implement .NET if you want. Oracle has never (to the best of my knowledge) sued anyone for the use (or modification) of OpenJDK.

Okay, so can I modify it so that it doesn't conform to the Java specification? Can I modify it bit-by-bit until it's bytewise identical to Harmony? Of course I can't. Because if I do, Oracle will sue me. Oracle is lying. They claim to be offering free software, but will sue you once you take advantage of that freedom. It's a fucking trap. Do you really expect the technology community to embrace Oracle technology afte…

> Okay, so can I modify it so that it doesn't conform to the Java specification? Can I modify it bit-by-bit until it's bytewise identical to Harmony?

Absolutely (on both counts, although if it is identical to Harmony you may be in violation of the license due to a collision between GPLv2 and ASL, as ASL imposes further restrictions which GPLv2 does not allow -- see the next paragraph).

> Because if I do, Oracle will sue me.

They will not. In fact, they explicitly allow you to do whatever you want with it. They are not placing any restrictions; their own license (same as Linux's) does not allow them to do so (section 6 says: "You may not impose any further restrictions on the recipients' exercise of the rights granted herein").

Oracle sued Google, not you. They didn't sue them for using Java, and they certainly didn't sue them over OpenJDK. Of course, it has been Google's PR department's strategy to make you think that the lawsuit may apply to you, but it doesn't. The circumstances leading to the lawsuit were very unusual.

> Oracle is lying.

Maybe about other things (I don't know a large company that doesn't lie), but not about this.

> They claim to be offering free software, but will sue you once you take advantage of that freedom. It's a fucking trap.

Again, to the best of my knowledge, that has never happened.

> Do you really expect the technology community to embrace Oracle technology after Oracle spits in their food and shits in their sink?

I don't expect anyone to do anything other than to understand the facts and then make their decisions[1]. Oracle has earned the distrust of many developers, but I don't find Google to be any more likable. Personally, I'll take Oracle's old-school greed over Google's sneaky espionage and manipulative PR, but that's just me.

----

[1]: I am willing to bet that very few people understand what the Oracle v. Google court case is all about, and the loudest voice was by far Google's PR.

Re: Mysterious Android codebase commit

#113
post #61

Earlier quoted context omitted.

A JIT makes many tradeoffs but it is always capable of producing code at least as good as an AOT. How much better that code is depends on many factors, such as the language, the application, and how much time/energy you're willing to spend on optimization (the latter might lead to choosing to generate code that's less optimized than an AOT). A slightly bigger difference is not between JIT and AOT, but whether you can…

Of course a JIT is capable of producing code as good as an AOT and perhaps even better since it can capture more profiling data. The problem with a JIT is the startup time and this has not gone unnoticed by Oracle as even they've started working on AOT.

Not startup but warmup (i.e. the time until the application is fully optimized). There are other problems with a JIT on small devices, such as increased memory and energy consumption (each may be significant or not, depending on how the JIT works). I am a big fan of JITs, but as with everything in software, it is a tradeoff.

Re: Mysterious Android codebase commit

#114

Earlier quoted context omitted.

As a guy who used to work for Sun on JITted code and is now doing AOT for https://www.codenameone.com/ I've got to say that JIT always beats AOT in runtime. It can also beat it in startup when properly designed (MVM, caching etc.).

Generalizations about which technique beats the other technique reflect a lack of technical maturity. Both have advantages, and you're doing a disservice by advocating the use of one or the other exclusively ignoring differences in environment, circumstances, and workload.

The very fact that Oracle has started to address the slow startup times of JVM applications by finally working on AOT compilation is an admission of the technical immaturity of the JVM. Also, the only relevant environment here is mobile and startup times are paramount in this environment.

Re: Mysterious Android codebase commit

#115

Earlier quoted context omitted.

> WebAssembly doesn't have a GC, and probably won't for some time. Yeah... because it's assembly. That's the whole point. You don't WANT a GC. It would be the wrong layer to place a GC in. Ask most professional game developers if they would consider using a platform with a GC. They won't, because you can't build a realtime system without stuttering if you're dealing with a GC.

1000s of games have shipped with gc. Every Unreal and Unity game uses gc. Every XNA game used gc. Many of the largest most popular AAA games use gc. So yes we can ask professional game devs if they want a gc. Most will say "yes". Like any tool you know when to use them and when not to

In most of those cases, the performance-sensitive game engine itself does not use GC; GC is used in the scripting language that implements the high-level game logic.

Re: Mysterious Android codebase commit

#116
post #100

Earlier quoted context omitted.

As a sibling comment pointed out, Android already does this. To learn (an insane amount of) more detail about how this works, read this article I wrote a while back on how Process Loading on various systems is optimized. http://www.cydiasubstrate.com/id/727f62ed-69d3-4956-86b2-bc0...

It's not the same thing at all. Android first makes a process template, then takes clippings for each process it wants to run. That's not the same as running different applications in the same process.

The person who worked for Sun/Oracle, the one who first mentioned this technique earlier in this thread, was quite clear that the technique involves loading a single VM and then "fork[ing] with a lot of the JITted code already in place and reasonable process isolation". You are, of course, correct that this is not the same as "running different applications in the same process", but that is not the technique that was described.

> The trick is to share one VM instance between multiple apps. So when the OS starts you start the VM process and then fork with a lot of the JITted code already in place so you get almost instant startup and reasonable process isolation.

Re: Mysterious Android codebase commit

#117
post #105
post #90

Earlier quoted context omitted.

pjmlp: original poster above referred to Hotspot, not arbitrary JVMs. Clearly Android devices can run VMs with both JIT and AOT (they do, after all), what OP questioned was whether Hotspot in particular (not some arbitrary VM) is a good VM on a mobile device. Given Hotspot's somewhat underwhelming startup speed even on desktop class computers, I think that's a very reasonable technical question to ask, and not FUD in…

Hotspot requires as little as 128 KB RAM and 1 MB ROM http://www.oracle.com/technetwork/java/embedded/javame/embed... If one adds the GUI client APIs, then the whole SDK grows up to 5MB ROM. http://www.oracle.com/technetwork/java/embedded/javame/embed... Some commercial products using the above runtimes are the Gemalto's M2M modules or evaluation boards like the ARM Keil F200. But I expect Google fanclub to downvote…

The document you link to is not about Hotspot, it's about Oracle's Java ME VM, which is a different product from all I can tell. It doesn't mention the term "Hotspot" at all.

Re: Mysterious Android codebase commit

#118
post #116

Earlier quoted context omitted.

It's not the same thing at all. Android first makes a process template, then takes clippings for each process it wants to run. That's not the same as running different applications in the same process.

The person who worked for Sun/Oracle, the one who first mentioned this technique earlier in this thread, was quite clear that the technique involves loading a single VM and then " fork[ing] with a lot of the JITted code already in place and reasonable process isolation ". You are, of course, correct that this is not the same as "running different applications in the same process", but that is not the technique that w…

I missed that last part. Thanks for the correction.

Re: Mysterious Android codebase commit

#119
post #6

To explain if you are just joining in: This pretty much means Oracle v Google, a case with major ramifications for the industry has been settled out of court. I don't see how this can be interpreted any other way.

Thanks for ruining my holiday season. What's the precedent situation if they do settle it? Is Oracle's latest victory binding even if the final resolution of the case isn't decided by the court?

The federal circuit's opinion concerning the copyrightability of APIs is only binding precedent on the federal circuit itself and only when interpreting 9th circuit law. The FC's usual jurisdiction is over patents, not copyrights, and they only got involved in this case because Oracle originally asserted some patents that failed to find traction. In particular, the real 9th circuit would be free to draw their own conclusions should they hear a future case concerning the copyrightability of interfaces.

Re: Mysterious Android codebase commit

#120
post #105

Earlier quoted context omitted.

Hotspot requires as little as 128 KB RAM and 1 MB ROM http://www.oracle.com/technetwork/java/embedded/javame/embed... If one adds the GUI client APIs, then the whole SDK grows up to 5MB ROM. http://www.oracle.com/technetwork/java/embedded/javame/embed... Some commercial products using the above runtimes are the Gemalto's M2M modules or evaluation boards like the ARM Keil F200. But I expect Google fanclub to downvote…

The document you link to is not about Hotspot, it's about Oracle's Java ME VM, which is a different product from all I can tell. It doesn't mention the term "Hotspot" at all.

Hotspot is Oracle's Java VM JIT compiler, not a separate product.

They don't produce different JITs from scratch for each VM implementation.

Post reply on HN